Commit Graph

98 Commits

Author SHA1 Message Date
Laurent Morichetti 19fbb76f1b Consolidate all sources of timestamps
System clock timestamps should only come from a single source:
util::timestamp_ns(). Externally, this function is exposed as
roctracer_get_timestamp() (used by the tracer tool).

Removed the now unused HSA Runtime Utilities which were never part
of the ROCtracer API.

Change-Id: I044b7f4da60fd8fdb771b0c877622a3143f0e815


[ROCm/roctracer commit: f8462b8637]
2022-05-10 08:13:09 -07:00
Laurent Morichetti 8502571ab7 Move trace_buffer.h to the tool directory
A trace buffer is used to efficiently store synchronous event records
so that they can be processed later, possibly in a different thread,
when the buffer is flushed. This helps reduce the latency added by
tracing API calls.

The API does not need to use trace buffers as synchronous events are
directly reported to the client with callbacks, and asynchronous events
(activities) are saved in memory pools.

The implentation of HSA asynchronous memory copy activities was using
a trace buffer shared with the tracer tool to write the records to a
file (async_copy_trace.txt), instead of using a memory pool and
reporting the activity to the client.

Removed the asynchronous memory copies trace buffer, and updated
hsa_async_copy_handler to use the pool specified when the activity
was enabled.

Updated the tracer tool to read HSA_OP_ID_COPY records out of the
default memory pool and write them to async_copy_trace.txt.

Move trace_buffer.h to test/tool as tracer_tool.cpp is now the only
file using it.

Change-Id: Ida95aba2eaf3c3f2a979ed6c2b060374017b7424


[ROCm/roctracer commit: 61f35b0204]
2022-05-03 21:56:28 -04:00
Tony Tye dd82162466 Add doxygen to roctracer.h
Change-Id: Ie542399e990e02482ed740d99c6afe4b95b1f6f4


[ROCm/roctracer commit: 1f630a9291]
2022-04-30 00:33:05 +00:00
Laurent Morichetti 6d8edf929f Fix typos/spelling errors
Change-Id: Idec1cb8fab91c30f99563bc7dd4db1faeb2db954


[ROCm/roctracer commit: 18f60efe05]
2022-04-26 12:39:38 -07:00
Laurent Morichetti 14f1d48482 Move the HccLoader activities into the HipLoader
The HCC runtime is no longer used, so move all the remaining
activities in the HipApi loader and remove the HccLoader.

Change-Id: I845c04ca275a474526840315bae0ad1a4ce02257


[ROCm/roctracer commit: 85552ea3a0]
2022-04-22 11:22:07 -07:00
Laurent Morichetti 83cf22a698 Remove roctracer_hcc.h
roctracer_hip.h now contains the definitions for the HCC_OPS domain.

Change-Id: I132c993110254050aaa68828f3ca80f368ad24bc


[ROCm/roctracer commit: d3b166cf01]
2022-04-20 22:00:59 -07:00
Laurent Morichetti 45deedf43a Make roctracer_cb_table.h a private header
Move roctracer_cb_table.h to the src/core directory, as it should not
be exposed as a public header, and rename it callback_table.h

Change-Id: Ib448cbd32a275df0268d53bd8d1da0bdc9201470


[ROCm/roctracer commit: cd62d841fa]
2022-04-20 19:47:43 -07:00
Laurent Morichetti 23528f51e0 Run clang-format on all source files
Change-Id: Ifb52ca306286b6b2d473821bed9db28e9f616d50


[ROCm/roctracer commit: 15ab5d9cda]
2022-04-20 22:45:54 -04:00
Laurent Morichetti 80c01a27c0 Fix copyright headers
Change-Id: I380d867fa5fb04e68b5b332e9abf33fbeb1e9418


[ROCm/roctracer commit: 06a3da7c63]
2022-04-19 09:30:45 -07:00
Saravanan Solaiyappan 127ab7646d roctracer: Consider apt upgrade operation check in package scripts.
Include the upgrade operation check in the prerm script
in package.

Signed-off-by: Saravanan Solaiyappan <saravanan.solaiyappan@amd.com>
Change-Id: I1504ce96a27d21d9c3d9bafc0dea8055398adc99


[ROCm/roctracer commit: bfea525ff3]
2022-03-21 23:43:19 -04:00
Christophe Paquot a9f6522a41 SWDEV-295205 - Remove KFD domain from roctracer
Change-Id: I2771cf43aa115bb466531bf887f7cc75e187f2ef


[ROCm/roctracer commit: e5e1258ef8]
2021-07-22 10:12:45 -07:00
Rachida Kebichi a5571976e5 SWDEV-281008 replace hcc_detail by amd_detail
Change-Id: I180b18f9e1fae40c923d6210901f06cba14e8f13


