HIP API args in perfetto + new perfetto categories (#76)

* HIP API perfetto args + updated perfetto categories

- Support for HIP API args field in perfetto
- PERFETTO_CATEGORIES -> OMNITRACE_PERFETTO_CATEGORIES
- Changed perfetto categories for several trace events and trace counters
- migrated several TRACE_EVENT_* to use omnitrace::tracing::{push,pop}_perfetto_ts(...)

* Tweaked category_region to encode the type of args as well as value

- Affects MPI args field in perfetto

* Improved testing in ubuntu-focal.yml

- "Test Install" step sources setup-env.sh
- "Test Install" step tests python support
- "Test Install" step tests reading ~/.omnitrace.cfg
- Avoid installing boost and tbb libs when building from submodule

* validate-perfetto-proto.py accepts -m / --categories

* Remove reference from category_region typeids

* Tweak opensuse action name

* Tweak the "Test Install" Step of ubuntu-focal

[ROCm/rocprofiler-systems commit: 2e1fd5a3c4]
This commit is contained in:
Jonathan R. Madsen
2022-06-29 16:26:02 -05:00
committed by GitHub
parent e5df51c9f6
commit e292002235
12 changed files with 203 additions and 103 deletions
@@ -516,15 +516,15 @@ backtrace::post_process(int64_t _tid)
_last_bt = _bt;
_mean_ts += _ts;
TRACE_COUNTER("sampling",
TRACE_COUNTER("thread_peak_memory",
perfetto_counter_track<perfetto_rusage>::at(_tid, 0), _ts,
_bt->m_mem_peak / units::megabyte);
TRACE_COUNTER("sampling",
TRACE_COUNTER("thread_context_switch",
perfetto_counter_track<perfetto_rusage>::at(_tid, 1), _ts,
_bt->m_ctx_swch);
TRACE_COUNTER("sampling",
TRACE_COUNTER("thread_page_fault",
perfetto_counter_track<perfetto_rusage>::at(_tid, 2), _ts,
_bt->m_page_flt);
@@ -535,7 +535,7 @@ backtrace::post_process(int64_t _tid)
{
if(i < _bt->m_hw_counter.size())
{
TRACE_COUNTER("sampling",
TRACE_COUNTER("hardware_counter",
perfetto_counter_track<hw_counters>::at(_tid, i),
_ts, _bt->m_hw_counter.at(i));
}
@@ -547,15 +547,15 @@ backtrace::post_process(int64_t _tid)
{
auto _ts = pthread_create_gotcha::get_execution_time(_tid)->second;
uint64_t _zero = 0;
TRACE_COUNTER("sampling",
TRACE_COUNTER("thread_peak_memory",
perfetto_counter_track<perfetto_rusage>::at(_tid, 0), _ts,
_zero);
TRACE_COUNTER("sampling",
TRACE_COUNTER("thread_context_switch",
perfetto_counter_track<perfetto_rusage>::at(_tid, 1), _ts,
_zero);
TRACE_COUNTER("sampling",
TRACE_COUNTER("thread_page_fault",
perfetto_counter_track<perfetto_rusage>::at(_tid, 2), _ts,
_zero);
@@ -566,7 +566,7 @@ backtrace::post_process(int64_t _tid)
{
if(i < _last_bt->m_hw_counter.size())
{
TRACE_COUNTER("sampling",
TRACE_COUNTER("hardware_counter",
perfetto_counter_track<hw_counters>::at(_tid, i),
_ts, _zero);
}
@@ -601,10 +601,10 @@ backtrace::post_process(int64_t _tid)
auto _ts = _bt->m_ts;
if(!pthread_create_gotcha::is_valid_execution_time(_tid, _ts)) continue;
TRACE_EVENT_BEGIN("sampling",
TRACE_EVENT_BEGIN("hardware_counter",
perfetto::StaticString{ sitr.first->c_str() },
_last_wall_ts, "begin_ns", _last_wall_ts);
TRACE_EVENT_END("sampling", _ts, "end_ns", _ts);
TRACE_EVENT_END("hardware_counter", _ts, "end_ns", _ts);
}
_last_wall_ts = _bt->m_ts;
}