The plugin's file scope global variables destructors could be called
before roctracer_plugin_finalize is called, making the global variables
undefined by the time roctracer_plugin_finalize is called.
To avoid this issue, remove all non-pod global variables from the file
plugin.
Change-Id: I4b620d67d460d9c99adfd81cbf46b0e64540c503
This function has been deprecated since ROCm-2.9, use ROCTX's
roctxMark(const char* message) as a replacement for roctracer_mark.
Change-Id: Ie4aeae1db238453fc4451746cc9a338032ba817f
- Multithreaded Applications and plugin destruction
- Fixing Async-copy trace in file plugin
- Adding the assert checkups for every trace buffer flush function
Change-Id: I96e096fd7ee2604931200a0b446edb5ce49959dd
Don't set the color variables if tput is not available, not working, or
if ncolors < 8.
Move the color variables outside of eval to avoid calling tput over and
over again.
Change-Id: Id51a742b77ad0f7c99c1c7c5d05bed0f423b75de
- Added File plugin as the default plugin
- Moved the flush functions to the plugins
- Improved the flush to file implementation
Change-Id: I80dd448eb8147a8ea4aa63b39bd1d0a4baf7252b
This test verifies that callback argument matches the callback function
as a race condition while setting and reading the pair could result in
mismatched arguments.
Change-Id: I2fe49d98d19bb780b6956ea6718762cfa0de93f8
Intercept the first call to hsa_iterate_agents in order to number them.
The index assigned to agents will be used by a future commit.
Change-Id: I8db365f8fe913b6cde16a4dccb9bf09600846521
Move the HSA intercept to the OnLoad function, so that it is available
as soon as the ROCR is loaded.
Layer the HSA API wrappers on top of the basic HSA activity intercept.
Change-Id: Ie636d59755543cda181e76ec29f0b55081136b63
This commit is for code cleanup and for optimizing kernel name search
in the API callback, making sure to get the kernel name accurately
for the hip functions that have any kernel names
Change-Id: Ie9ab917c895748bfb8eee9ddfcbcad81a0b9a9fa
Making sure not to count duplicates for load_unload_reload_trace and
fixed the ignore-count option in check_trace.py.
Change-Id: I9e674aa624ec3b473bb7c6cc95260e240204627f
When separate debug info is requested, the test package
generation fails because /usr/bin/objcopy does not understand
the HSA code object format. We need a workaround to get
past this issue.
Change-Id: I9a307fcf532ce8219a9301850aae972303d19990
When ROCP_TRUNCATE_NAMES is not set, getenv returns NULL and std::atoi
crashes. Check that getenv returns a non-NULL string before calling
std::atoi.
Change-Id: Ie479a481f8d23f034b425d14e3cfefb3d62c84e8
Split the public and private HSA profiler/tracer interfaces. Only the
public interface should be exposed in include/roctracer.
Change-Id: I7e4424cd90023693350c31e6b02caca8c984ba84
Use GNUInstallDirs variables to determine the location of BINDIR,
LIBDIR, INCLUDEDIR, DATADIR, DOCDIR, LIBEXECDIR.
Depends-On: Id11f862fb4bdb2425d68f455074172c38814ec92
Change-Id: I6459a4531ef899321a5e2d8050cf8b553e89a968
The roctracer-tests package contains all the roctracer test binaries
and scripts needed to run the testsuite outside of the build directory.
Change-Id: Id11f862fb4bdb2425d68f455074172c38814ec92
activity.h and rocprofiler.h are already exposed in rocprofiler
through the rocm installation directory.
Change-Id: Ia383d3818fd51452390d2217d82503af4d91aac6
The ROCR now detects already loaded tool libraries and calls OnLoad/
OnUnload in the order specified with HSA_AMD_TOOL_ORDER.
It is no longer necessary to set the HSA_TOOLS_LIB environment variable
to load the roctracer API. The roctracer tool library should be
pre-loaded with LD_PRELOAD.
Change-Id: I6de1b1bd4f93caa08d3554aad2376d242c74fb7e
Enabling the new methodology of ROCP_STATS_OPT of getting HIP activities while the application is running
Change-Id: I94b3311b0740db804643dba0e4f77c1f9de0319b
In file included from roctracer/src/roctracer/tracker.h:24,
from roctracer/src/roctracer/roctracer.cpp:44:
/opt/rocm/hsa/include/hsa/amd_hsa_signal.h:26:246: note: ‘#pragma message: amd_hsa_signal.h has moved to ...’
26 | ssage("amd_hsa_signal.h has moved to ...")
| ^
Change-Id: I38d151d836688083a4fdb0e86a04fc40923a369f
The same information can be generated from the hcc_ops_trace.txt file,
so in a later commit, will add a stage to the tblextr.py script to
generate the .csv files when ROCP_STATS_OPT=1.
Change-Id: I3d1575e096bedf98c66068d9a4ca141421e5bb9d
Some records may need to point to data with the same lifetime as the
records themselves. One solution is to store the data at the end of
the memory pool buffer. Records in the buffer grow up, and the data
grows down. When the buffer is flushed both records and data are
recycled.
Change-Id: I278fa84478236bf895f7c2d152d47d4256987392
Prevents cmake errors for the HIP targets such as:
HIP_ARCHITECTURES is empty for target "MatrixTranspose".
Change-Id: I352916f6dccd22576e8b1482a41e2099b6d8a8d9
The roctracer_load, roctracer_unload, and roctrace_flush_buf functions
are not part of the ROCtracer API, and should not be exposed in the API
header file, but keep the functions in the library for backward
compatibility.
Add src/roctracer/backward_compat.cpp to implement retired functions.
Add test/app/backward_compat_test.cpp to test that the retired functions
are still accessible in the latest roctracer library.
Change-Id: I4c94310a7bfccfeae9384dac5db18fc79b4c5b17
Make error codes more informative and have negative values. This is an
ABI break but it does not appear known tools are relying on the exact
error codes.
Use logging for all errors so that roctracer_error_string will be able
to return last error message.
Make internal errors fatal and abort.
Do not use the tracer API exceptions in the tracer tool.
Change-Id: Ie8ed3d50e5ad26625ac9d1263f7e048edb5584c0