[ROCm/roctracer commit: 6267df36e4]
2021-04-14 11:18:38 -04:00
Rachida Kebichi 4b6d702a39 SWDEV-255938 NEW - added regex and depth support to ostream ops
Change-Id: I292255adab3a70fa00a1dd5685b788521687f35b


[ROCm/roctracer commit: ef36218286]
2020-11-18 16:48:50 -05:00
Evgeny 85e5cf8a93 SWDEV-213367 : codeobj event implementation
Change-Id: Ibcaca6869ce96d8802c5fa8ba241f43834d6f2a7

update - codeobj event implementation

Change-Id: I4c12f26a19f2b31d9ac2211c3426a0e587a332b3

update2 - codeobj event implementation

Change-Id: Ic877549a83542ae00352503471d881e847ebac9c

test - codeobj event implementation

Change-Id: I0618d3a93de94c3d7467372ba4a3d4ea5520bfc7

URI reference test - codeobj event implementation

Change-Id: I6cf7e8a648cf012cb0708058b118a75e58f992b9

adding test/app - codeobj event implementation

Change-Id: Idf4c197c7b9116ccde5ec50ff47a26a858bfab32

uri test fix - codeobj event implementation

Change-Id: I7c385f82f516d9d8f2cd726366f00be3664006e3

uri test cleanup - codeobj event implementation

Change-Id: I542d5baf88c048c8b4717af843b803cd93e8f3bc

URI buffer fix - codeobj event implementation

Change-Id: Iac65e04c03a0939935c10f53c6b580a2e33878f5

HSA events tests trace-check disabled

Change-Id: I0f4d13aeeceb1d1a6e2191673eacbf9c7ae2ae52


[ROCm/roctracer commit: 29c63c5281]
2020-10-09 08:36:12 -04:00
Evgeny f7549dfde3 codeobj tracing prof protocol
Change-Id: Ib49c8ee034fb7481b21f950490e10b350f2a1b79


[ROCm/roctracer commit: 6567c48e98]
2020-09-19 16:49:46 -05:00
Evgeny 1b73058fb7 Format ostream ops
Change-Id: I8c609b1ef82e02f3547541c2cc47dec3a4f1c7b3


[ROCm/roctracer commit: e9b8de644e]
2020-08-28 11:30:18 -05:00
Evgeny a098665435 incrementing API version because of HIP API changes
Change-Id: I19e42ca75d8050b44b1cdf70cac7dfdff1ab5d57


[ROCm/roctracer commit: 2f608e067a]
2020-08-15 03:25:57 -04:00
Rachida Kebichi 13e1208711 Merge "Added roctxRangeStart and roctxRangeEnd" into amd-master
[ROCm/roctracer commit: d3406bdb7b]
2020-08-12 10:32:29 -04:00
Rachida Kebichi 86954dba1f Added roctxRangeStart and roctxRangeEnd
Change-Id: Id7f81c5a7d7f231c8f0e2323d31c37c827687189

Added roctxRangeStart and roctxRangeEnd

Change-Id: Id7f81c5a7d7f231c8f0e2323d31c37c827687189


[ROCm/roctracer commit: da17a158f8]
2020-08-11 17:28:03 -04:00
Rachida Kebichi 127ae39c5a Added hsa ostream ops generation
Change-Id: Icc68e136d22b05b35d6adaff56e090272633d760


[ROCm/roctracer commit: bac4bae41c]
2020-07-29 10:41:32 -04:00
Evgeny edeec18db9 adding tracer flush/unload stage unloading
Change-Id: Id84774b2ce20b261a9a84d2ad802b76093a748d4


[ROCm/roctracer commit: 07479cf881]
2020-06-02 05:10:02 -05:00
Evgeny 755333d0b8 renaming PCSAMPLE API as RESERVED1
Change-Id: I0f95e4be5b359dc36fc3542bf0e321094db78a79


[ROCm/roctracer commit: da4b244887]
2020-05-21 11:51:17 -05:00
Evgeny 7c98010b44 SWDEV-236864 : packaging of generated headers
Change-Id: Ifda69eecf3697f6b69c978b3c4c2ffe9835edeb8


[ROCm/roctracer commit: 074306d997]
2020-05-18 18:08:06 -05:00
Evgeny 6bc043077d increasing API version
Change-Id: I30c1b5b22d0bef8cf57e9703261e397f3d2fa77a


[ROCm/roctracer commit: eebde5e82e]
2020-05-12 12:45:18 -04:00
Rachida Kebichi 99b6e667cf Added generation of hip ostream operators
Change-Id: I5d07ea07cdd94097cb44619c29d9deba54e5d6a5

ostream ops code cleanup

Change-Id: Ia4e287de1e1953f5d323a0066c29aa6056442139


