Mark Meserve
8760fb4976
attach: Formalize ROCAttach API ( #1653 )
...
* attach: Formalize ROCAttach API
- Make ROCAttach public with public headers
- Change detach to take a PID
- attach and detach are now reentrant
- Cleanup of states and signal handling in ptrace session
- Fixes mixed up definition of ROCPROF_ATTACH_TOOL_LIBRARY
- ROCPROF_ATTACH_TOOL_LIBRARY now always means the tool library loaded by the attachment target
- ROCPROF_ATTACH_LIBRARY refers to the library used to perform attachment
- Add direct call of rocprof-attach
- Fix python library call of rocprof-attach
- Function now named attach(), changed from main()
* attach: rocprof-compute ROCAttach updates
- Update to new library names
- Correct usage of C lib detach
* attach: add test for rocattach
- Disable ASan, TSan, and UBSan for the new parallel-attach test
- Lower log level for LSan tests, existing behavior from other tests
---------
Co-authored-by: Ammar ELWazir <aelwazir@amd.com >
2026-01-15 14:32:14 -06:00
Madsen, Jonathan
0e93099fd7
[rocprofv3] SQLite3 database output (rocpd) support + rocprofiler-sdk-rocpd ( #403 )
...
* [rocprofv3] rocpd SQLite3 database output support
* Move counters xml and yaml to source/share/rocprofiler-sdk
- more representative of install hierarchy
* Add share/rocprofiler-sdk/rocpd SQL files
* Experimental rocprofiler-sdk SQL API
* rocprofv3 default output format is rocpd
* Fix rocpd event ids for counter collection w/o kernel dispatch
* Remove fktable entries from rocpd_tables.sql
* Fix rocpd schema path
* Fix install component for roctx python bindings
* rocprofiler-sdk-rocpd
- create include/rocprofiler-sdk-rocpd
- create rocprofiler-sdk-rocpd library, package, etc.
- default all "guid" fields to "{{guid}}" in tables
- remove "{{view_uuid}}" support (always unused)
* Migrate rocprofv3 to use rocprofiler-sdk-rocpd
* Fix missing foreign key reference
* Revert change
* Fix cmake comment
* Fix maybe-uninitialized compiler warning
* Fix maybe-uninitialized compiler warning
* Add logging to rocpd_sql_load_schema
* Improve string sanitization when inserting json strings
* Initialize rocpd logging on rocprofiler-sdk-rocpd library load
* Revert lib/output/generatePerfetto.cpp changes
* [temporary] Tweak rocprofv3-test-list-avail-trace-execute test log level
* Update get_install_path for lib/rocprofiler-sdk-rocpd/sql.cpp
- try to resolve issues on RHEL/SLES for dladdr
* Update lib/common/logging.cpp
- enable environ overrides
* dlsym for rocpd_sql_load_schema
* Make dl_info.dli_fname lexically normal
* Implement node_info alternatives if /etc/machine-id does not exist
* Misc include fixes
* SHA256 and UUIDv7 support
* Implement UUIDv7 in generateRocpd.cpp
* Support push/pop environment variables
* Minor tweak
* Fix glog segfaults when unsetting glog env
* Updated CHANGELOG
* Updates tests/pytest-packages
- rocpd_reader.py: RocpdReader
* Update tests / marker_views.sql
- add test_rocpd_data
* Update rocpd_tables.sql
- Use AUTOINCREMENT
- insert "uuid" and "guid" into rocpd_metadata
* Minor updates to generateRocpd.cpp
- don't quote GUID
- use sqlite3_open_v2
- use sqlite3_close_v2
* Update execute_raw_sql_statements_impl
- uses sqlite3_last_insert_rowid for autoincrement
* Update SQL deferred_transaction
- CI check for nullptr to connection
* Apply suggestions from code review
Co-authored-by: Welton, Benjamin <Benjamin.Welton@amd.com >
* Code review updates
- formatting
- replace if with switch
- remove loop for {{uuid}}
* Fix pmc_groups handling in rocprofv3
* Address code review feedback
- Include rocm_version in rocprofv3 version info
- Note `--version` option for `rocprofv3` in CHANGELOG.md
- remove commented out code
* Fix packaging dependencies
* Fix install package step of CI workflow
* Fix install package step of CI workflow
---------
Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com >
Co-authored-by: Welton, Benjamin <Benjamin.Welton@amd.com >
[ROCm/rocprofiler-sdk commit: 7afedc63be ]
2025-05-30 00:13:19 -05:00
Giovanni Lenzi Baraldi
6dad9b159c
Removing code object static library ( #865 )
...
* Removing static library build for codeobj library
* Moving codeobj library to amd_detail
* Formatting
* Formatting
* Adding findDW
* Adding libdw to common samples cmake
[ROCm/rocprofiler-sdk commit: a84c9fa7d4 ]
2024-05-28 23:15:11 -03:00
Giovanni Lenzi Baraldi
ea56f79495
Gbaraldi/att tool ( #766 )
...
* Enabling codeobj and thread trace samples
* Updating aqlprofile_v2 header
* Codeobj and thread trace samples with output log files
* Fixing clang format
* Cmake formatting
* Adding coverage to codeobj
* Comment trace sample
* Adding ATT Parser API
* Fixing forwarding to aqlprofile
* Clang formatting
* Clang tidy
* Adding option to print memory kernels
* Clang format
* Remove default from switch case
* Separating client/main on codeobj sample for ASAn
* Formatting
* Gbaraldi/att tool rebase (#801 )
* Enabling codeobj and thread trace samples
* Updating aqlprofile_v2 header
* Codeobj and thread trace samples with output log files
* Fixing clang format
* Cmake formatting
* Adding coverage to codeobj
* Comment trace sample
* Removing python from workflow
* Adding ATT Parser API
* Fixing forwarding to aqlprofile
* Clang formatting
* Clang tidy
* Adding option to print memory kernels
* Clang format
* Remove default from switch case
* Separating client/main on codeobj sample for ASAn
* Formatting
* Enabling codeobj and thread trace samples
* Updating aqlprofile_v2 header
* Codeobj and thread trace samples with output log files
* Fixing clang format
* Cmake formatting
* Adding coverage to codeobj
* Comment trace sample
* Adding ATT Parser API
* Fixing forwarding to aqlprofile
* Clang formatting
* Clang tidy
* Adding option to print memory kernels
* Clang format
* Remove default from switch case
* Separating client/main on codeobj sample for ASAn
* Formatting
* Fix codeobj library
* Allow thread trace in parallel with other service
* Zeroing the HSA signals
* Adding exception wrappers in ATT sample
* Removed force configure
* Remove force configure from ISA decode
* Removing codecov flag
* Gbaraldi/att tool tests (#828 )
* Adding tests for codeobj ISA decode
* Adding ATT tests
* Adding ATT integration tests
* Formatting
* Changing codeobj binary extension
* Renaming codeobj library spaces
* Fixing samples
* Formatting
* Formatting
* Fixing int test
* Fixing linker error
* Fixing memory fault
* Moving kernel ot inside namespace
* ASAN linking fix
* Removing unecessary headers
* Formatting
* Fixing target_cu
* Remove codeobj binary
* Revert "Remove codeobj binary"
This reverts commit 7d286f89d8096bc36925cd79cd742a5e6d10d179.
* Enable memory snapshot
* adding comgr
---------
Co-authored-by: Ammar ELWazir <ammar.elwazir@amd.com >
[ROCm/rocprofiler-sdk commit: 099ac7c72d ]
2024-05-03 18:45:47 -03:00
Jonathan R. Madsen
e8c7e6bfba
ROCTx Library ( #360 )
...
* Initial implementation of roctx library
* Update include/roctx/CMakeLists.txt
- fix installation
* Update cmake/rocprofiler_config_packaging.cmake
- add rocprofiler-sdk-roctx installer
* Update include/roctx/CMakeLists.txt
- include api_trace.h in installation
* Update include/roctx/api_trace.h
- add ROCTX_API_TABLE_VERSION_MAJOR define
- add ROCTX_API_TABLE_VERSION_STEP define
* Update lib/roctx/roctx.cpp
- static asserts for table size and struct member offsets
* Update external/CMakeLists.txt
- move BUILD_SHARED_LIBS to top
- disable libunwind for glog
* Update lib/roctx/CMakeLists.txt
- Update {BUILD,INSTALL}_RPATH
* Relocate include/roctx to include/rocprofiler-sdk/roctx
* Relocate lib/roctx to lib/rocprofiler-sdk-roctx
- change the name of the library from libroctx to librocprofiler-sdk-roctx
* Move lib/plugins to lib/rocprofiler-sdk-tool/plugins
- also change install export group
* Update lib/rocprofiler-sdk/CMakeLists.txt
- change rocprofiler-shared-library EXPORT group (rocprofiler-sdk-library-targets -> rocprofiler-sdk-targets)
* Update cmake/rocprofiler_utilities.cmake
- change install EXPORT group
- rocprofiler-sdk-library-targets -> rocprofiler-sdk-targets
* Update CMakeLists.txt
- set PACKAGE_NAME at high level
- include(rocprofiler_config_install_roctx)
* Update cmake/rocprofiler_config_install* and cmake/Templates/*.cmake.in
- added rocprofiler_config_install_roctx.cmake for installing roctx as a package
- reorganization of existing cmake/Templates/*-config.cmake.in files
- created new config.cmake.in and build-config.cmake.in for rocprofiler-sdk-roctx
* Relocate include/rocprofiler-sdk/roctx to include/rocprofiler-sdk-roctx
* Update rocprofiler_config_install_roctx.cmake
* Update lib/rocprofiler-sdk-roctx/roctx.cpp
- update include paths
* Update lib/rocprofiler-sdk-roctx/CMakeLists.txt
- change target name to have rocprofiler-sdk- prefix
- interface target_include_directories
- define export symbol
* source formatting (clang-format v11) (#361 )
Co-authored-by: jrmadsen <jrmadsen@users.noreply.github.com >
* Update include/rocprofiler-sdk/fwd.h
- fix doxygen markup for ROCPROFILER_STATUS_ERROR_CONTEXT_ERROR
* Update modulefile and setup-env.sh
* Update cmake/Templates/rocprofiler-sdk/config.cmake.in
- fix inclusion of rocprofiler-sdk-targets.cmake
* Update include/rocprofiler-sdk-roctx
- add types.h for typedefs
- add doxygen comments for roctx.h
- add roctxGetThreadId function
- roctxProfilerStart and roctxProfilerStop accept thread ID param
* Update lib/rocprofiler-sdk-roctx/roctx.cpp
- hsa_agent_t* -> hsa_agent_s*
* Update lib/rocprofiler-sdk-roctx/roctx.cpp
- support for roctxGetThreadId
- update signatures of roctxProfilerPause and roctxProfilerResume
* Update lib/rocprofiler-sdk-roctx/roctx.cpp
- Initialize logging with ROCTX_LOG_LEVEL
* Update include/rocprofiler-sdk-roctx/roctx.h
- remove ROCTX_NONNULL for ihipStream_t parameter in roctxNameHipStream because default stream is a nullptr
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
[ROCm/rocprofiler-sdk commit: 1edd4891b2 ]
2024-01-17 01:27:41 -06:00
Jonathan R. Madsen
309a8e069b
Update packaging ( #306 )
...
* Restructured tests
- support standalone compilation
- move tests/kernel-tracing/serialization.hpp to tests/common/serialization.hpp
- created tests/common library
- handle cloning of cereal library in standalone build
* Update install and packaging
* Update cmake/rocprofiler_config_packaging.cmake
- condense core, samples, development, and tools install components into single rocprofiler-sdk package
- keep tests install component in separate rocprofiler-sdk-tests package
* Update CI workflow to test install and packaging
* Update CI workflow
- install newer cmake for packaging checks
* Update cmake/rocprofiler_config_packaging.cmake
- disable auto-generation of shared-lib deps and provides for tests package
* Update CI workflow
- add sbin to PATH for dpkg install
* Update CI workflow
- remove using github.workspace when installing packages
* Update CI workflow
- hack to fix ordering of dpkg install
* Update CI workflow
- whitespace cleanup
[ROCm/rocprofiler-sdk commit: 8ed68ce4f3 ]
2023-12-15 14:39:13 -06:00
Jonathan R. Madsen
fafab6b713
Use -sdk suffix and reset VERSION to 0.0.0 ( #263 )
...
* Fix find_package(rocprofiler) in build tree
* Move include/rocprofiler to include/rocprofiler-sdk
* Update include/CMakeLists.txt
- add_subdirectory(rocprofiler-sdk)
* Move lib/rocprofiler to lib/rocprofiler-sdk
* Move lib/rocprofiler-tool to lib/rocprofiler-sdk-tool
* Update lib/CMakeLists.txt
- add_subdirectory(rocprofiler-sdk)
- add_subdirectory(rocprofiler-sdk-tool)
* Update lib/rocprofiler-sdk/CMakeLists.txt
* Rename rocprofiler-tool to rocprofiler-sdk-tool
* Replace include rocprofiler/ with include rocprofiler-sdk/
* Replace include lib/rocprofiler/ with include lib/rocprofiler-sdk/
* Set VERSION to 0.0.0 and finish install to rocprofiler-sdk
* More fixes for rocprofiler -> rocprofiler-sdk
- fix issue with rocprofiler-sdk-config.cmake.in
- fix counters xml install path
* Fix documentation generation
* Create rocprofiler_LIB_ROCPROFILER_SDK_DIR for build tree
* cmake formatting (cmake-format) (#264 )
Co-authored-by: jrmadsen <jrmadsen@users.noreply.github.com >
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
[ROCm/rocprofiler-sdk commit: 9a0c84efa6 ]
2023-11-29 20:43:18 -06:00
Jonathan R. Madsen
ccac2ee157
Initial skeleton ( #1 )
...
* googletest submodule
* cmake folder
* misc root files
- clang-format
- cmake-format
- pyproject.toml
- requirements.txt
- VERSION
* workflows
* RPM files
* external folder
* samples folder
* tests root folder
* source/bin folder
* source/include folder
* source/lib/common folder
* source/lib/plugins folder
* source/lib/tests folder
- for library unit tests
* source/lib/rocprofiler folder
- rocprofiler library implementation
* Remaining cmake files
* lib/common/containers
- ring_buffer
- atomic_ring_buffer
- stable_vector
- static_vector
* Update .gitignore
* Update hsa.hpp
- include cstdint
* cmake formatting (cmake-format) (#2 )
Co-authored-by: jrmadsen <jrmadsen@users.noreply.github.com >
* Remove linting.yml
- uses self-hosted runners
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
[ROCm/rocprofiler-sdk commit: 527aa71f5a ]
2023-08-08 18:39:01 -05:00