Skip to content

Commit

Permalink
fork fixes + sampling updates
Browse files Browse the repository at this point in the history
- more options for omnitrace-run
- OMNITRACE_SAMPLING_INCLUDE_INLINES
- fixed OMPT not being disabled
- fixed sampling duration
- fixed LD_PRELOAD when forked
  • Loading branch information
jrmadsen committed Sep 28, 2022
1 parent 1f5381e commit 7b9c913
Show file tree
Hide file tree
Showing 14 changed files with 545 additions and 163 deletions.
6 changes: 6 additions & 0 deletions .cmake-format.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ parse:
omnitrace_add_test:
flags:
- SKIP_BASELINE
- SKIP_PRELOAD
- SKIP_REWRITE
- SKIP_RUNTIME
- SKIP_SAMPLING
Expand All @@ -32,16 +33,21 @@ parse:
NUM_PROCS: '*'
REWRITE_TIMEOUT: '*'
RUNTIME_TIMEOUT: '*'
PRELOAD_TIMEOUT: '*'
REWRITE_ARGS: '*'
RUNTIME_ARGS: '*'
RUN_ARGS: '*'
ENVIRONMENT: '*'
LABELS: '*'
PROPERTIES: '*'
PRELOAD_PASS_REGEX: '*'
PRELOAD_FAIL_REGEX: '*'
RUNTIME_PASS_REGEX: '*'
RUNTIME_FAIL_REGEX: '*'
REWRITE_PASS_REGEX: '*'
REWRITE_FAIL_REGEX: '*'
BASELINE_PASS_REGEX: '*'
BASELINE_FAIL_REGEX: '*'
REWRITE_RUN_PASS_REGEX: '*'
REWRITE_RUN_FAIL_REGEX: '*'
omnitrace_target_compile_definitions:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/cpack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,15 @@ jobs:
timeout-minutes: 10
uses: actions/upload-artifact@v2
with:
name: ubuntu-stgz-installers
name: ubuntu-${{ matrix.os }}-rocm-${{ matrix.rocm-version }}-stgz-installers
path: |
build-release/stgz/*.sh
- name: DEB Artifacts
timeout-minutes: 10
uses: actions/upload-artifact@v2
with:
name: ubuntu-deb-installers
name: ubuntu-${{ matrix.os }}-rocm-${{ matrix.rocm-version }}-deb-installers
path: |
build-release/deb/*.deb
Expand Down Expand Up @@ -187,15 +187,15 @@ jobs:
timeout-minutes: 10
uses: actions/upload-artifact@v2
with:
name: opensuse-stgz-installers
name: opensuse-${{ matrix.os }}-rocm-${{ matrix.rocm-version }}-stgz-installers
path: |
build-release/stgz/*.sh
- name: RPM Artifacts
timeout-minutes: 10
uses: actions/upload-artifact@v2
with:
name: opensuse-rpm-installers
name: opensuse-${{ matrix.os }}-rocm-${{ matrix.rocm-version }}-rpm-installers
path: |
build-release/rpm/*.rpm
Expand Down
62 changes: 38 additions & 24 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,46 @@ if(DEFINED CMAKE_INSTALL_LIBDIR AND NOT DEFINED CMAKE_DEFAULT_INSTALL_LIBDIR)
CACHE STRING "Object code libraries" FORCE)
endif()

if(NOT "$ENV{OMNITRACE_CI}" STREQUAL "")
set(CI_BUILD $ENV{OMNITRACE_CI})
else()
set(CI_BUILD OFF)
endif()

include(GNUInstallDirs) # install directories
include(MacroUtilities) # various functions and macros

if(CI_BUILD)
omnitrace_add_option(OMNITRACE_BUILD_CI "Enable internal asserts, etc." ON ADVANCED
NO_FEATURE)
omnitrace_add_option(OMNITRACE_BUILD_TESTING "Enable building the testing suite" ON
ADVANCED)
omnitrace_add_option(OMNITRACE_BUILD_DEBUG
"Enable building with extensive debug symbols" OFF ADVANCED)
omnitrace_add_option(OMNITRACE_CUSTOM_DATA_SOURCE "Enable custom data source" OFF
ADVANCED)
omnitrace_add_option(
OMNITRACE_BUILD_HIDDEN_VISIBILITY
"Build with hidden visibility (disable for Debug builds)" OFF ADVANCED)
omnitrace_add_option(OMNITRACE_STRIP_LIBRARIES "Strip the libraries" OFF ADVANCED)
else()
omnitrace_add_option(OMNITRACE_BUILD_CI "Enable internal asserts, etc." OFF ADVANCED
NO_FEATURE)
omnitrace_add_option(OMNITRACE_BUILD_EXAMPLES "Enable building the examples" OFF
ADVANCED)
omnitrace_add_option(OMNITRACE_BUILD_TESTING "Enable building the testing suite" OFF
ADVANCED)
omnitrace_add_option(OMNITRACE_BUILD_DEBUG
"Enable building with extensive debug symbols" OFF ADVANCED)
omnitrace_add_option(OMNITRACE_CUSTOM_DATA_SOURCE "Enable custom data source" OFF
ADVANCED)
omnitrace_add_option(
OMNITRACE_BUILD_HIDDEN_VISIBILITY
"Build with hidden visibility (disable for Debug builds)" ON ADVANCED)
omnitrace_add_option(OMNITRACE_STRIP_LIBRARIES "Strip the libraries"
${_STRIP_LIBRARIES_DEFAULT} ADVANCED)
endif()

include(Compilers) # compiler identification
include(BuildSettings) # compiler flags

Expand Down Expand Up @@ -135,22 +173,8 @@ omnitrace_add_option(OMNITRACE_USE_OMPT "Enable OpenMP tools support" ON)
omnitrace_add_option(OMNITRACE_USE_PYTHON "Enable Python support" OFF)
omnitrace_add_option(OMNITRACE_BUILD_DYNINST "Build dyninst from submodule" OFF)
omnitrace_add_option(OMNITRACE_BUILD_LIBUNWIND "Build libunwind from submodule" ON)
omnitrace_add_option(OMNITRACE_BUILD_EXAMPLES "Enable building the examples" OFF ADVANCED)
omnitrace_add_option(OMNITRACE_BUILD_TESTING "Enable building the testing suite" OFF
ADVANCED)
omnitrace_add_option(OMNITRACE_BUILD_DEBUG "Enable building with extensive debug symbols"
OFF ADVANCED)
omnitrace_add_option(OMNITRACE_CUSTOM_DATA_SOURCE "Enable custom data source" OFF
ADVANCED)
omnitrace_add_option(
OMNITRACE_BUILD_HIDDEN_VISIBILITY
"Build with hidden visibility (disable for Debug builds)" ON ADVANCED)
omnitrace_add_option(OMNITRACE_BUILD_CI "Enable internal asserts, etc." OFF ADVANCED
NO_FEATURE)
omnitrace_add_option(OMNITRACE_INSTALL_PERFETTO_TOOLS
"Install perfetto tools (i.e. traced, perfetto, etc.)" OFF)
omnitrace_add_option(OMNITRACE_STRIP_LIBRARIES "Strip the libraries"
${_STRIP_LIBRARIES_DEFAULT} ADVANCED)

if(OMNITRACE_USE_PAPI)
omnitrace_add_option(OMNITRACE_BUILD_PAPI "Build PAPI from submodule" ON)
Expand All @@ -161,16 +185,6 @@ if(OMNITRACE_USE_PYTHON)
"Build python bindings with internal pybind11" ON)
endif()

if(NOT "$ENV{OMNITRACE_CI}" STREQUAL "")
message(
AUTHOR_WARNING
"OMNITRACE_CI environment variable ($ENV{OMNITRACE_CI}) is overridding the OMNITRACE_BUILD_CI cache value"
)
set(OMNITRACE_BUILD_CI
"$ENV{OMNITRACE_CI}"
CACHE BOOL "Enable internal asserts, etc" FORCE)
endif()

if(NOT OMNITRACE_USE_HIP)
set(OMNITRACE_USE_ROCTRACER
OFF
Expand Down
7 changes: 4 additions & 3 deletions cmake/BuildSettings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ include(Compilers)
include(FindPackageHandleStandardArgs)
include(MacroUtilities)

omnitrace_add_option(OMNITRACE_BUILD_DEVELOPER
"Extra build flags for development like -Werror" OFF)
omnitrace_add_option(
OMNITRACE_BUILD_DEVELOPER "Extra build flags for development like -Werror"
${OMNITRACE_BUILD_CI})
omnitrace_add_option(OMNITRACE_BUILD_EXTRA_OPTIMIZATIONS "Extra optimization flags" OFF)
omnitrace_add_option(OMNITRACE_BUILD_LTO "Build with link-time optimization" OFF)
omnitrace_add_option(OMNITRACE_USE_COMPILE_TIMING
Expand Down Expand Up @@ -221,7 +222,7 @@ endif()
omnitrace_add_interface_library(omnitrace-develop-options "Adds developer compiler flags")
if(OMNITRACE_BUILD_DEVELOPER)
add_target_flag_if_avail(omnitrace-develop-options "-Werror" "-Wdouble-promotion"
"-Wshadow" "-Wextra" "-Wpedantic" "-Werror" "/showIncludes")
"-Wshadow" "-Wextra" "-Wpedantic" "/showIncludes")
endif()

# ----------------------------------------------------------------------------------------#
Expand Down
Loading

0 comments on commit 7b9c913

Please sign in to comment.