|
|
|
@ -63,15 +63,6 @@ namespace details { |
|
|
|
|
#pragma warning(disable:4065) // switch statement contains 'default' but no 'case' labels
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
static int64 g_zero_timestamp = 0; |
|
|
|
|
|
|
|
|
|
static int64 getTimestamp() |
|
|
|
|
{ |
|
|
|
|
int64 t = getTickCount(); |
|
|
|
|
static double tick_to_ns = 1e9 / getTickFrequency(); |
|
|
|
|
return (int64)((t - g_zero_timestamp) * tick_to_ns); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static bool getParameterTraceEnable() |
|
|
|
|
{ |
|
|
|
|
static bool param_traceEnable = utils::getConfigurationParameterBool("OPENCV_TRACE", false); |
|
|
|
@ -485,7 +476,7 @@ Region::Region(const LocationStaticStorage& location) : |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
int64 beginTimestamp = getTimestamp(); |
|
|
|
|
int64 beginTimestamp = getTimestampNS(); |
|
|
|
|
|
|
|
|
|
int currentDepth = ctx.getCurrentDepth() + 1; |
|
|
|
|
switch (location.flags & REGION_FLAG_IMPL_MASK) |
|
|
|
@ -635,7 +626,7 @@ void Region::destroy() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
int64 endTimestamp = getTimestamp(); |
|
|
|
|
int64 endTimestamp = getTimestampNS(); |
|
|
|
|
int64 duration = endTimestamp - ctx.stackTopBeginTimestamp(); |
|
|
|
|
|
|
|
|
|
bool active = isActive(); |
|
|
|
@ -844,7 +835,7 @@ static bool isInitialized = false; |
|
|
|
|
|
|
|
|
|
TraceManager::TraceManager() |
|
|
|
|
{ |
|
|
|
|
g_zero_timestamp = cv::getTickCount(); |
|
|
|
|
(void)cv::getTimestampNS(); |
|
|
|
|
|
|
|
|
|
isInitialized = true; |
|
|
|
|
CV_LOG("TraceManager ctor: " << (void*)this); |
|
|
|
@ -990,7 +981,7 @@ void parallelForFinalize(const Region& rootRegion) |
|
|
|
|
{ |
|
|
|
|
TraceManagerThreadLocal& ctx = getTraceManager().tls.getRef(); |
|
|
|
|
|
|
|
|
|
int64 endTimestamp = getTimestamp(); |
|
|
|
|
int64 endTimestamp = getTimestampNS(); |
|
|
|
|
int64 duration = endTimestamp - ctx.stackTopBeginTimestamp(); |
|
|
|
|
CV_LOG_PARALLEL(NULL, "parallel_for duration: " << duration << " " << &rootRegion); |
|
|
|
|
|
|
|
|
|