Fix sampling counter time scales (#33)
* Fix sampling counter time scales - All perfetto trace events have "begin_ns" and "end_ns" debug fields - data for thread start and end timestamp in pthread_create_gotcha - discard samples outside of thread start and end timestamps - rename "CPU User CPU Time" perfetto counter to "CPU User Time" - rename "CPU Kernel CPU Time" perfetto counter to "CPU Kernel Time" - ensure CPU system samples in perfetto are set to zero at end - backtrace uses comp::wall_clock record() for timestamps (consistency) - "Peak Memory Usage [Thread X] (S)" renamed to "Thread Peak Memory Usage [X] (S)" - "Context Switches [Thread X] (S)" renamed to "Thread Context Switches Usage [X] (S)" - "Page Faults [Thread X] (S)" renamed to "Thread Page Faults Usage [X] (S)" - "<PAPI_DESC> [Thread X] (S)" renamed to "Thread <PAPI_DESC> [X] (S)" - samples * Fix includes
This commit is contained in:
1 bovenliggende
a640fbdb29
commit
90ab7a89fc
9 files changed
+123
-58
No files matched your search
@@ -434,14 +434,17 @@ call_chain::generate_perfetto<Device::NONE>(std::set<entry>& _used) const
|
||||
if(itr.device == Device::CPU)
|
||||
{
|
||||
TRACE_EVENT_BEGIN("device-critical-trace", "CPU",
|
||||
static_cast<uint64_t>(itr.begin_ns));
|
||||
static_cast<uint64_t>(itr.begin_ns), "begin_ns",
|
||||
itr.begin_ns);
|
||||
}
|
||||
else if(itr.device == Device::GPU)
|
||||
{
|
||||
TRACE_EVENT_BEGIN("device-critical-trace", "GPU",
|
||||
static_cast<uint64_t>(itr.begin_ns));
|
||||
static_cast<uint64_t>(itr.begin_ns), "begin_ns",
|
||||
itr.begin_ns);
|
||||
}
|
||||
TRACE_EVENT_END("device-critical-trace", static_cast<uint64_t>(itr.end_ns));
|
||||
TRACE_EVENT_END("device-critical-trace", static_cast<uint64_t>(itr.end_ns),
|
||||
"end_ns", itr.end_ns);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -462,8 +465,10 @@ call_chain::generate_perfetto<Device::CPU>(std::set<entry>& _used) const
|
||||
_static_mutex.unlock();
|
||||
TRACE_EVENT_BEGIN("host-critical-trace",
|
||||
perfetto::StaticString{ sitr.first->c_str() },
|
||||
static_cast<uint64_t>(itr.begin_ns), "begin_ns",
|
||||
static_cast<uint64_t>(itr.begin_ns));
|
||||
TRACE_EVENT_END("host-critical-trace", static_cast<uint64_t>(itr.end_ns));
|
||||
TRACE_EVENT_END("host-critical-trace", static_cast<uint64_t>(itr.end_ns),
|
||||
"end_ns", static_cast<uint64_t>(itr.end_ns));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -484,8 +489,10 @@ call_chain::generate_perfetto<Device::GPU>(std::set<entry>& _used) const
|
||||
_static_mutex.unlock();
|
||||
TRACE_EVENT_BEGIN("device-critical-trace",
|
||||
perfetto::StaticString{ sitr.first->c_str() },
|
||||
static_cast<uint64_t>(itr.begin_ns), "begin_ns",
|
||||
static_cast<uint64_t>(itr.begin_ns));
|
||||
TRACE_EVENT_END("device-critical-trace", static_cast<uint64_t>(itr.end_ns));
|
||||
TRACE_EVENT_END("device-critical-trace", static_cast<uint64_t>(itr.end_ns),
|
||||
"end_ns", static_cast<uint64_t>(itr.end_ns));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -504,8 +511,10 @@ call_chain::generate_perfetto<Device::ANY>(std::set<entry>& _used) const
|
||||
auto sitr = _static_strings.emplace(_name);
|
||||
_static_mutex.unlock();
|
||||
TRACE_EVENT_BEGIN("critical-trace", perfetto::StaticString{ sitr.first->c_str() },
|
||||
static_cast<uint64_t>(itr.begin_ns), "begin_ns",
|
||||
static_cast<uint64_t>(itr.begin_ns));
|
||||
TRACE_EVENT_END("critical-trace", static_cast<uint64_t>(itr.end_ns));
|
||||
TRACE_EVENT_END("critical-trace", static_cast<uint64_t>(itr.end_ns), "end_ns",
|
||||
static_cast<uint64_t>(itr.end_ns));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user