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
This commit is contained in:
committed by
GitHub
parent
9b800c028b
commit
2e1fd5a3c4
@@ -1018,8 +1018,9 @@ foreach(_VERSION ${OMNITRACE_PYTHON_VERSIONS})
|
||||
endif()
|
||||
|
||||
function(OMNITRACE_ADD_PYTHON_VALIDATION_TEST)
|
||||
cmake_parse_arguments(TEST "" "NAME;TIMEMORY_METRIC;TIMEMORY_FILE;PERFETTO_FILE"
|
||||
"ARGS" ${ARGN})
|
||||
cmake_parse_arguments(
|
||||
TEST "" "NAME;TIMEMORY_METRIC;TIMEMORY_FILE;PERFETTO_METRIC;PERFETTO_FILE"
|
||||
"ARGS" ${ARGN})
|
||||
|
||||
omnitrace_add_python_test(
|
||||
NAME ${TEST_NAME}-validate-timemory
|
||||
@@ -1037,7 +1038,7 @@ foreach(_VERSION ${OMNITRACE_PYTHON_VERSIONS})
|
||||
NAME ${TEST_NAME}-validate-perfetto
|
||||
COMMAND
|
||||
${_PYTHON_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/validate-perfetto-proto.py
|
||||
${TEST_ARGS} -p -i
|
||||
-m ${TEST_PERFETTO_METRIC} ${TEST_ARGS} -p -i
|
||||
PYTHON_VERSION ${_VERSION}
|
||||
FILE omnitrace-tests-output/${TEST_NAME}/${_VERSION}/${TEST_PERFETTO_FILE}
|
||||
DEPENDS ${TEST_NAME}-${_VERSION}
|
||||
@@ -1050,6 +1051,7 @@ foreach(_VERSION ${OMNITRACE_PYTHON_VERSIONS})
|
||||
NAME python-source
|
||||
TIMEMORY_METRIC "trip_count"
|
||||
TIMEMORY_FILE "trip_count.json"
|
||||
PERFETTO_METRIC "host;user"
|
||||
PERFETTO_FILE "perfetto-trace.proto"
|
||||
ARGS -l
|
||||
run
|
||||
|
||||
@@ -40,6 +40,9 @@ if __name__ == "__main__":
|
||||
parser.add_argument(
|
||||
"-d", "--depths", nargs="+", type=int, help="Expected depths", default=[]
|
||||
)
|
||||
parser.add_argument(
|
||||
"-m", "--categories", nargs="+", help="Perfetto categories", default=[]
|
||||
)
|
||||
parser.add_argument(
|
||||
"-p", "--print", action="store_true", help="Print the processed perfetto data"
|
||||
)
|
||||
@@ -55,9 +58,11 @@ if __name__ == "__main__":
|
||||
tp = TraceProcessor(trace=(args.input))
|
||||
pdata = {}
|
||||
# get data from perfetto
|
||||
qr_it = tp.query("SELECT name, depth FROM slice")
|
||||
qr_it = tp.query("SELECT name, depth, category FROM slice")
|
||||
# loop over data rows from perfetto
|
||||
for row in qr_it:
|
||||
if args.categories and row.category not in args.categories:
|
||||
continue
|
||||
if row.name not in pdata:
|
||||
pdata[row.name] = {}
|
||||
if row.depth not in pdata[row.name]:
|
||||
|
||||
Reference in New Issue
Block a user