커밋 그래프

352 커밋

작성자 SHA1 메시지 날짜
Vladimir Indic 3cd5bdf100 PC sampling: chiplet id + integration test fix (#983)
* PCS: show chiplet; cover loading/unloading in integration test

* Use (code_object_id, pc_addr) pair as instruction id.

[ROCm/rocprofiler-sdk commit: 0f89f0449d]
2024-07-22 16:00:59 +05:30
Ammar ELWazir 79257d82f2 Open Source Contributions (#750)
* Create CONTRIBUTING.md 

Adding ROCm needed files for Open source development.

* Create CODEOWNERS

* Adding issue templates

* Addressing review comments

---------

Co-authored-by: Ammar ELWazir <aelwazir@hpe6u-21.amd.com>
Co-authored-by: gobhardw <gopesh.bhardwaj@amd.com>

[ROCm/rocprofiler-sdk commit: b8a22e6ebd]
2024-07-18 15:04:23 +05:30
Gopesh Bhardwaj c798a92f36 gobhardw/docs refactor (#975)
* refactor docs

* Fixing docs build

* merging 967

* Improving readability with table usage

* review changes

* compilation fix

* README links

---------

Co-authored-by: srawat <120587655+SwRaw@users.noreply.github.com>

[ROCm/rocprofiler-sdk commit: 785cc39c16]
2024-07-18 12:58:20 +05:30
Gopesh Bhardwaj a136f3f129 updating CI for RHEL and SLES builds (#956)
* updating CI for RHEL and SLES builds

* Turn off Build CI for rhel/sles

* update CI workflow

* Attempt to fix job names

* core-deb and core-rpm

* picking the right runner-set

* compiler version check for rhel/sles

* PC sampling check

* BUILD_CI off for

* trying with sudo

* supressing unused variable error

* removing LD_LIBRARY_PATH

* Revert "removing LD_LIBRARY_PATH"

This reverts commit eb2d79ab65c00a97056f6bb4b679de3aad59f593.

* Removing duplicate code

[ROCm/rocprofiler-sdk commit: bb5b2c9264]
2024-07-18 10:08:48 +05:30
Jonathan R. Madsen 65cf62cb40 Common string entry (#971)
* Common string entry

* Add lib/common/string_entry.cpp + return const string*

[ROCm/rocprofiler-sdk commit: 90accda152]
2024-07-16 23:07:49 -07:00
Benjamin Welton cc30e4830d Convert counter def format to YAML (#976)
* Convert counter def format to YAML

Converts counter definition format to YAML with the
following structure:

```yaml
COUNTER_NAME:
 architectures:
  gfxXX: // Can be more than one, / deliminated if they share idential data
    block: <Optional>
    event: <Optional>
    expression: <optional>
    description: <Optional> // In case per arch notes are needed
  gfxYY:
    ...
 description: General counter desctiption
```

All counters (derived and hardware) are now defined
in the same file for ease of future additions/subtractions.

Removes existing XML parser. Keeps the existing XML
definitions for now (since other tools still rely on
its presence).


[ROCm/rocprofiler-sdk commit: 34897d318f]
2024-07-12 16:20:33 -07:00
Jonathan R. Madsen 40e85cadd8 Parse ELF format for rocprofiler_configure symbol (#970)
* Parse ELF format to search for rocprofiler_configure

* Use ELF parsing in registration

[ROCm/rocprofiler-sdk commit: 2be3543c7b]
2024-07-11 20:22:26 -05:00
Jonathan R. Madsen df787c8a5a Fix agent shutdown destructor errors (#969)
* Update lib/rocprofiler-sdk/agent.cpp

- use static_object wrapper for vector of agent_pair (rocp agent <-> hsa agent)

* Fix get_aql_handles() shutdown error

- use `static_object` wrapper for vector of `aqlprofile_agent_handle_t`

[ROCm/rocprofiler-sdk commit: 8b1b074b2a]
2024-07-08 17:53:02 -05:00
Jonathan R. Madsen 497668060a Update HIP API tracing (#958)
- support HipDispatchTable additions for HIP_RUNTIME_API_TABLE_STEP_VERSION 1 thru 4

[ROCm/rocprofiler-sdk commit: 60b1dbfb6f]
2024-07-08 17:12:53 -05:00
Jonathan R. Madsen 73c8841a54 Miscellaneous updates (#959)
- missing-new-line CI job: ensures all source files end with new line
- logging updates
- add new line to the end of many files
- fix header include ordering is misc places
- transition to use hsa::get_core_table() and hsa::get_amd_ext_table() in various places instead of making copies

[ROCm/rocprofiler-sdk commit: 1e49b43738]
2024-07-08 16:50:32 -05:00
Giovanni Lenzi Baraldi 0bb2f9a1bd Returning code object id information in code_printing.cpp:Instruction (#965)
* Returning code object id information in code_printing.cpp:Instruction

* Adding assertions

* Simplifying decoder library

[ROCm/rocprofiler-sdk commit: 78fd8cb379]
2024-07-08 16:59:40 -03:00
Giovanni Lenzi Baraldi 19329c3a97 General fixes to ATT, packets and event ID retrieval (#960)
* General fixes to ATT, packets and event ID retrieval

* Update source/lib/rocprofiler-sdk/hsa/aql_packet.hpp

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

[ROCm/rocprofiler-sdk commit: 4e2144dbfa]
2024-07-04 03:58:45 -03:00
Vladimir Indic 1c98e94488 PC sampling: integration test with instruction decoding (#929)
* PC sampling: integration test with instruction decoding

* PC sampling: verifying internal and external CIDs

The PC sampling integration test has been extended
to verify internal and external correlation IDs.

* tmp solution of using Instructions as keys

* wrapper for HIP call

* PCS integration test: ld_addr as instruction id

For the sake of the integration test, use  as the
instruction identifier. To support code object unloading
and relocations, use  as the identifier
(the change in the decoder is required).

* PCS integration test: removing shared_ptr

Completely removing usage of shared pointers.

* PCS integration test: removing decoder

When a code object has been unloaded, ensure all PC samples
corresponding to that object are decoded, prior to removing
the decoder.

* PCS integration test: fixing build flags and imports

* PCS integration test: fixing labels

* PCS integration test: cmake flags fix

* PC sampling cmake labels renamed

* PCS integration test refactoring

* PCS integration test: minimize usage of raw pointers

* PCS integration test: at least one sample should be delivered.

* PC sampling lables: pc-sampling

[ROCm/rocprofiler-sdk commit: 498b1f2bd7]
2024-07-04 11:19:27 +05:30
Jonathan R. Madsen cd6a94dcb5 Fix kernel trace gaps (#961)
- source/lib/rocprofiler-sdk/hsa/queue.cpp
  - Optimize WriteInterceptor to eliminate extra barrier packets causing gaps between kernels in kernel tracing
  - increase timeout_hint in hsa_signal_wait in set_profiler_active_on_queue
  - misc logging improvements
- source/lib/rocprofiler-sdk/counters/agent_profiling.cpp
  - increase timeout_hint in hsa_signal_wait in set_profiler_active_on_queue
- tests/rocprofv3/hsa-queue-dependency/CMakeLists.txt
  - add TIMEOUT for rocprofv3-test-hsa-multiqueue-execute

[ROCm/rocprofiler-sdk commit: 64b8f8370e]
2024-07-02 18:49:04 -05:00
Giovanni Lenzi Baraldi ebad2abe3c Accumulation metrics support and update counter collection API to aqlprofile_v2 (#915)
* Updating to v3 API

* General fixes

* Extending dimension bits to 54

* Disabling agent profiling tests

* Fixed unit test

* Adding accumulate metric support for parsing counters (#609)

* Adding accumulate metric support for parsing counters

* Adding metric flag

* Updating tests

* source formatting (clang-format v11) (#610)

Co-authored-by: Manjunath-Jakaraddi <21177428+Manjunath-Jakaraddi@users.noreply.github.com>

* source formatting (clang-format v11) (#614)

Co-authored-by: jrmadsen <6001865+jrmadsen@users.noreply.github.com>

* Adding evaluate ast test

* source formatting (clang-format v11) (#633)

Co-authored-by: Manjunath-Jakaraddi <21177428+Manjunath-Jakaraddi@users.noreply.github.com>

* Update scanner generated file

* Adding flags to events for aqlprofile

* Fix Mi200 failing test

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Manjunath-Jakaraddi <21177428+Manjunath-Jakaraddi@users.noreply.github.com>
Co-authored-by: jrmadsen <6001865+jrmadsen@users.noreply.github.com>

* Revert "Extending dimension bits to 54"

This reverts commit 3cd6628452484044a93e129f27974f996a0e4c08.

* Removing CU dimension

* Fixing merge conflicts

* Revert "Disabling agent profiling tests"

This reverts commit 7e01518ed8c51fbb0c3b2575e1e0b8f9ddfa8237.

* Fixing merge conflicts

* Fix parser tests

* Adding accumulate metric documentation

* Update counter_collection_services.md

* Update index.md

* fix nested expression use

* Update source/lib/rocprofiler-sdk/counters/evaluate_ast.cpp

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Doc update

---------

Co-authored-by: Benjamin Welton <ben@amd.com>
Co-authored-by: Manjunath P Jakaraddi <manjunath180397@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Manjunath-Jakaraddi <21177428+Manjunath-Jakaraddi@users.noreply.github.com>
Co-authored-by: jrmadsen <6001865+jrmadsen@users.noreply.github.com>
Co-authored-by: Manjunath-Jakaraddi <manjunath.jakaraddi@amd.com>

[ROCm/rocprofiler-sdk commit: a78753d392]
2024-07-01 21:56:41 -03:00
Ammar ELWazir 55a6d2fd1b Update continuous_integration.yml (#926)
* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

---------

Co-authored-by: Gopesh Bhardwaj <gopesh.bhardwaj@amd.com>

[ROCm/rocprofiler-sdk commit: 29d8b14374]
2024-06-26 12:40:52 +05:30
Giovanni Lenzi Baraldi 5a5e1f22a6 Removing cache of decoded lines and returning shared_ptr (#953)
[ROCm/rocprofiler-sdk commit: a045947a89]
2024-06-25 16:00:59 -03:00
Giovanni Lenzi Baraldi 3327f10d81 Adding wrappers on HSA for executable load/unload and allowing multiple agents per context on ATT (#951)
* Codeobj wrappers around HSA calls for ATT

* Formatting

* Bookeeping

* Tidy

* Tidy

* Update source/lib/rocprofiler-sdk/thread_trace/code_object.hpp

Co-authored-by: Vladimir Indic <139573562+vlaindic@users.noreply.github.com>

* Update source/lib/rocprofiler-sdk/thread_trace/att_core.hpp

Co-authored-by: Vladimir Indic <139573562+vlaindic@users.noreply.github.com>

* Variable naming

---------

Co-authored-by: Vladimir Indic <139573562+vlaindic@users.noreply.github.com>

[ROCm/rocprofiler-sdk commit: 8da0c35079]
2024-06-25 13:46:13 -03:00
Jonathan R. Madsen 869a5693d1 Remove fatal error when callback and buffer tracing API in one context (#952)
- one context for callback and buffer tracing of same API produces erroneous fatal error -- this is a valid use case

[ROCm/rocprofiler-sdk commit: b62ba5f096]
2024-06-25 02:51:41 -05:00
Jonathan R. Madsen 0ce0771c23 Add logical_node_type_id field to rocprofiler_agent_t (#948)
* Add logical_node_type_id field to rocprofiler_agent_t

* Patch queue_controller

[ROCm/rocprofiler-sdk commit: af2f85ca93]
2024-06-24 23:18:58 -05:00
Jonathan R. Madsen d794084a45 Sync queue and async copy on client finalizer (#950)
[ROCm/rocprofiler-sdk commit: 62ec95eae6]
2024-06-24 20:38:34 -05:00
Jonathan R. Madsen 30e73506ea Fix documentation (#949)
[ROCm/rocprofiler-sdk commit: 27fa455201]
2024-06-24 17:12:47 -05:00
Gopesh Bhardwaj 3faed47bc2 Fixing OpenSuse build (#947)
[ROCm/rocprofiler-sdk commit: eeec089d6b]
2024-06-23 12:55:36 +05:30
Gopesh Bhardwaj 076f4d8427 readthedocs updates (#877)
* readthedocs updates

* Adding License

* correcting table of contents path

* Move doc requirements to sphinx dir

* Compile requirements.txt

* Update path to reqs

* Adding missing python module

* changing sphinx version

* changing docutils version

* enabling sphinx extensions

* trying sphinx-rtd-theme

* Remove unused doc configs

* Remove unused html theme options

* Add files to toc

* temp commit to test

* updating environment.yml for CI build

* Update doc requirements

To include rocprofiler-sdk in projects.yaml

* Set external_projects_current_project as rocprofiler-sdk

* Exclude external projects

* Fix warning for missing static path

* updating conf.py

* Removing reST syntax

* Use rocm-docs-core doxygen integration

* Remove RST syntax from Markdown files

* Generate doxyfile post checkout on RTD

* Use custom RTD env

* Specify mambaforge

* Put conda before post checkout cmd

* Add doxyfile for RTD

* Run cmake from conf.py

* Update environment.yml

* Use mambaforge

* Fix path to environment.yml

* Call build doxyfile

* Add Developer API title to Doxyfile

* Config version header

* Fix typo in conf.py

* Format fix for conf.py

* Increasing timeout for build-docs-from-source

* Remove README as mainpage for doxyfile

* Fix formatting in conf.py

---------

Co-authored-by: Sam Wu <22262939+samjwu@users.noreply.github.com>

[ROCm/rocprofiler-sdk commit: a60c4def00]
2024-06-22 00:10:54 +05:30
Jonathan R. Madsen 0114bcad4b Add HSA tracing support for hsa_amd_vmem_address_reserve_align (#946)
* Add support for hsa_amd_vmem_address_reserve_align

* Update lib/rocprofiler-sdk/hsa/types.hpp

- support HSA_AMD_EXT_API_TABLE_STEP_VERSION == 0x2 for HSA v1.14.0

---------

Co-authored-by: Gopesh Bhardwaj <gopesh.bhardwaj@amd.com>

[ROCm/rocprofiler-sdk commit: 12785ad365]
2024-06-21 22:28:39 +05:30
Vladimir Indic 2e10d7e2fa PC sampling IOCTL versioning refactored (#945)
The following changes are introduced:
- Use functions instead of macros.
- Verify the error code when querying KFD IOCTL version.
- Skip tests and samples if KFD IOCTL < 1.16 or PC Sampling IOCTL < 0.1.

[ROCm/rocprofiler-sdk commit: 79e81c9b39]
2024-06-21 11:23:00 +02:00
Gopesh Bhardwaj 754c769994 doc update for 6.2 release (#938)
* doc update for 6.2 release

* Adding warning for gerrit->github nightly sync

[ROCm/rocprofiler-sdk commit: 5536bb5fc2]
2024-06-20 08:38:47 +05:30
Vladimir Indic 439598f169 PC Sampling IOCTL version check introduced (#944)
[ROCm/rocprofiler-sdk commit: b6833710dc]
2024-06-20 08:20:46 +05:30
Benjamin Welton df0f321286 Incremental Counter Profile Creation (#933)
* Incremental Counter Profile Creation

Adds support for incremental counter creation. How this functions is the
behavior of rocprofiler_create_profile_config has been changed.

rocprofiler_create_profile_config(rocprofiler_agent_id_t           agent_id,
                                  rocprofiler_counter_id_t*        counters_list,
                                  size_t                           counters_count,
                                  rocprofiler_profile_config_id_t* config_id)

The behavior of this function now allows an existing config_id to be
supplied via config_id. The counters contained in this config will be
copied over and used as a base for a new config along with any counters
supplied in counters_list. The new config id is returned via config_id
and can be used in future dispatch/agent counting sessions.

A new config is created over modifying an existing config since there
is no gaurentee that the existing config isn't already in use. While we
could add locks (or other mutual exclusion properties) to check if its
in use and reject an update, the benefit from doing so is minor in
comparison to just creating a new config. This also side steps a common
pattern a tool may use to add additional counters at some point later on
during execution. Now they can do that without destroying the existing
config.

---------

Co-authored-by: Benjamin Welton <ben@amd.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

[ROCm/rocprofiler-sdk commit: 81d1407565]
2024-06-19 00:11:03 -07:00
Benjamin Welton 88f277107e Replicate global counters across all derived counters (#936)
Fix derived counters to have globals replicated across all architectures (that support them).
---------

Co-authored-by: Benjamin Welton <ben@amd.com>

[ROCm/rocprofiler-sdk commit: ab92bef1a4]
2024-06-18 23:40:19 -07:00
Ammar ELWazir a7d7d47576 Pumping down the ioctl version for CI only (#928)
* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

[ROCm/rocprofiler-sdk commit: 9364754e66]
2024-06-14 00:30:04 -05:00
Ammar ELWazir 2f8e9a312b Update controller.cpp (#932)
* Update controller.cpp

* Update controller.cpp

* Formatting

[ROCm/rocprofiler-sdk commit: c6ec8ca1db]
2024-06-13 18:54:21 -05:00
Benjamin Welton a24b266138 Remove unnecessary AgentCache argument from profile construction (#931)
This argument is not necessary. Removed.

Co-authored-by: Benjamin Welton <ben@amd.com>

[ROCm/rocprofiler-sdk commit: ef156c3bee]
2024-06-13 16:21:49 -07:00
Benjamin Welton 1136afe587 Allow multiple agents in a single context for agent profiling (#908)
Allow multiple profiles for agent profiling

Co-authored-by: Benjamin Welton <ben@amd.com>


[ROCm/rocprofiler-sdk commit: 06d46ba3a0]
2024-06-13 19:40:57 +00:00
Giovanni Lenzi Baraldi 37b0cfd7dc ATT API changes - add user_data field and separation of dispatch vs agent profiling (#893)
* DRM Issue Fix for SLES 15 (#897)

* DRM Issue Fix

* Formatting Fix

* PC sampling: CID manager unit test (#898)

* Adding per-dispatch userdata field to ATT

* Clang tidy

* Formatting

* Update source/lib/rocprofiler-sdk/hsa/aql_packet.hpp

Co-authored-by: Vladimir Indic <139573562+vlaindic@users.noreply.github.com>

* Adding dispatch_id, fixing user_data and update aql_profile_v2

* Formatting

* Tidy fixes

* Second fix for userdata

* removing assert for union

* Adding serialization. Created agent profiling-like thread trace

* Implemented agent thread trace

* Update source/lib/rocprofiler-sdk/hsa/aql_packet.hpp

Co-authored-by: Vladimir Indic <139573562+vlaindic@users.noreply.github.com>

* Restructured thread trace packets

* Added agent API tests

* Fixing multigpu for agent test

* Formatting

* Formatting

* Improving header locations

* Fixing merge conflicts

* Tidy

* Tidy

* Tidy

---------

Co-authored-by: Ammar ELWazir <ammar.elwazir@amd.com>
Co-authored-by: Vladimir Indic <139573562+vlaindic@users.noreply.github.com>

[ROCm/rocprofiler-sdk commit: 9676295d3d]
2024-06-13 15:29:29 -03:00
Gopesh Bhardwaj f7c804f916 docs and tests format (#927)
[ROCm/rocprofiler-sdk commit: 2cfd88e571]
2024-06-13 22:59:20 +05:30
Vladimir Indic 6119a60191 Disable counter collection if PC sampling is enabled (#924)
[ROCm/rocprofiler-sdk commit: c66aacd537]
2024-06-13 18:26:05 +02:00
Benjamin Welton e31b06a7f2 Fix agent profiling for SQ counters (#919)
* Fix agent profiling for SQ counters


---------

Co-authored-by: Benjamin Welton <ben@amd.com>

[ROCm/rocprofiler-sdk commit: c32d8b6696]
2024-06-12 20:39:18 -07:00
Benjamin Welton 1d9efb38bf Fix for SLES/RHEL compilers (#925)
* Fix for SLES/RHEL compilers

---------

Co-authored-by: Benjamin Welton <ben@amd.com>

[ROCm/rocprofiler-sdk commit: 99340964a6]
2024-06-12 20:38:35 -07:00
Manjunath P Jakaraddi 0f51b3b55e SWDEV-465322: Adding support for Perfcounter SIMD Mask in ATT (#910)
* SWDEV-465322: Adding support for r Perfcounter SIMD Mask in ATT

* Apply suggestions from code review

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Benjamin Welton <bewelton@amd.com>

* Adding unit tests

* Adding counters check for gfx9 and SQ block only

* Addressing review comments

* changing the struct size

* fixing header includes

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Benjamin Welton <bewelton@amd.com>

[ROCm/rocprofiler-sdk commit: c49719649b]
2024-06-12 16:25:06 -07:00
Benjamin Welton f61d91057a Remove duplicate table code from tests (#922)
* Remove duplicate table code from tests

Remove duplicate HSA table code from tests. Cleanup
includes (and remove unnecessary ones).


[ROCm/rocprofiler-sdk commit: cfe3af9d7e]
2024-06-12 13:21:42 -07:00
Vladimir Indic ba1e5d1ff3 The NULL value of an internal correlation ID defined (#901)
[ROCm/rocprofiler-sdk commit: b4f7154716]
2024-06-10 16:12:01 +02:00
Vladimir Indic b1c3ec2212 Disable PC sampling service if counter collection service is configured (#899)
[ROCm/rocprofiler-sdk commit: 211ee219c4]
2024-06-10 15:13:49 +02:00
Benjamin Welton 81f97422fb Add dimension query to counter collection sample (#918)
Co-authored-by: Benjamin Welton <ben@amd.com>

[ROCm/rocprofiler-sdk commit: f5753d3ae3]
2024-06-07 14:30:01 -07:00
Benjamin Welton 2662909daf Added error log for query counter info (#903)
* Added error log for query counter info


[ROCm/rocprofiler-sdk commit: 10fdba985f]
2024-06-07 13:27:14 -07:00
Benjamin Welton 22f6109d1e Small change to sample for clarity (#913)
Co-authored-by: Benjamin Welton <ben@amd.com>

[ROCm/rocprofiler-sdk commit: 3d9a448797]
2024-06-07 13:05:46 -07:00
Benjamin Welton 1cbb4bcd94 Add calls to stop and wait for a debugger (#916)
Co-authored-by: Benjamin Welton <ben@amd.com>

[ROCm/rocprofiler-sdk commit: 45e165b256]
2024-06-07 13:04:52 -07:00
Benjamin Welton f8dd1369f9 Small doc update to remove restrictions no longer present (#917)
* Small doc update to remove restrictions no longer present


[ROCm/rocprofiler-sdk commit: 680448c444]
2024-06-06 16:30:48 -07:00
Benjamin Welton 29628c5bc5 Use fixed size array for serialization (#906)
Co-authored-by: Benjamin Welton <ben@amd.com>

[ROCm/rocprofiler-sdk commit: 2f3a8b05b3]
2024-06-05 02:02:01 -07:00
Vladimir Indic cb69616d46 PC sampling client: using raw pointers (#902)
* PC sampling client: using raw pointers to prevent premature destruction of buffers

* PCS client: freeing buffer_ids

[ROCm/rocprofiler-sdk commit: b0c41827c3]
2024-06-04 13:16:26 -05:00