Commit grafiek

8 Commits

Auteur SHA1 Bericht Datum
Madsen, Jonathan 070b659a9a Re-enable clang-tidy for core workflows + clang-tidy fixes (#197)
* Ensure the clang-tidy is updated + clang-tidy fixes

* update-ci workflow

* Enable clang-tidy checks

* Add extra logging to device counter collection samples

* Misc clang-tidy fixes

* Disable device counter collection samples for ThreadSanitizer

* Formatting

---------

Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com>
2025-02-11 10:58:47 -06:00
Rawat, Swati 97b7a6315d update copyright date to 2025 (#102)
* Update LICENSE

* Update conf.py

* Update copyright year

* [fix] Update copyright year

* Update copyright year "ROCm Developer Tools"

* Add license headers to c++ files

* Add license to *.py

* Update licenses in rocdecode sources

---------

Co-authored-by: srawat <120587655+SwRaw@users.noreply.github.com>
Co-authored-by: Mythreya <mythreya.kuricheti@amd.com>
Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com>
2025-01-22 19:11:20 -06:00
Madsen, Jonathan 1b7ab08ded Split ABI checks for rocprofiler-sdk-roctx into separate file (#21)
* Split ABI checks for rocprofiler-sdk-roctx into separate file

* Update source/lib/rocprofiler-sdk-roctx/abi.cpp

Co-authored-by: Indic, Vladimir <Vladimir.Indic@amd.com>

* Update source/lib/rocprofiler-sdk-roctx/abi.cpp

Co-authored-by: Indic, Vladimir <Vladimir.Indic@amd.com>

* New line

---------

Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com>
Co-authored-by: Indic, Vladimir <Vladimir.Indic@amd.com>
2025-01-15 19:32:50 -06:00
Jonathan R. Madsen 7861dcc6c6 Update HIP tracing ABI (#1025)
* Update HIP ABI tracing

* Minor HIP abi.cpp updates

* Misc roctx updates (version.h + more)

* Common static thread-local template struct

- static_tl_object
- similar to static_object but with thread-local semantics

* rocprofiler-sdk/version.h updates

* Update for HIP_RUNTIME_API_TABLE_STEP_VERSION == {4,5,6}

* Fix roctx.cpp tweaks
2024-09-13 17:10:35 -05:00
Jonathan R. Madsen 4d5b71b0e7 Update logging (#838)
* Update logging

* Remove unused function

* Fix lib/rocprofiler-sdk/hsa/pc_sampling.cpp logging compilation

* Fix logging FLAGS_vmodule string leak and numerical log level

* Update logging

* Update glog submodule

* Leak fixes

* format
2024-05-20 15:38:18 -05:00
Benjamin Welton 41c0ddd72d Convert LOG() -> ROCP_X logging macros. (#695)
* Convert LOG() -> ROCP_X logging macros.

This patch converts the LOG() macro to the ROCP_X logging macros.
There are the following levels of logs.

Logs whos expressions are not evaluated unless the log level is enabled:

ROCP_TRACE - VLOG(2) (enabeled by env variable GLOG_v=2)
ROCP_INFO - VLOG(1) (enabeled by env variable GLOG_v=1)

Logs whos expressions are always evaluated:

ROCP_WARNING - LOG(WARNING)
ROCP_ERROR - LOG(ERROR)
ROCP_FATAL - LOG(FATAL)
ROCP_DFATAL - DLOG(FATAL) (only fatal in debug mode)

* source formatting (clang-format v11) (#696)

Co-authored-by: bwelton <1683479+bwelton@users.noreply.github.com>

* Minor fix

* Fixes for VLOG before main

* fix vmodule

* source formatting (clang-format v11) (#718)

Co-authored-by: bwelton <1683479+bwelton@users.noreply.github.com>

* memory leak fix

* Vlog change

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: bwelton <1683479+bwelton@users.noreply.github.com>
2024-04-02 17:15:30 -07:00
Jonathan R. Madsen 9efafc4d23 Split ROCTx API tables and update intercept table API (#421)
* Update include/rocprofiler-sdk

- buffer_tracing.h
  - fix doxygen for rocprofiler_buffer_tracing_hip_api_record_t
  - update doxygen for rocprofiler_buffer_tracing_marker_api_record_t
    - remove unused marker_id field
- fwd.h
  - Split ROCPROFILER_CALLBACK_TRACING_MARKER_API into ROCPROFILER_CALLBACK_TRACING_MARKER_{CORE,CONTROL,NAME}_API
  - Split ROCPROFILER_BUFFER_TRACING_MARKER_API into ROCPROFILER_BUFFER_TRACING_MARKER_{CORE,CONTROL,NAME}_API
  - split rocprofiler_runtime_library_t into rocprofiler_runtime_library_t and rocprofiler_intercept_table_t
    - after split of ROCTx into 3 tables, specifying rocprofiler_at_internal_thread_create became confusing

* Update include/rocprofiler-sdk-roctx/api_trace.h

- Split into three tables: core, control, and name
  - core: what it sounds like
  - control: functions for controling the profiler
  - name: functions for giving resources names

* Update lib/rocprofiler-sdk-roctx/roctx.cpp

- modifications following split into multiple tables

* Update lib/rocprofiler-sdk/marker/*

- modifications following split of ROCTx API into multiple intercept tables

* Update lib/rocprofiler-sdk/tests

- common.hpp
  - add enums to get_callback_tracing_names() and get_buffer_tracing_names()
- intercept_table.cpp
  - update test to use rocprofiler_intercept_table_t (and enums) instead of rocproifler_runtime_library_t
  - update OR combos tested
- roctx.cpp
  - updates following split of ROCTx API table into multiple tables
  - use simplified specification of control API

* Update lib/rocprofiler-sdk

- buffer_tracing.cpp
  - Updates for ROCPROFILER_BUFFER_TRACING_MARKER_{CORE,CONTROL,NAME}_API enum values
- callback_tracing.cpp
  - Updates for ROCPROFILER_CALLBACK_TRACING_MARKER_{CORE,CONTROL,NAME}_API enum values
- intercept_table.hpp
  - notify_runtime_api_registration -> notify_intercept_table_registration
- intercept_table.cpp
  - updates for new rocprofiler_intercept_table_t enum and new ROCTx tables
- registration.cpp
  - updates for new rocprofiler_intercept_table_t enum and new ROCTx tables
  - updates for notify_runtime_api_registration -> notify_intercept_table_registration

* Update lib/rocprofiler-sdk-tool

- helper.cpp
  - Updates for new enums in get_callback_id_names() and get_buffer_id_names()
- tool.cpp
  - migrate to new enums for split ROCTx tables
  - use simplified split for control table vs. core+name tables

* Update samples/{api_callback_tracing,intercept_table}

- intercept_table/client.cpp
  - rocprofiler_runtime_library_t -> rocprofiler_intercept_table_t
- api_callback_tracing/client.cpp
  - Updates for new enums in get_callback_id_names()
  - use simplified split for control table vs. core+name tables
  - migrate to new enums for split ROCTx tables

* Update tests

- rocprofv3/tracing/validate.py
  - handle new marker domain names
- tools/json-tool.cpp
  - Updates for new enums in get_callback_id_names() and get_buffer_id_names()
  - use simplified split for control table vs. core+name tables
  - migrate to new enums for split ROCTx tables

* Update tests/rocprofv3/tracing/CMakeLists.txt

- fix FAIL_REGULAR_EXPRESSION for rocprofv3-test-trace-execute

* Update lib/rocprofiler-sdk-tool/{output_file,tool}.*

- logging in output_file dtor
- support stdout/stderr

* Update lib/common/container/record_header_buffer.hpp

- reduce probability of is_empty() returning true while emplace is happening

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

- logging for buffered_tracing_callback
- counter collection uses CSV encoder

* Update bin/rocprofv3

- remove -i flag from help menu
2024-01-26 13:56:15 -06:00
Jonathan R. Madsen 1edd4891b2 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>
2024-01-17 01:27:41 -06:00