Relaxed module/function restrictions (#33)
* Relaxed module/function restrictions * Updated tests
This commit is contained in:
committed by
GitHub
parent
f4e27d8aee
commit
4a18f55d34
@@ -67,6 +67,7 @@ omnitrace_add_option(CMAKE_INSTALL_RPATH_USE_LINK_PATH "Enable rpath to linked l
|
||||
omnitrace_add_option(OMNITRACE_USE_CLANG_TIDY "Enable clang-tidy" OFF)
|
||||
omnitrace_add_option(OMNITRACE_USE_MPI "Enable MPI support" OFF)
|
||||
omnitrace_add_option(OMNITRACE_USE_HIP "Enable HIP support" ON)
|
||||
omnitrace_add_option(OMNITRACE_USE_PAPI "Enable HW counter support via PAPI" OFF)
|
||||
omnitrace_add_option(OMNITRACE_USE_ROCTRACER "Enable roctracer support"
|
||||
${OMNITRACE_USE_HIP})
|
||||
omnitrace_add_option(
|
||||
@@ -98,6 +99,9 @@ if(NOT OMNITRACE_USE_HIP)
|
||||
set(OMNITRACE_USE_ROCTRACER
|
||||
OFF
|
||||
CACHE BOOL "Disabled via OMNITRACE_USE_HIP=OFF" FORCE)
|
||||
set(OMNITRACE_USE_ROCM_SMI
|
||||
OFF
|
||||
CACHE BOOL "Disabled via OMNITRACE_USE_HIP=OFF" FORCE)
|
||||
endif()
|
||||
|
||||
if(OMNITRACE_BUILD_TESTING)
|
||||
@@ -143,6 +147,7 @@ if(OMNITRACE_USE_HIP OR OMNITRACE_USE_ROCTRACER)
|
||||
if(HIP_VERSION_MAJOR GREATER_EQUAL 4 AND HIP_VERSION_MINOR GREATER 3)
|
||||
set(roctracer_kfdwrapper_LIBRARY)
|
||||
endif()
|
||||
omnitrace_add_feature(HIP_VERSION "HIP version")
|
||||
else()
|
||||
set(HIP_VERSION "0.0.0")
|
||||
set(HIP_VERSION_MAJOR 0)
|
||||
|
||||
@@ -356,6 +356,9 @@ set(TIMEMORY_USE_PERFETTO
|
||||
set(TIMEMORY_USE_OMPT
|
||||
${OMNITRACE_USE_OMPT}
|
||||
CACHE BOOL "Enable OMPT support in timemory" FORCE)
|
||||
set(TIMEMORY_USE_PAPI
|
||||
${OMNITRACE_USE_PAPI}
|
||||
CACHE BOOL "Enable PAPI support in timemory" FORCE)
|
||||
set(TIMEMORY_USE_LIBUNWIND
|
||||
ON
|
||||
CACHE BOOL "Enable libunwind support in timemory")
|
||||
|
||||
@@ -40,7 +40,8 @@ get_whole_function_names()
|
||||
"backtrace", "backtrace_symbols", "backtrace_symbols_fd", "sigaddset",
|
||||
"sigandset", "sigdelset", "sigemptyset", "sigfillset", "sighold", "sigisemptyset",
|
||||
"sigismember", "sigorset", "sigrelse", "sigvec", "strtok", "strstr", "sbrk",
|
||||
"strxfrm", "atexit", "ompt_start_tool", "nanosleep",
|
||||
"strxfrm", "atexit", "ompt_start_tool", "nanosleep", "cfree", "tolower",
|
||||
"toupper", "fileno", "fileno_unlocked",
|
||||
// below are functions which never terminate
|
||||
"rocr::core::Signal::WaitAny", "rocr::core::Runtime::AsyncEventsLoop",
|
||||
"rocr::core::BusyWaitSignal::WaitAcquire",
|
||||
|
||||
@@ -1882,9 +1882,8 @@ instrument_module(const string_t& file_name)
|
||||
"^(malloc|(f|)lock|sig|sem)[a-z_]+(|64|_r|_l)\\.c$"
|
||||
};
|
||||
static std::regex core_lib_regex{
|
||||
"^(lib|)(c|z|rt|dl|dw|util|zstd|elf|pthread|open[\\-]rte|open[\\-]pal|"
|
||||
"gcc_s|tcmalloc|profiler|tbbmalloc|tbbmalloc_proxy|event_pthreads|ltdl|"
|
||||
"stdc\\+\\+|malloc|selinux|pcre[0-9]+)(-|\\.)",
|
||||
"^(lib|)(c|dl|dw|pthread|tcmalloc|profiler|"
|
||||
"tbbmalloc|tbbmalloc_proxy|malloc|stdc\\+\\+)(-|\\.)",
|
||||
regex_opts
|
||||
};
|
||||
static std::regex prefix_regex{ "^(_|\\.[a-zA-Z0-9])", regex_opts };
|
||||
@@ -1950,22 +1949,16 @@ instrument_entity(const string_t& function_name)
|
||||
};
|
||||
|
||||
static std::regex exclude(
|
||||
"(omnitrace|tim::|N3tim|MPI_Init|MPI_Finalize|::__[A-Za-z]|"
|
||||
"dyninst|tm_clones|malloc$|calloc$|free$|realloc$|std::addressof)",
|
||||
"(omnitrace|tim::|N3tim|MPI_Init|MPI_Finalize|dyninst|tm_clones)", regex_opts);
|
||||
static std::regex exclude_cxx(
|
||||
"(std::_Sp_counted_base|std::(use|has)_facet|std::locale|::sentry|^std::_|::_(M|"
|
||||
"S)_|::basic_string[a-zA-Z,<>: ]+::_M_create)",
|
||||
regex_opts);
|
||||
static std::regex exclude_cxx("(std::_Sp_counted_base|std::use_facet)", regex_opts);
|
||||
static std::regex leading(
|
||||
"^(_|\\.|frame_dummy|\\(|targ|new|delete|operator new|operator delete|"
|
||||
"std::allocat|nvtx|gcov|TAU|tau|Tau|dyn|RT|sys|pthread|posix|clone|"
|
||||
"virtual thunk|non-virtual thunk|transaction clone|"
|
||||
"RtsLayer|DYNINST|PthreadLayer|threaded_func|PMPI|"
|
||||
"Kokkos::Impl::|Kokkos::Experimental::Impl::|Kokkos::impl_|"
|
||||
"Kokkos::[A-Za-z]+::impl_|Kokkos::Tools::|Kokkos::Profiling::|"
|
||||
"kmp_threadprivate_)",
|
||||
regex_opts);
|
||||
static std::regex trailing("(\\.part\\.[0-9]+|\\.constprop\\.[0-9]+|\\.|\\.[0-9]+)$",
|
||||
regex_opts);
|
||||
static strset_t whole = []() {
|
||||
static std::regex leading("^(_|\\.|frame_dummy|\\(|targ|kmp_threadprivate_)",
|
||||
regex_opts);
|
||||
static std::regex trailing(
|
||||
"(_|\\.part\\.[0-9]+|\\.constprop\\.[0-9]+|\\.|\\.[0-9]+)$", regex_opts);
|
||||
static strset_t whole = []() {
|
||||
auto _v = get_whole_function_names();
|
||||
auto _ret = _v;
|
||||
for(std::string _ext : { "64", "_l", "_r" })
|
||||
|
||||
+16
-4
@@ -243,7 +243,6 @@ omnitrace_add_test(
|
||||
NUM_PROCS ${NUM_PROCS}
|
||||
REWRITE_ARGS -e -v 2
|
||||
RUNTIME_ARGS -e -v 1 --label file line return args
|
||||
RUN_ARGS ""
|
||||
ENVIRONMENT "${_base_environment};OMNITRACE_CRITICAL_TRACE=ON")
|
||||
|
||||
omnitrace_add_test(
|
||||
@@ -264,7 +263,6 @@ omnitrace_add_test(
|
||||
--dyninst-options
|
||||
DelayedParsing
|
||||
TypeChecking
|
||||
RUN_ARGS ""
|
||||
ENVIRONMENT "${_fast_environment}")
|
||||
|
||||
omnitrace_add_test(
|
||||
@@ -287,12 +285,26 @@ omnitrace_add_test(
|
||||
omnitrace_add_test(
|
||||
NAME user-api
|
||||
TARGET user-api
|
||||
REWRITE_ARGS -e -v 2 --min-address-range-loop=64
|
||||
REWRITE_ARGS
|
||||
-e
|
||||
-v
|
||||
2
|
||||
-l
|
||||
--min-address-range=0
|
||||
--min-address-range-loop=0
|
||||
--min-instructions=8
|
||||
-E
|
||||
custom_push_region
|
||||
RUNTIME_ARGS
|
||||
-e
|
||||
-v
|
||||
1
|
||||
--min-address-range-loop=64
|
||||
-l
|
||||
--min-address-range=0
|
||||
--min-address-range-loop=0
|
||||
--min-instructions=8
|
||||
-E
|
||||
custom_push_region
|
||||
--label
|
||||
file
|
||||
line
|
||||
|
||||
Reference in New Issue
Block a user