[ROCm/roctracer commit: 72b0d25ea4]
2020-05-01 16:15:01 -04:00
Evgeny cbe8c08bda adding HIP_PROF_HIP_API_STRING macro
[ROCm/roctracer commit: 0cd31f8295]
2020-04-14 13:12:52 -05:00
Evgeny ff5e5bf40c adding ROCP_WITH_HIP_API_STRING macro
[ROCm/roctracer commit: fc79e36928]
2020-04-10 12:52:51 -05:00
Evgeny e568559864 using hipApiString() if defined
[ROCm/roctracer commit: a46c6984a2]
2020-04-10 01:15:20 -05:00
Evgeny 362bfed749 activity entry struct fix
[ROCm/roctracer commit: c1455827b7]
2020-03-07 20:35:24 -06:00
Evgeny bc7acebcea pc sampling integration fix
[ROCm/roctracer commit: d2243ef1ec]
2020-03-07 19:09:54 -06:00
Evgeny acb2bcc0fe PC sampling initial bringup
[ROCm/roctracer commit: 8b63135ced]
2020-02-28 14:01:40 -06:00
Evgeny a41e035ada control of trace buffer thread start
[ROCm/roctracer commit: f214221bb2]
2020-01-27 14:31:24 -06:00
Evgeny 50d116328d fixing link errors
[ROCm/roctracer commit: abe07f7b4d]
2020-01-13 12:19:04 -06:00
Evgeny 6d358a84a4 cosmetic change
[ROCm/roctracer commit: f8e0039f39]
2020-01-13 12:09:33 -06:00
Evgeny 51c103a1d2 adding API specification
[ROCm/roctracer commit: b2d124d2be]
2019-12-31 07:05:32 -06:00
Evgeny a19f02263e normalizing C API: HSA domain
[ROCm/roctracer commit: b82a21056e]
2019-12-30 20:09:41 -06:00
Evgeny bca4e77df9 normalizing C API
[ROCm/roctracer commit: 077f8ec6b6]
2019-12-29 03:06:11 -06:00
Wen-Heng (Jack) Chung a448da4963 Introduce a new API roctracer_get_timestamp().
roctracer_status_t roctracer_get_timestamp(uint64_t* timestamp);

Get system timestamp for roctracer clients.

The API could be used to help roctracer clients understand the reference frame
of timestamps when receiving activity callbacks, as the nanoseconds reported in
the activity callbacks are not in the same reference frame as CPU walltime
clock.


[ROCm/roctracer commit: b7aa8fedb7]
2019-12-19 18:05:33 +00:00
eshcherb b43c1ae292 Merge pull request #25 from whchung/revise-if
Revise the return type of roctracer_next_record to roctracer_status_t.

[ROCm/roctracer commit: fb0140ec66]
2019-11-20 20:21:41 -06:00
eshcherb 69076632d9 Merge branch 'amd-master' into rkebichi-patch-kfd-1
[ROCm/roctracer commit: 2bcf1c5554]
2019-11-11 19:05:50 -06:00
Wen-Heng (Jack) Chung 0510b2c23b Revise the return type of roctracer_next_record to roctracer_status_t.
[ROCm/roctracer commit: f730fb6a4e]
2019-11-06 10:54:45 -06:00
rkebichi dda6c9e5a6 Update roctracer_kfd.h
[ROCm/roctracer commit: 1a62e18593]
2019-10-31 10:48:42 -04:00
rkebichi 78dc260dca Update roctracer_kfd.h
[ROCm/roctracer commit: 0aa6df2b52]
2019-10-30 17:26:57 -04:00
rkebichi 892ddf3e98 Update roctracer_kfd.h
[ROCm/roctracer commit: b9e7638ef9]
2019-10-30 17:16:54 -04:00
rkebichi 29261f9737 Update roctracer_kfd.h
[ROCm/roctracer commit: 5ae9aa1492]
2019-10-22 15:18:45 -04:00
Evgeny 693111434b hip-vdi support
[ROCm/roctracer commit: 72a2571b22]
2019-10-21 23:03:20 -05:00
Evgeny 05a07a9e7f roctx/start/stop interaction
[ROCm/roctracer commit: 57051220a1]
2019-10-21 21:18:54 -05:00
Evgeny 62c9b25924 conditional building of kfd wrapper
[ROCm/roctracer commit: b2c23f63d5]
2019-10-15 11:15:48 -05:00
Evgeny 3f73d90d61 start/stop API
[ROCm/roctracer commit: 72b5494f0b]
2019-10-09 01:00:05 -05:00
rkebichi 70abcbb7d7 Update roctracer_kfd.h
[ROCm/roctracer commit: af41d4ae2e]
2019-10-08 16:38:03 -04:00