Adding Perfetto support (#867)

* Perfetto submodule

* include/rocprofiler-sdk/cxx/perfetto.hpp

- adapted from tests/common/perfetto.hpp
- updated json-tool to use <rocprofiler-sdk/cxx/perfetto.hpp>

* Update include/rocprofiler-sdk/cxx

- add details/delimit.hpp
- add details/join.hpp
- extend details/mpl.hpp
- extend details/operators.hpp

* Update lib/rocprofiler-sdk/hsa/async_copy.cpp

- update MEMORY_COPY direction names

* Preliminary perfetto support

* Update lib/rocprofiler-sdk-tool/generatePerfetto.cpp

- fix getting roctx msg vs. buffer operation name

* Temporary variable restructuring

* Perfetto patches after rebasing onto main

* Revert lib/rocprofiler-sdk/hsa/async_copy.cpp

- revert name

* Update lib/rocprofiler-sdk-tool/generatePerfetto.cpp

- fix ReadTrace

* Update tests/bin/hip-in-libraries

- sleep_for

* Support PFTRACE output format option in rocprofv3

* Change perfetto logging

* Update rocprofv3 tests to generate pftrace output

* Minor tweak to json-tool.cpp

* Update requirements.txt for perfetto testing

* Fix data race on amount_read in generatePerfetto.cpp

* Add testing for pftrace output

- relatively simple testing which verifies that the pftrace file has the same number of entries as JSON data for HIP/HSA/marker/kernel/memory_copy

* Fix import in perfetto_reader.py

* Fix data race in generatePerfetto.cpp
This commit is contained in:
Jonathan R. Madsen authored and GitHub committed 2024-05-22 15:51:12 -05:00
1 parent 92b7326910
commit 957bb7a4e5
39 files changed
+2530 -291

No files matched your search

+22
View File
@@ -150,3 +150,25 @@ if(ROCPROFILER_BUILD_DOCS)
REPO_URL https://github.com/jothepro/doxygen-awesome-css.git
REPO_BRANCH "main")
endif()
rocprofiler_checkout_git_submodule(
RECURSIVE
RELATIVE_PATH external/perfetto
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
TEST_FILE meson.build
REPO_URL https://android.googlesource.com/platform/external/perfetto external/perfetto
REPO_BRANCH "v44.0")
add_library(rocprofiler-perfetto-static-library STATIC)
target_sources(
rocprofiler-perfetto-static-library
PRIVATE ${PROJECT_SOURCE_DIR}/external/perfetto/sdk/perfetto.h
${PROJECT_SOURCE_DIR}/external/perfetto/sdk/perfetto.cc)
target_include_directories(
rocprofiler-perfetto-static-library SYSTEM
INTERFACE $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/external/perfetto/sdk>)
set_target_properties(
rocprofiler-perfetto-static-library PROPERTIES POSITION_INDEPENDENT_CODE ON
OUTPUT_NAME rocprofiler-sdk-perfetto)
target_link_libraries(rocprofiler-perfetto
INTERFACE $<BUILD_INTERFACE:rocprofiler-perfetto-static-library>)
Vendored Submodule
+1
Submodule external/perfetto added at eb5ef24c58.