[SDK] Add Stack IDs (#269)

* Add Stack IDs

* Add memcpy test

* Add async corr id record

* Async events use `rocprofiler_async_correlation_id_t`
* Sync events use `rocprofiler_correlation_id_t`

* Update ATT to use asnyc IDs

* Review comments
Cette révision appartient à :
Kuricheti, Mythreya
2025-03-20 22:52:48 -07:00
révisé par GitHub
Parent ae0db8cee5
révision f27f76716e
36 fichiers modifiés avec 341 ajouts et 67 suppressions
+10 -2
Voir le fichier
@@ -49,8 +49,8 @@ namespace Parser
{
struct dispatch_correlation_ids_t
{
rocprofiler_dispatch_id_t dispatch_id;
rocprofiler_correlation_id_t correlation_id;
rocprofiler_dispatch_id_t dispatch_id;
rocprofiler_async_correlation_id_t correlation_id;
};
/**
@@ -107,6 +107,14 @@ struct std::hash<Parser::DispatchPkt>
namespace Parser
{
// 64B for performance reasons
constexpr auto pcs_parser_sample_record_size = 64;
static_assert(sizeof(generic_sample_t) == pcs_parser_sample_record_size);
static_assert(sizeof(generic_sample_t) == sizeof(perf_sample_snapshot_v1));
static_assert(sizeof(generic_sample_t) == sizeof(perf_sample_host_trap_v1));
static_assert(sizeof(generic_sample_t) == sizeof(upcoming_samples_t));
static_assert(sizeof(generic_sample_t) == sizeof(dispatch_pkt_id_t));
/**
* Coordinates DispatchMap and DoorBellMap to reconstruct the original correlation_id
* from the correlation_id seen by the trap handler.
+2 -2
Voir le fichier
@@ -72,8 +72,8 @@ typedef struct
uint64_t write_index;
uint64_t read_index;
/// both internal and external correlation ID.
rocprofiler_correlation_id_t correlation_id;
rocprofiler_dispatch_id_t dispatch_id;
rocprofiler_async_correlation_id_t correlation_id;
rocprofiler_dispatch_id_t dispatch_id;
} dispatch_pkt_id_t;
typedef struct
+4 -4
Voir le fichier
@@ -169,10 +169,10 @@ typedef struct rocprofiler_pc_sampling_record_stochastic_v0_t
rocprofiler_pc_t pc; ///< information about sampled program counter
uint64_t exec_mask; ///< active SIMD lanes at the moment sampling
rocprofiler_dim3_t workgroup_id; ///< wave coordinates within the workgroup
uint32_t wave_count; /// active waves on the CU at the moment of sampling
uint64_t timestamp; ///< timestamp when sample is generated
uint64_t dispatch_id; ///< originating kernel dispatch ID
rocprofiler_correlation_id_t correlation_id;
uint32_t wave_count; /// active waves on the CU at the moment of sampling
uint64_t timestamp; ///< timestamp when sample is generated
uint64_t dispatch_id; ///< originating kernel dispatch ID
rocprofiler_async_correlation_id_t correlation_id;
rocprofiler_pc_sampling_snapshot_v0_t
snapshot; ///< @see ::rocprofiler_pc_sampling_snapshot_v0_t
rocprofiler_pc_sampling_memory_counters_t