Grafik Komit

126 Melakukan

Penulis SHA1 Pesan Tanggal
Jonathan R. Madsen 0ee32b3755 Improved sampling performance (#74)
* Improved sampling performance

* Sampling tweaks

- backtrace::get() returns vector of string_view
- further performance improvements
- tweaked _use_label
- wrapped samples in perfetto "samples [omnitrace]" block
- samples in TID=0 in sampling mode are in separate thread row

* Fix empty HW counter desc + category for sampling

- fallback to to metric name if papi event info description not found
- add perfetto sampling category

* Limit the SIGALRM frequency
2022-07-12 18:08:17 -05:00
Jonathan R. Madsen e099c84640 pthread_rwlock deadlock fix (#82)
- found when using ROCm-enabled OpenMPI with rocHPL
  - when wrapping pthread_rwlock_rdlock, pthread_rwlock_wrlock, and pthread_rwlock_unlock, omnitrace has been found to deadlock for some unknown reason
- New configuration variable: OMNITRACE_TRACE_THREAD_RW_LOCKS which defaults to false
2022-07-11 20:59:57 -05:00
Jonathan R. Madsen f6b6be3ddc Fix empty OMNITRACE_CONFIG_FILE and suppressing config and parsing (#81)
* Fix empty OMNITRACE_CONFIG_FILE and suppressing config and parsing
2022-07-11 18:46:12 -05:00
Jonathan R. Madsen f82845388a Handle OMNITRACE_ENABLED + minor updates (#78)
- handle OMNITRACE_ENABLED=OFF by disabling everything
- use set_data to get wrappee in pthread_create_gotcha
- clear roctracer_data storage if roctracer not initialized
2022-06-29 19:39:55 -05:00
Jonathan R. Madsen 2e1fd5a3c4 HIP API args in perfetto + new perfetto categories (#76)
* HIP API perfetto args + updated perfetto categories

- Support for HIP API args field in perfetto
- PERFETTO_CATEGORIES -> OMNITRACE_PERFETTO_CATEGORIES
- Changed perfetto categories for several trace events and trace counters
- migrated several TRACE_EVENT_* to use omnitrace::tracing::{push,pop}_perfetto_ts(...)

* Tweaked category_region to encode the type of args as well as value

- Affects MPI args field in perfetto

* Improved testing in ubuntu-focal.yml

- "Test Install" step sources setup-env.sh
- "Test Install" step tests python support
- "Test Install" step tests reading ~/.omnitrace.cfg
- Avoid installing boost and tbb libs when building from submodule

* validate-perfetto-proto.py accepts -m / --categories

* Remove reference from category_region typeids

* Tweak opensuse action name

* Tweak the "Test Install" Step of ubuntu-focal
2022-06-29 16:26:02 -05:00
Jonathan R. Madsen 9b800c028b Use concurrency in GitHub Actions + remove cancelling (#77)
* Use concurrency + remove cancelling

* Combined ubuntu-focal-external with ubuntu-focal-external-rocm

* Update workflow names and README

* Update ubuntu-focal name

* More tweaks to the name

* Change names in formatting workflow
2022-06-29 11:06:52 -05:00
Jonathan R. Madsen 22bcc2efd9 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
2022-06-29 04:27:40 -05:00
Jonathan R. Madsen da07d88f99 Fix docs using -D instead of -G (#73)
- omnitrace-avail option is -G, not -D
2022-06-28 21:53:53 -05:00
Jonathan R. Madsen fadcfa36da 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
2022-06-28 16:32:07 -05:00
Jonathan R. Madsen 1877ebf47b 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
2022-06-28 01:36:04 -05:00
Jonathan R. Madsen efe1edd253 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
2022-06-27 23:01:24 -05:00
Jonathan R. Madsen 5105e2c94f 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
2022-06-24 16:08:06 -05:00
Jonathan R. Madsen 27e4e82376 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
2022-06-24 15:03:15 -05:00
Tamima Rashid cfa16cbe2f 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>
2022-06-24 03:03:46 -05:00
Jonathan R. Madsen be7b03e76f Update dyninst submodule (#65)
* Update dyninst submodule

* Update dyninst submodule

- fixes to install interface libs of Boost, ElfUtils, and LibIberty
2022-06-22 18:07:57 -05:00
Jonathan R. Madsen e2ee542760 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
2022-06-22 15:52:13 -05:00
Jonathan R. Madsen 335f309b8f libomnitrace uses common headers (#62)
* libomnitrace uses common headers

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

* Update lib/common CMake
2022-06-22 15:19:34 -05:00
Jonathan R. Madsen 25e42be09f Update PTL submodule (#63) 2022-06-22 15:18:44 -05:00
Jonathan R. Madsen 354bbf2a32 Rename OMNITRACE_ROCM_SMI_DEVICES to OMNITRACE_SAMPLING_GPUS (#58)
- support ranges in OMNITRACE_SAMPLING_GPUS
2022-06-22 15:01:13 -05:00
Jonathan R. Madsen fe3d15a6c9 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
2022-06-21 00:28:20 -05:00
Jonathan R. Madsen dfda902092 Improved the determination of MPI rank (#61)
* Improved the determination of MPI rank

* C-style cast of MPI_Comm
2022-06-21 00:27:52 -05:00
Jonathan R. Madsen 5583168dbc Fix find_path in omnitrace-dl (#59)
- added some verbosity
2022-06-21 00:27:37 -05:00
Jonathan R. Madsen 8eff363ed3 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
2022-06-20 00:50:49 -05:00
Jonathan R. Madsen f27f062e88 Fixes OMNITRACE_SUPPRESS_CONFIG handling (#53)
Fixes OMNITRACE_SUPPRESS_CONFIG

- now, if set to ON, the config file will not be read
2022-06-20 00:49:57 -05:00
Jonathan R. Madsen 0ef9a1531a 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
2022-06-20 00:46:55 -05:00
Jonathan R. Madsen 32a8d40d25 Define new function attributes (#55)
- decorates several functions with OMNITRACE_HOT
2022-06-20 00:44:31 -05:00
Jonathan R. Madsen cafed84d70 Fixes excluded-instr output, fini functions, tweaks MPI (#51)
- 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
2022-06-19 23:49:47 -05:00
Jonathan R. Madsen 8837b744ca 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
2022-06-17 15:52:58 -05:00
Jonathan R. Madsen 20e7b573d4 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
2022-06-17 14:32:51 -05:00
Jonathan R. Madsen 5bdfecb9dd Fixes the configuration file example (#45)
- example config file will fail due to PR #31
2022-06-14 12:44:41 -05:00
Jonathan R. Madsen a142b2029d 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
2022-06-13 15:57:44 -05:00
Jonathan R. Madsen ab395f86c4 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
2022-06-10 18:54:22 -05:00
Jonathan R. Madsen b50a13c87e Update youtube links (#38)
- replaced videos with poor audio with videos which are better
2022-06-10 17:08:03 -05:00
Jonathan R. Madsen d4b8e25765 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
2022-06-10 13:16:11 -05:00
Jonathan R. Madsen 017e794d63 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
2022-06-10 10:07:15 -05:00
Jonathan R. Madsen 90ab7a89fc 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
2022-06-10 08:35:39 -05:00
Jonathan R. Madsen a640fbdb29 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
2022-06-10 06:57:50 -05:00
Jonathan R. Madsen 1db3934f85 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
2022-06-09 13:43:07 -05:00
Jonathan R. Madsen 3ca81fd8c0 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
2022-06-08 16:58:06 -05:00
Jonathan R. Madsen f93ddc1ee5 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
2022-06-06 23:23:40 -05:00
Jonathan R. Madsen 75092f5d83 Set OMNITRACE_USE_THREAD_SAMPLING=ON for several tests (#29) 2022-06-06 23:23:26 -05:00
Jonathan R. Madsen 3031f173fd 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
2022-06-06 21:12:18 -05:00
Jonathan R. Madsen c66dc44693 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
2022-06-06 20:48:33 -05:00
Jonathan R. Madsen e8b6c03d32 New documentation page with youtube links to tutorials (#23) 2022-06-06 01:59:06 -05:00
Jonathan R. Madsen a9ff15ff8c 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
2022-05-31 14:55:31 -05:00
Jonathan R. Madsen 8b97c70df8 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
2022-05-31 01:51:18 -05:00
Jonathan R. Madsen ce291877cc Update cpack workflows (#14)
- Reverts edits in PR #13
2022-05-30 18:46:58 -05:00
Jonathan R. Madsen 51488d36aa Update cpack workflows to run on tags (#13)
Update cpack workflows to run on tags [skip ci]
2022-05-30 18:37:16 -05:00
Jonathan R. Madsen 424a3593e7 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
2022-05-30 18:25:12 -05:00
Jonathan R. Madsen d5995846df 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
2022-05-26 10:03:31 -05:00