7 کامیت‌ها

مولف SHA1 پیام تاریخ
Laurent Morichetti cb7d599829 Fix hsa_support::timestamp_ns if HSA is not yet initialized
Default to the HSA runtime's hsa_system_get_info if the saved HSA
functions table is not yet initialized.

Change-Id: I3659095a5ad662f7ca8b0d92bd035901c6d66bb0


[ROCm/roctracer commit: 87ffbd27f4]
2022-09-08 21:02:31 -07:00
Laurent Morichetti f7c8382e33 SWDEV-351980 - Use the new hipRegister/RemoveAsyncActivityCallback
Remove the hipInitActivityCallback and use the new hipRegister/
RemoveActivityCallback which allows distinct memory pools to be used
for HIP_OPS activities.

Enable the multi_pool_activities test.

Change-Id: I6f6feaedecc9c36285bea975caf24dbf8f5f624b


[ROCm/roctracer commit: 340c7cb553]
2022-09-06 19:11:11 -07:00
Laurent Morichetti f50c9d4149 SWDEV-351980 - Don't allocate hip_api_data and record
The HIP runtime is now allocating the hip_api_data and record on its
stack so we don't need the thread local record_data_pair stack anymore.

Refactor the API callback function to handle both the case where
synchronous user callbacks are requested and the case where asynchronous
records are requested (enable_callback & enable_activity respectively).
If the callback argument (memory pool) is not null, then activity
records are requested.

Remove CorrelationIdRegister and CorrelationIdLookup. These were used
by the HIP runtime to associate a HIP record id to a ROCtracer
correlation id. Instead, the HIP runtime is now using the correlation
ID returned in the hip_api_data_t.

Added a test to check enabling/disabling concurrent callbacks and
activities.

Change-Id: I5850cfead9861eb3602a3e8fcb7b22580d5fc979


[ROCm/roctracer commit: 88c6e0a700]
2022-09-06 19:11:11 -07:00
Laurent Morichetti 179e03c172 Add multi_pool_activities test
This test checks that asynchronous activities can be enabled in distinct
memory pools. It enables activity reporting for HIP kernel dispatches in
one memory pool, and memory copy reporting in another memory pool.

The output of this test to stdout should be a series of kernel dispatch
records (10) followed by a series of memory copy records (10). The
records should not be interleaved.

Change-Id: Idb5cca7e650b2312a1955909932364f914737856


[ROCm/roctracer commit: cfdfa2a2d4]
2022-08-26 19:28:19 -07:00
Laurent Morichetti 7f47eb9d02 Add TraceBuffer entry construction/destruction
Change-Id: I354f36b0d7a0baea0efb75d5e81f169b5f969542


[ROCm/roctracer commit: 2513f9f51f]
2022-07-26 16:23:59 -07:00
Laurent Morichetti 4af9cdc409 Add a data region to the memory pool
Some records may need to point to data with the same lifetime as the
records themselves. One solution is to store the data at the end of
the memory pool buffer. Records in the buffer grow up, and the data
grows down. When the buffer is flushed both records and data are
recycled.

Change-Id: I278fa84478236bf895f7c2d152d47d4256987392


[ROCm/roctracer commit: ef3b2a8aa8]
2022-06-08 18:34:23 -04:00
Laurent Morichetti 7746758ed7 Add a trace_buffer directed test
This test stresses the concurrent writing of trace buffer records while
frequently allocating new storage to hold the records.

Due to race conditions, this test fails with the current trace buffer
implementation.

Change-Id: I0b77c64005e776319bf21f1ee1e6d7c99ddccfff


[ROCm/roctracer commit: 200e27f12d]
2022-04-29 08:52:13 -07:00