fix omnitrace print-* with libraries (#94)
* fix omnitrace print-* with libraries * timemory submodule update * Update workflows to use ./bin/omnitrace instead of ./omnitrace * cmake format * update timemory submodule - fix ODR violations in utility/procfs * cmake updates - uniform find_package for all ROCm-based libraries * tweak transpose example - throw exception instead of std::exit * Inspect cmdv name before assuming not exe - some ELF execs "think" they are libraries so only assume rewrite + simulate + all-functions if filename looks like library - adds some test for --print-available -- <library> * Fix _has_lib_prefix when command is < 3 * Updates and reverts to omnitrace exe - update module_function operator< and operator== - add function_signature operator< - refactor module_function ctor - revert some previous changes w.r.t. simulate and include_unninstr * Fix source/bin/tests to use same output dir as tests * cmake format * Segfault mitigation + refactor + modify function iteration - refactor module_function ctor to avoid segfaults - string_t -> std::string - replace std::string with std::string_view in some places - get_name(module_t*) - get_name(procedure_t*) - disable using both app_modules and app_functions - new option: --parse-all-modules to iterate over app_modules - removed some unused code w.r.t. debug info * Disable module_function address range for uninstrumentable functions * Disable module_function address range for uninstrumentable functions * Refactored getting file/line info and init/fini - use dyninst insertInitCallback and insertFiniCallback if main not found - fixed all issues with segmentation faults in --simulate --all-functions * revert changes to Findrocprofiler.cmake
Tento commit je obsažen v:
@@ -217,10 +217,13 @@ function(ROCM_VERSION_PARSE_VERSION_FILES)
|
||||
endif()
|
||||
|
||||
# convert env to cache if not defined
|
||||
foreach(_PATH ROCmVersion_DIR ROCmVersion_ROOT ROCmVersion_ROOT_DIR ROCM_PATH)
|
||||
foreach(_PATH ROCmVersion_DIR ROCmVersion_ROOT ROCmVersion_ROOT_DIR
|
||||
OMNITRACE_DEFAULT_ROCM_PATH ROCM_PATH)
|
||||
if(NOT DEFINED ${_PATH} AND DEFINED ENV{${_PATH}})
|
||||
set(_VAL "$ENV{${_PATH}}")
|
||||
get_filename_component(_VAL "${_VAL}" REALPATH)
|
||||
set(${_PATH}
|
||||
"$ENV{${_PATH}}"
|
||||
"${_VAL}"
|
||||
CACHE PATH "Search path for ROCm version for ROCmVersion")
|
||||
endif()
|
||||
endforeach()
|
||||
@@ -229,8 +232,11 @@ function(ROCM_VERSION_PARSE_VERSION_FILES)
|
||||
set(_PATHS ${ROCmVersion_DIR})
|
||||
else()
|
||||
set(_PATHS)
|
||||
foreach(_DIR ${ROCmVersion_DIR} ${ROCmVersion_ROOT} ${ROCmVersion_ROOT_DIR}
|
||||
$ENV{CMAKE_PREFIX_PATH} ${CMAKE_PREFIX_PATH} ${ROCM_PATH} /opt/rocm)
|
||||
foreach(
|
||||
_DIR
|
||||
${ROCmVersion_DIR} ${ROCmVersion_ROOT} ${ROCmVersion_ROOT_DIR}
|
||||
$ENV{CMAKE_PREFIX_PATH} ${CMAKE_PREFIX_PATH} ${OMNITRACE_DEFAULT_ROCM_PATH}
|
||||
${ROCM_PATH} /opt/rocm)
|
||||
if(EXISTS ${_DIR})
|
||||
get_filename_component(_ABS_DIR "${_DIR}" REALPATH)
|
||||
list(APPEND _PATHS ${_ABS_DIR})
|
||||
|
||||
@@ -9,7 +9,7 @@ if(NOT ROCM_PATH AND NOT "$ENV{ROCM_PATH}" STREQUAL "")
|
||||
set(ROCM_PATH "$ENV{ROCM_PATH}")
|
||||
endif()
|
||||
|
||||
foreach(_DIR ${ROCM_PATH} /opt/rocm /opt/rocm/rocm_smi)
|
||||
foreach(_DIR ${ROCmVersion_DIR} ${ROCM_PATH} /opt/rocm /opt/rocm/rocm_smi)
|
||||
if(EXISTS ${_DIR})
|
||||
get_filename_component(_ABS_DIR "${_DIR}" REALPATH)
|
||||
list(APPEND _ROCM_SMI_PATHS ${_ABS_DIR})
|
||||
|
||||
@@ -9,7 +9,7 @@ if(NOT ROCM_PATH AND NOT "$ENV{ROCM_PATH}" STREQUAL "")
|
||||
set(ROCM_PATH "$ENV{ROCM_PATH}")
|
||||
endif()
|
||||
|
||||
foreach(_DIR ${ROCM_PATH} /opt/rocm /opt/rocm/rocprofiler)
|
||||
foreach(_DIR ${ROCmVersion_DIR} ${ROCM_PATH} /opt/rocm /opt/rocm/rocprofiler)
|
||||
if(EXISTS ${_DIR})
|
||||
get_filename_component(_ABS_DIR "${_DIR}" REALPATH)
|
||||
list(APPEND _ROCM_ROCPROFILER_PATHS ${_ABS_DIR})
|
||||
@@ -48,7 +48,6 @@ find_path(
|
||||
mark_as_advanced(rocprofiler_hsa_INCLUDE_DIR)
|
||||
|
||||
# ----------------------------------------------------------------------------------------#
|
||||
|
||||
find_library(
|
||||
rocprofiler_LIBRARY
|
||||
NAMES rocprofiler64 rocprofiler
|
||||
|
||||
@@ -9,7 +9,7 @@ if(NOT ROCM_PATH AND NOT "$ENV{ROCM_PATH}" STREQUAL "")
|
||||
set(ROCM_PATH "$ENV{ROCM_PATH}")
|
||||
endif()
|
||||
|
||||
foreach(_DIR ${ROCM_PATH} /opt/rocm /opt/rocm/roctracer)
|
||||
foreach(_DIR ${ROCmVersion_DIR} ${ROCM_PATH} /opt/rocm /opt/rocm/roctracer)
|
||||
if(EXISTS ${_DIR})
|
||||
get_filename_component(_ABS_DIR "${_DIR}" REALPATH)
|
||||
list(APPEND _ROCM_ROCTRACER_PATHS ${_ABS_DIR})
|
||||
@@ -70,7 +70,8 @@ find_library(
|
||||
PATHS ${roctracer_ROOT_DIR} ${_ROCM_ROCTRACER_PATHS}
|
||||
PATH_SUFFIXES lib lib64)
|
||||
|
||||
find_package(hsakmt)
|
||||
find_package(hsakmt HINTS ${_ROCM_ROCTRACER_PATHS} PATHS ${_ROCM_ROCTRACER_PATHS})
|
||||
|
||||
if(hsakmt_FOUND)
|
||||
set(roctracer_hsakmt_LIBRARY
|
||||
hsakmt::hsakmt
|
||||
|
||||
Odkázat v novém úkolu
Zablokovat Uživatele