Revīziju grafs

119 Revīzijas

Autors SHA1 Ziņojums Datums
Jonathan R. Madsen e76c27be15 Adds test which validates errors for missing configs (#75)
* Adds test which validates errors for missing configs

- updates timemory submodule with fix for protection against recursion

* Removed PASS_REGULAR_EXPRESSION

- this seems to have different behaviors depending on cmake version

[ROCm/rocprofiler-systems commit: 22bcc2efd9]
2022-06-29 04:27:40 -05:00
Jonathan R. Madsen 2415c64aba Fix docs using -D instead of -G (#73)
- omnitrace-avail option is -G, not -D

[ROCm/rocprofiler-systems commit: da07d88f99]
2022-06-28 21:53:53 -05:00
Jonathan R. Madsen abf88043ca Rework submodule installation (#70)
* Rework submodule installation

- use add_subdirectory(... EXCLUDE_FROM_ALL) + explicit installation of deps
- install all library deps to lib/omnitrace
- internal builds of dyninst use libomnitrace-rt for binary rewriting
- support libdyninstAPI_RT not in LD_LIBRARY_PATH when dyninst built internally

* Update ubuntu-focal to test full dyninst install

* Use RelWithDebInfo because Dyninst segfaults with MinSizeRel

* Fix ubuntu-focal.yml install step

[ROCm/rocprofiler-systems commit: fadcfa36da]
2022-06-28 16:32:07 -05:00
Jonathan R. Madsen cb0b57b8e6 omnitrace-avail generate config (#69)
* Config updates

- See PR #69 for details

- change type of OMNITRACE_DL_VERBOSE
- add "deprecated" category to OMNITRACE_ROCM_SMI_DEVICES
- reduce size of perfetto shared memory size hint
- deprecate OMNITRACE_OUTPUT_FILE in favor of OMNITRACE_PERFETTO_FILE
- set papi event choices
- read config file after reading command line
- fix update of OMNITRACE_DL_VERBOSE
- mark several settings as hidden
- timemory update support hidden attribute for settings
- rework get_perfetto_output_filename()
- Hide settings from not available backends

* Rework omnitrace-avail to support dumping configurations

* Overwrite query, tests, output flag

- Support using -O flag when dumping config
- Support checking before overwriting existing config
- Support --force to overwrite existing config
- Fix get_component_info not including omnitrace components
- Testing for dumping config

* Update documentation on omnitrace-avail

* Fix issue with timemory format + "/__w/"

* Update output prefix keys docs

* Rename --dump-config to --generate-config

* Hide MPI related options

- OMNITRACE_PERFETTO_COMBINE_TRACES and OMNITRACE_COLLAPSE_PROCESSES are hidden w/o MPI support


[ROCm/rocprofiler-systems commit: 1877ebf47b]
2022-06-28 01:36:04 -05:00
Jonathan R. Madsen d622135c92 Fix PID resolution + OMNITRACE_VERSION + fix various configs (#71)
* Fix to pid via mpi_gotcha

* OMNITRACE_VERSION defines

* call perfetto on hsa_activity_callback thread

* Test label tweak

* Config fixes

- Change type of OMNITRACE_DL_VERBOSE
- Update OMNITRACE_DL_VERBOSE properly
- Add OMNITRACE_ROCM_SMI_DEVICES to deprecated group
- Set default_process_suffix

* metadata for OMNITRACE_VERSION and OMNITRACE_HIP_VERSION

[ROCm/rocprofiler-systems commit: efe1edd253]
2022-06-27 23:01:24 -05:00
Jonathan R. Madsen 3c0b4a50ba tracing NS + category region component + MPI args (#52)
tracing NS + category region component

- made library.cpp impl more broadly available
- support for perfetto args
- MPI wrappers encode args and return type
- new categories / perfetto categories
- omnitrace_library category -> libomnitrace
- omnitrace_dl_library -> libomnitrace-dl

[ROCm/rocprofiler-systems commit: 5105e2c94f]
2022-06-24 16:08:06 -05:00
Jonathan R. Madsen b1bd1a4d94 Deprecate omnitrace use thread sampling (#68)
* Deprecate OMNITRACE_USE_THREAD_SAMPLING

* Reworked config based on OMNITRACE_MODE

- config::set_default_setting_value(...)
- config::get_mode() is now dynamically deduced
- moved tweaking defaults from library.cpp to config::configure_mode_settings(...)
- timemory submodule update fixing vsetting issue

* runtime.md update

* revert accidental lambda name change

* Reintroduce (deprecated) OMNITRACE_ROCM_SMI_DEVICES

- add handle_deprecated_setting(...) for this deprecated setting

[ROCm/rocprofiler-systems commit: 27e4e82376]
2022-06-24 15:03:15 -05:00
Tamima Rashid efa5da659c adding perfetto-validation-script (#66)
* adding perfetto-validation-script

* Rename validation script

* Update tests/validate_perfetto.py

Co-authored-by: Jonathan R. Madsen <jrmadsen@users.noreply.github.com>

* Update tests/validate_perfetto.py

Co-authored-by: Jonathan R. Madsen <jrmadsen@users.noreply.github.com>

* Update tests/validate_perfetto.py

Co-authored-by: Jonathan R. Madsen <jrmadsen@users.noreply.github.com>

* Update tests/validate_perfetto.py

Co-authored-by: Jonathan R. Madsen <jrmadsen@users.noreply.github.com>

* addressed the edits in the validation script

* addressed the edits in the validation script

* Perfetto validation script (#1)

* Fixed mismatch message in validate-timemory-json

* validate_perfetto.py -> validate-perfetto-proto.py

* Add python-source-validate-perfetto

- python-source-validate-perfetto uses validate-python-proto.py to validate perfetto output
- renamed python-source-check test to python-source-validate timemory

* Moved python-source-validate tests outside of cat command if block

- these tests don't rely on OMNITRACE_CAT_COMMAND

* CMake/CTest OMNITRACE_ADD_PYTHON_VALIDATION_TEST function

- generalized function for performing validation test with validate-{timemory-json,perfetto-proto}.py scripts

* Print perfetto validation

* Install perfetto python package in workflows

* cmake format

* Python formatting

* Python formatting CI

* Install perfetto python package in workflows

* Install dataclasses for perfetto in opensuse

* Install dataclasses for perfetto in ubuntu

- uninstalled dependency for perfetto in Python 3.6

Co-authored-by: Jonathan R. Madsen <jrmadsen@users.noreply.github.com>
Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com>

[ROCm/rocprofiler-systems commit: cfa16cbe2f]
2022-06-24 03:03:46 -05:00
Jonathan R. Madsen 785c0d07cc Update dyninst submodule (#65)
* Update dyninst submodule

* Update dyninst submodule

- fixes to install interface libs of Boost, ElfUtils, and LibIberty

[ROCm/rocprofiler-systems commit: be7b03e76f]
2022-06-22 18:07:57 -05:00
Jonathan R. Madsen 8ef1b17ed4 Update timemory submodule (#64)
* Update timemory submodule

* Update timemory submodule

- updates timemory's pybind11 submodule due to VS 2022 debug issue

* Drop a commit in timemory submodule

[ROCm/rocprofiler-systems commit: e2ee542760]
2022-06-22 15:52:13 -05:00
Jonathan R. Madsen ca8d383772 libomnitrace uses common headers (#62)
* libomnitrace uses common headers

- JOIN(...) uses ::omnitrace::common::join instead of ::tim::mpl::apply<>::join

* Update lib/common CMake

[ROCm/rocprofiler-systems commit: 335f309b8f]
2022-06-22 15:19:34 -05:00
Jonathan R. Madsen 6a5fef55b5 Update PTL submodule (#63)
[ROCm/rocprofiler-systems commit: 25e42be09f]
2022-06-22 15:18:44 -05:00
Jonathan R. Madsen 4d70eb1ed5 Rename OMNITRACE_ROCM_SMI_DEVICES to OMNITRACE_SAMPLING_GPUS (#58)
- support ranges in OMNITRACE_SAMPLING_GPUS

[ROCm/rocprofiler-systems commit: 354bbf2a32]
2022-06-22 15:01:13 -05:00
Jonathan R. Madsen f5a3099801 Fix attaching to running process, i.e. omnitrace -p <PID> (#60)
* Fix attaching to a process

- e.g. omnitrace -p <PID>

* Update /proc/sys/kernel/yama/ptrace_scope in CI

* Query /proc/sys/kernel/yama/ptrace_scope

* Use AUTHOR_WARNING instead of WARNING for ptrace_scope

[ROCm/rocprofiler-systems commit: fe3d15a6c9]
2022-06-21 00:28:20 -05:00
Jonathan R. Madsen 7ce9595564 Improved the determination of MPI rank (#61)
* Improved the determination of MPI rank

* C-style cast of MPI_Comm

[ROCm/rocprofiler-systems commit: dfda902092]
2022-06-21 00:27:52 -05:00
Jonathan R. Madsen ec7f84b60c Fix find_path in omnitrace-dl (#59)
- added some verbosity

[ROCm/rocprofiler-systems commit: 5583168dbc]
2022-06-21 00:27:37 -05:00
Jonathan R. Madsen 536a0bf9d4 Remove reliance on MPI_Comm_rank (#56)
* Remove reliance on MPI_Comm_rank

- read /proc/<PID>/tasks/<PID>/children of parent process to deduce the rank
- Old format relied on user calling MPI_Comm_rank(MPI_COMM_WORLD, ...)
- if MPI_Comm_rank called with subcommunicators only, multiple ranks would write to same file

* Tweak mpi example

[ROCm/rocprofiler-systems commit: 8eff363ed3]
2022-06-20 00:50:49 -05:00
Jonathan R. Madsen c060cfe2d9 Fixes OMNITRACE_SUPPRESS_CONFIG handling (#53)
Fixes OMNITRACE_SUPPRESS_CONFIG

- now, if set to ON, the config file will not be read

[ROCm/rocprofiler-systems commit: f27f062e88]
2022-06-20 00:49:57 -05:00
Jonathan R. Madsen 41ab1b61e3 Inclusive range for OMNITRACE_SAMPLING_CPUS (#54)
- previously, a value of 0-3 would be CPUs 0, 1, and 2
- now, a value of 0-3 would be CPUs 0, 1, 2, and 3

[ROCm/rocprofiler-systems commit: 0ef9a1531a]
2022-06-20 00:46:55 -05:00
Jonathan R. Madsen 1f3231bc95 Define new function attributes (#55)
- decorates several functions with OMNITRACE_HOT

[ROCm/rocprofiler-systems commit: 32a8d40d25]
2022-06-20 00:44:31 -05:00
Jonathan R. Madsen 5759a03044 Fixes excluded-instr output, fini functions, tweaks MPI (#50)
- fixes population of excluded_module_functions
- omnitrace-compile-definitions have OMNITRACE_USE_MPI and OMNITRACE_USE_MPI_HEADERS
- Do not enable mpi support if no full or partial MPI support
- New option --all-functions

[ROCm/rocprofiler-systems commit: 8837b744ca]
2022-06-17 15:52:58 -05:00
Jonathan R. Madsen d080fb3a1a CI for OpenSUSE (#12)
* CI for OpenSUSE

* OpenSUSE MPI --allow-run-as-root

- when testing in OpenSUSE docker container, tests using OpenMPI fail due to running as root
- This commit toggles OMNITRACE_CI_MPI_RUN_AS_ROOT to ON and tests whether --allow-run-as-root is supported

* Tweak to OMNITRACE_CI_MPI_RUN_AS_ROOT handling

[ROCm/rocprofiler-systems commit: 20e7b573d4]
2022-06-17 14:32:51 -05:00
Jonathan R. Madsen 846e5cf6d5 Fixes the configuration file example (#45)
- example config file will fail due to PR #31 

[ROCm/rocprofiler-systems commit: 5bdfecb9dd]
2022-06-14 12:44:41 -05:00
Jonathan R. Madsen aeab36501a Fix the main library stop routine for timemory (#39)
* Fix the main library stop routine for timemory

- the main pop_timemory function was popping too many calls
- this primarily affected recursive calls

* Lengthen the timeout for the Configure CMake step

* Fix python tests

- new validate-timemory-json.py script

* Documentation update

- Call-counts in timemory output examples in documentation were affected by the changes

* Fix the per-thread metrics during finalization

- pthread_create_mutex starts/stops the per-thread data
- removed unintentional continue statement

* Docs tweaks

* Fix lap counter on per-thread metrics

[ROCm/rocprofiler-systems commit: a142b2029d]
2022-06-13 15:57:44 -05:00
Jonathan R. Madsen ad9fd4b7ec Support omnitrace-dl as kokkos profile library (#37)
- add OnLoad and OnUnload to omnitrace-dl
- disable global fence for kokkos profiling tools
- tweak omnitrace_strip_target to use wildcards
- added dl-gen.py script for generating dlopen bindings
- added support for kokkosp_request_tool_settings
- added support for kokkosp_dual_view_sync
- added support for kokkosp_dual_view_modify

[ROCm/rocprofiler-systems commit: ab395f86c4]
2022-06-10 18:54:22 -05:00
Jonathan R. Madsen 1b91d1ad11 Update youtube links (#38)
- replaced videos with poor audio with videos which are better

[ROCm/rocprofiler-systems commit: b50a13c87e]
2022-06-10 17:08:03 -05:00
Jonathan R. Madsen 7f7d0ed34c export libomnitrace-dl.so to OMP_TOOL_LIBRARIES (#27)
* export libomnitrace-dl.so to OMP_TOOL_LIBRARIES

* Disable ompt_context_t

- ompt.cpp enables/disables context
- Update timemory submodule :: handles disabled context

[ROCm/rocprofiler-systems commit: d4b8e25765]
2022-06-10 13:16:11 -05:00
Jonathan R. Madsen 04edcf33c3 Implements --label option for python profiler (#34)
* Implements --label option for python profiler

- removes '-a', '-f', and '-l' options in favor of '--label args file line' for consistency with omnitrace exe

* cmake formatting

* Bump version to 1.1.0

[ROCm/rocprofiler-systems commit: 017e794d63]
2022-06-10 10:07:15 -05:00
Jonathan R. Madsen ac25b485e7 Fix sampling counter time scales (#33)
* Fix sampling counter time scales

- All perfetto trace events have "begin_ns" and "end_ns" debug fields
- data for thread start and end timestamp in pthread_create_gotcha
- discard samples outside of thread start and end timestamps
- rename "CPU User CPU Time" perfetto counter to "CPU User Time"
- rename "CPU Kernel CPU Time" perfetto counter to "CPU Kernel Time"
- ensure CPU system samples in perfetto are set to zero at end
- backtrace uses comp::wall_clock record() for timestamps (consistency)
- "Peak Memory Usage [Thread X] (S)" renamed to "Thread Peak Memory Usage [X] (S)"
- "Context Switches [Thread X] (S)" renamed to "Thread Context Switches Usage [X] (S)"
- "Page Faults [Thread X] (S)" renamed to "Thread Page Faults Usage [X] (S)"
- "<PAPI_DESC> [Thread X] (S)" renamed to "Thread <PAPI_DESC> [X] (S)"
- samples

* Fix includes

[ROCm/rocprofiler-systems commit: 90ab7a89fc]
2022-06-10 08:35:39 -05:00
Jonathan R. Madsen 2eb4b4981c Fix loop-level instrumentation + more (#32)
- fix loop-level instrumentation
- support loop instrumentation w/o debug symbols via loop number
- improve module_function messages
- serialize num_basic_blocks
- serialize num_outer_loops
- serialize is_num_instructions_constrained
- serialize is_loop_num_instructions_constrained
- updated transpose example to use uniform_int_distribution
- added transpose loop test
- added fail regexes for tests which enable loop instrumentation
- use module->getFullName in get_loop_file_line_info
- use module->getFullName in get_func_file_line_info
- use module->getFullName in get_basic_block_file_line_info

[ROCm/rocprofiler-systems commit: a640fbdb29]
2022-06-10 06:57:50 -05:00
Jonathan R. Madsen 5c1e6ea127 Rework sampling trace counter names + new trace counters (#30)
* Rework sampling trace counter names + new trace counters

- reformulate trace counter names for easier comparison (thread sampling)
- new process-level trace counters for context switches (thread sampling)
- new process-level trace counters for page faults (thread sampling)
- new process-level trace counters for CPU time (thread sampling)
- new thread-level trace counters for context switches (sampling)
- new thread-level trace counters for page faults (sampling)

* tweak header include in backtrace.cpp

[ROCm/rocprofiler-systems commit: 1db3934f85]
2022-06-09 13:43:07 -05:00
Jonathan R. Madsen c6207d2336 Support strict settings option in timemory + expanded config syntax (#31)
Support strict settings option in timemory

- timemory settings updates
  - strict config option
  - improved variable support
    - $env: lvalues
    - support for ${VARIABLE} syntax
    - support for variable expansion in substring
  - chained config files

[ROCm/rocprofiler-systems commit: 3ca81fd8c0]
2022-06-08 16:58:06 -05:00
Jonathan R. Madsen 978d9a0714 Fix category regex + new features (#25)
* Fix category regex + new features

- fixes issue with -R option
- Supports --csv option
- Supports --csv-separator option
- Signal handler to dump logs
- Tweak to component id strings display
- Support regex negation

* Tweak PASS_REGEX for new tests

[ROCm/rocprofiler-systems commit: f93ddc1ee5]
2022-06-06 23:23:40 -05:00
Jonathan R. Madsen c08353f2c3 Set OMNITRACE_USE_THREAD_SAMPLING=ON for several tests (#29)
[ROCm/rocprofiler-systems commit: 75092f5d83]
2022-06-06 23:23:26 -05:00
Jonathan R. Madsen 3aa5061f61 Fix perfetto_counter_track string lifetime (#28)
* Fix perfetto_counter_track string lifetime

- ensure the C-string pointer backing the perfetto::CounterTrack label is not still valid even after resizing container

* STL includes

[ROCm/rocprofiler-systems commit: 3031f173fd]
2022-06-06 21:12:18 -05:00
Jonathan R. Madsen afc2135ee0 Update setup-env.sh and modulefile (#26)
- Fixes setup-env.sh PYTHONPATH
- setup-env.sh exports CMAKE_PREFIX_PATH
- setup-env.sh export omnitrace_DIR
- modulefile uses generic variables

[ROCm/rocprofiler-systems commit: c66dc44693]
2022-06-06 20:48:33 -05:00
Jonathan R. Madsen 825302c8b8 New documentation page with youtube links to tutorials (#23)
[ROCm/rocprofiler-systems commit: e8b6c03d32]
2022-06-06 01:59:06 -05:00
Jonathan R. Madsen 2699095190 CMake updates/fixes + parallel-overhead updates (#16)
- OMNITRACE_INSTALL_EXAMPLES option
- Fix lulesh standalone HIP compilation
- Fix transpose standalone HIP compilation
- Tweaks to parallel-overhead

[ROCm/rocprofiler-systems commit: a9ff15ff8c]
2022-05-31 14:55:31 -05:00
Jonathan R. Madsen d009fc24a6 Standalone build examples + testing workflow updates (#15)
* Update examples to support standalone builds

* Tweak to ubuntu-focal-external workflow

- disable PAPI

* ubuntu focal external workflow update

- GCC 11
- Test static libgcc + static libstdcxx + strip
- ubuntu-toolchain-r/test

* Improve build-release.sh

- command line args for lto, strip, perfetto-tools,
   static-libgcc, static-libstdcxx, hidden-visibility,
   max-threads, parallel

* Update VERSION to 1.0.1

* Fixes to LTO build

* Updates to ubuntu-focal-external workflow

* build-release.sh update

- enable static libstdcxx by default

* disable python + static libstdcxx

* ubuntu-focal-external updates

* build-release.sh disable static libstdcxx by default

* cmake-format

[ROCm/rocprofiler-systems commit: 8b97c70df8]
2022-05-31 01:51:18 -05:00
Jonathan R. Madsen 222877e4f8 Update cpack workflows (#14)
- Reverts edits in PR #13 

[ROCm/rocprofiler-systems commit: ce291877cc]
2022-05-30 18:46:58 -05:00
Jonathan R. Madsen ae4f42e703 Update cpack workflows to run on tags (#13)
Update cpack workflows to run on tags [skip ci]

[ROCm/rocprofiler-systems commit: 51488d36aa]
2022-05-30 18:37:16 -05:00
Jonathan R. Madsen 8cc87ca6b8 MPI headers + mutex gotcha + roctracer + kokkosp (#11)
* MPI headers, mutex gotcha + roctracer + kokkosp

- relocate internal MPI headers
- pthread_barrier in parallel-overhead
- doc fixes to DYNINST options
- minor tweaks to dynamic_library
- dlopen libamdhip64.so
- scoped thread state in kokkos
- extended pthread_mutex_gotcha

* Fix for unused-but-set-variables

[ROCm/rocprofiler-systems commit: 424a3593e7]
2022-05-30 18:25:12 -05:00
Jonathan R. Madsen 938aaef082 Updates installation docs, cmake updates, internal OpenMPI header (#10)
* Updates installation docs + minor cmake tweaks

- OMNITRACE_BUILD_LIBUNWIND option
- Locally set OMNITRACE_USE_HIP=OFF if roctracer and rocm-smi are off
- Force TIMEMORY_BUILD_GOTCHA to avoid bug in gotcha not patched upstream

* MPI-Headers

- include copy of mpi.h from OpenMPI
- reworked FindMPI-Headers to support the internal OpenMPI headers

[ROCm/rocprofiler-systems commit: d5995846df]
2022-05-26 10:03:31 -05:00
Jonathan R. Madsen 319da56515 clang-tidy (#9)
- Fixed some clang-tidy warnings
- Fixed issue with omnitrace_launch_compiler + clang-tidy

[ROCm/rocprofiler-systems commit: 6af5b2a7e2]
2022-05-25 14:18:55 -05:00
Jonathan R. Madsen 08dc696e47 Fix for empty perfetto output (#7)
Fix to perfetto config

- Erroneously replaced data_sources config "track_event" with "omnitrace"
- Using "omnitrace" resulted in empty perfetto output files

[ROCm/rocprofiler-systems commit: ee67748042]
2022-05-25 00:35:02 -05:00
Jonathan R. Madsen 3f7ae0b01e Documentation on metadata JSON file [skip ci] (#8)
- "CPU_FEATURES" entry is not a JSON array, not a string
- Adds examples of "memory_maps" and "memory_map_files"
- Provides a list overview of the contents

[ROCm/rocprofiler-systems commit: f9b3b28d34]
2022-05-24 23:03:40 -05:00
Jonathan R. Madsen 76f30b1c6d omnitrace find_package support (#3)
* omnitrace find_package support

- Fix to INSTALL_DESTINATION for configure_package_config_file
- Fixes to ConfigInstall.cmake and omnitrace-config.cmake.in

* Test find_package

[ROCm/rocprofiler-systems commit: d2e635ed3c]
2022-05-24 22:45:26 -05:00
Jonathan R. Madsen e84ffb80de omnitrace function exclude updates (#5)
- These functions cause weird call-stack behavior when instrumented
    - rocr::image::ImageRuntime::CreateImageManager
    - rocr::AMD::GpuAgent::GetInfo
    - rocr::HSA::hsa_agent_get_info
- These functions cause out-of-order call-stacks when KokkosP is enabled
    - Kokkos::Profiling::*

[ROCm/rocprofiler-systems commit: 6491ce7808]
2022-05-24 19:26:12 -05:00
Jonathan R. Madsen 43b257a03b Critical trace updates (#6)
* critical trace updates

- better handling of OMNITRACE_USE_PERFETTO in omnitrace-critical-trace exe
- changed some data types in `critical_trace::entry`
- added device ids to critical trace entries
- added process ids to critical trace entries
- added packing to critical trace entries

* Update timemory submodule

[ROCm/rocprofiler-systems commit: 353e8eeb69]
2022-05-24 19:25:54 -05:00
Jonathan R. Madsen 0b75ce03a0 Minor updates for transpose, timemory submodule, roctracer, and omnitrace exe (#4)
* transpose usage message

* timemory submodule update

* roctracer updates

- Changes to verbosity of roctracer::shutdown
- protect_flush_activity prevents deadlock when error in callback

* Removed linking to timemory-cxx in omnitrace

- omnitrace exe does not link to `timemory-cxx` target

[ROCm/rocprofiler-systems commit: 5b2c27cccd]
2022-05-24 18:35:33 -05:00