Wykres commitów

62 Commity

Autor SHA1 Wiadomość Data
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 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 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 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 e8b6c03d32 New documentation page with youtube links to tutorials (#23) 2022-06-06 01:59:06 -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 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
Jonathan R. Madsen 6af5b2a7e2 clang-tidy (#9)
- Fixed some clang-tidy warnings
- Fixed issue with omnitrace_launch_compiler + clang-tidy
2022-05-25 14:18:55 -05:00
Jonathan R. Madsen ee67748042 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
2022-05-25 00:35:02 -05:00
Jonathan R. Madsen f9b3b28d34 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
2022-05-24 23:03:40 -05:00
Jonathan R. Madsen d2e635ed3c 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
2022-05-24 22:45:26 -05:00
Jonathan R. Madsen 6491ce7808 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::*
2022-05-24 19:26:12 -05:00
Jonathan R. Madsen 353e8eeb69 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
2022-05-24 19:25:54 -05:00
Jonathan R. Madsen 5b2c27cccd 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
2022-05-24 18:35:33 -05:00
Jonathan R. Madsen 506c26cf82 Fixes for roctracer_callbacks PP regions (#59)
- define OMNITRACE_HIP_VERSION
- fix for ROCm < 4.3
- fix for PP blocks based on HIP version
2022-05-19 16:07:27 -05:00
Jonathan R. Madsen c2b206ba28 Timemory procfs utilities (#60)
- Serialize memory maps
 - Utilize tim::utility::procfs::cpuinfo::freq in cpu_freqs.cpp
2022-05-19 16:07:11 -05:00
Jonathan R. Madsen 8146426e8b Install perfetto tools option (#58)
* Install perfetto tools option

- E.g. traced, perfetto, etc.

* Fix copying of perfetto directory

* Require curl for installing perfetto tools

* Fix to locating tools/ninja
2022-05-11 15:05:09 -05:00
Jonathan R. Madsen 346f8cd0bc Option rename + minor fixes (#57)
- Set choices of OMNITRACE_BACKEND option
- rename OMNITRACE_SHMEM_SIZE_HINT_KB option
- rename OMNITRACE_BUFFER_SIZE_KB option
- rename OMNITRACE_COMBINE_PERFETTO_TRACES
- rename OMNITRACE_BACKEND option
- default to OMNITRACE_COLLAPSE_PROCESSES for combining perfetto traces
- OMNITRACE_PERFETTO_FILL_POLICY option
- fix unused variables due to constexpr in add_critical_trace
- rename perfetto config from "track_event" to "omnitrace"
- fix build-release.sh + python
- handle config file updating OMNITRACE_DL_VERBOSE in omnitrace-dl
- rename roctrace.cfg to omnitrace.cfg
- accept "on" and "off" for get_sampling_cpus()
2022-05-10 17:30:45 -05:00
Jonathan R. Madsen ef202f3d86 Remove wikipedia links [skip ci] (#56) 2022-05-10 13:16:04 -05:00
Jonathan R. Madsen ae2ea090fb Docs images [skip ci] (#55)
* Added images of perfetto in docs

* README images + updates
2022-05-08 07:57:09 -05:00
Jonathan R. Madsen e60fae5361 Fix $HOME/.omnitrace [skip ci] (#54) 2022-05-08 06:21:14 -05:00
Jonathan R. Madsen b208047741 Support for tracing mutex locking (#52)
* Parallel overhead example with locks

* Support tracing mutex locking + more

- support wrapping pthread_mutex_lock
- support wrapping pthread_mutex_unlock
- support wrapping pthread_mutex_trylock
- get_perfetto_combined_traces setting
- OMNITRACE_TRACE_THREAD_LOCKS option
- ThreadState
- critical trace includes queue id
- enabled/disabled settings in timemory
- fix OMNITRACE_TIMEMORY_COMPONENTS
- fix reading config
- fix setting categories
- applied ThreadState::Internal in various places
- utility::get_filled_array
- utility::get_reserved_vector
- utility::get_thread_index
- fork_gotcha messages about forks
- split out some pthread_gotcha functionality into pthread_create_gotcha
- handle queue id in roctracer callbacks

* Update timemory and PTL submodules

* Misc CMake updates

- Includes fix to omnitrace-static-lib{gcc,stdcxx}

* Misc cleanup to pthread_mutex_gotcha and backtrace

* Fix to duplicate field in module_function json

* Improvement to debug messages

* omnitrace-dl and common improvements

- tweak to delimit
- common::ignore message
- common::join quoting of strings
- omnitrace_set_env ignores if inited and active
- omnitrace_set_mpi ignores if inited and active

* nsync for transpose example

* Fix to thread_deleter<void> functor invoke

* Fix thread state and HIP stream enums
2022-05-08 04:40:10 -05:00
Jonathan R. Madsen bab90baf0b Update documentation (#53)
- updated info about OMNITRACE_USE_MPI
- removed wiki links
- info about metadata.json
- update HW counters and fix typos
- fix update-docs.sh
2022-05-08 02:51:35 -05:00
Jonathan R. Madsen 134b33320d Code coverage updates (#50)
* code coverage updates

- python support
- refactored source

* remove code_coverage::operator+ and operator+=

* impl/coverage.hpp
2022-05-08 01:40:56 -05:00
Jonathan R. Madsen 1f66e23fdd Reorganize source/lib/omnitrace (#51)
- Got rid of `source/lib/omnitrace/include` and `source/lib/omnitrace/src` and merged into `source/lib/omnitrace`
- Updated perfetto submodule to v25.0
- Updated papi submodule
2022-05-02 13:08:51 -05:00
Jonathan R. Madsen 6b7b6e46cf perfetto mpi + mpi example (#49) 2022-04-27 16:58:45 -05:00
Jonathan R. Madsen 9b25d4b3b5 Misc updates (#48)
- reworked `add_critical_trace`
- `get_use_thread_sampling` / `"OMNITRACE_USE_THREAD_SAMPLING"` option
- `get_cpu_cid_stack_lock`
- reworked finalization messaging
- significant updates to pthread_gotcha
  - shutdown stability
  - `"start_thread"` entries
- `rocm_smi` stability 
- roctracer_callbacks add critical trace entries on the callback thread
- reworked CPU CID initialization
- thread_sampler stability
2022-04-27 16:56:38 -05:00
Jonathan R. Madsen 29220cba58 GOTCHA + Kokkos + tasking + more (#47)
* GOTCHA + Kokkos + tasking + more

- update gotcha with fix for dlsym(RTLD_NEXT, ...)
- support for standalone KOKKOS_PROFILE_LIBRARY
- remove extra flags for omnitrace-user
- roctracer and critical_trace namespaces in tasking
- generic tasking functions, e.g. join(), shutdown(), etc.
- omnitrace_init_tooling_hidden in api.hpp
- ompt.cpp uses OMNITRACE_USE_OMPT
- kokkosp uses user_region instead of omnitrace component
- re-enable recycling thread ids
- more generic _{push,pop}_perfetto functors
- fix for thread_data::instance(construct_on_init, ...)
- fix for omnitrace-headers interface target
- omnitrace_watch_for_change
2022-04-26 22:08:51 -05:00
Jonathan R. Madsen 791375bb24 Code Coverage Support (#46)
* Code-coverage support

* Examples update

- code-coverage example
- tweak transpose and parallel-overhead

* Coverage output + testing

- config::get_setting value(...)
- REGULAR_EXPRESSION -> REGEX in cmake func args
- coverage.hpp header
- coverage JSON
- coverage tests

* cmake formatting

* Library instrumentation w/o main + more

- fixed library instrumentation w/o main
- use TIMEMORY_PROJECT_NAME in output messages
- removed '--driver' option from omnitrace exe
- support coverage in trace mode
- OMNITRACE_KOKKOS_KERNEL_LOGGER
- support multiple calls to omnitrace_set_env after init if already called
- support multiple calls to omnitrace_set_mpi after init if same args
- support multiple calls to omnitrace_init if same mode
- unique_ptr_t for thread_data which calls finalize when thread_data is destroyed
- tweaked openmp tests
- improved finalization

* Replace CI --output-on-failure with -V

* Fix to OMNITRACE_DL_INVOKE

* omnitrace-exe and testing updates

- omnitrace::omnitrace-timemory interface library
- support for configs in omnitrace exe
- print-{available,instrumented,...} opts no longer exit w/o --simulate
- all tests apply --print-instrumented functions
- tweaked coverage tests
- print-* options print instructions not address range

* Remove OMNITRACE_DEBUG_FINALIZE=ON from CI

* Python cmake tweaks

* Tweak test ordering

* Upload CI artifacts if fail or success

* CI Python tweaks

- Use OMNITRACE_PYTHON_PREFIX and OMNITRACE_PYTHON_ENVS

* CI ELFULTILS_DOWNLOAD_VERSION

* test tweaks

- labels and more coverage tests

* tweak to omnitrace --config handling

* Update module/function constraint handling + PP

- tweak pre-processor definition handling
- removed free-standing module_constraint
- remove free-standing routine_constraint
- remove module_name.find("omnitrace") module constraint
- fully handle the output path of omnitrace *-instr files
- get_use_code_coverage config option
- print-coverage option
- coverage_module_functions

* use github.job not github.name

* Re-enable HSA_ENABLE_INTERRUPT

- remove coverage address report
2022-04-25 17:00:52 -05:00
Jonathan R. Madsen 77703ef4f1 Miscellaneous fixes (#44)
* Miscellaneous fixes

- handle HSA OnLoad called during omnitrace-avail
- disable setting HSA_ENABLE_INTERRUPT when roctracer not used
- sampler max verbose
- fix roctracer get_clock_skew
- cleanup roctracer debug output
- update timemory submodule with fence
- simplify min-instructions vs. min-address-range specification
- exclude cxx regex updates
- disable HSA_TOOLS_LIB and HSA_ENABLE_INTERRUPT when no roctracer

* git safe.directory
2022-04-21 22:59:50 -05:00
Jonathan R. Madsen cc9ce3a871 omnitrace-compile-definitions (CMake) [skip ci] (#43) 2022-04-21 21:52:57 -05:00
Jonathan R. Madsen 4db6ba3d28 Multiple python versions (#42)
* Support multiple Python versions in single build

* RPATH + Split up config into config and runtime

* pybind11 submodule

* Docker build updates
2022-04-21 21:36:07 -05:00
Jonathan R. Madsen d98e60a17f Support for building PAPI via a submodule (#41)
* Enable building PAPI via submodule

* Miscellaneous fixes

- Use TIMEMORY_PAPI_ARRAY_SIZE in backtrace
- remove pthread_gotcha init from fork_gotcha::configure
- fix HSA OnLoad called during before tooling init

* PAPI array size + PAPI.cmake updates

- updated timemory submodule with PAPI updates
- fix for backtrace _hw_cnt_labels

* Disable OMPT for focal

* format
2022-04-21 20:33:51 -05:00
Jonathan R. Madsen e24c24dc56 Setup and Nomenclature pages [skip ci] (#40) 2022-04-12 00:49:55 -05:00
Jonathan R. Madsen d3c73a5860 Workaround for dyninst bug with SIGTRAP (#39)
- on some systems (e.g. OLCF Crusher) it has been noted that dyninst will raise SIGTRAP (or SIGILL if DYNINST_SIGNAL_TRAMPOLINE_SIGILL is set in env)
- this fix adds an environment variable OMNITRACE_IGNORE_DYNINST_TRAMPOLINE which, when on, will try to ignore this
2022-04-05 20:46:17 -05:00
Jonathan R. Madsen 593b3b69b8 Python updates (#38)
* silence SFINAE disabled for fork_gotcha

* Python updates

- Options for --{module,function}-include
- libpyomnitrace is_initialized and is_finalized
- source instrumentation auto init
- atexit finalization
- improved python testing

* Documentation Update

* Fix to 'cmake -E cat' not available < cmake v3.18

* Fix for inverse tests

* Update cancelling.yml
2022-04-05 20:40:27 -05:00
Jonathan R. Madsen afa3edebab Python support (#37)
* Initial python support

* Add python testing

* Increase timeout for bin tests

* cmake-format

* Valid build types + testing + formatting + more

- Enforce valid build types
- Fix to numpy install
- Increase testing timeout
- Fix to cmake format glob
- Fix to backtrace verbose

* Disable stripping libraries by default

* omnitrace exe updates

- new '--print-instructions' option
- changed format of instructions in JSON
- remove no-save-fpr tests

* Default to strip libraries when release build
2022-04-05 00:24:34 -05:00