PC Sampling: Allocate resources to retrieve data from trap handler

Allocate required device and host buffers to be able to interact with
the 2nd level trap handler.

Change-Id: If99de5aacf956ca57ecafc7b04b797be9c9decaa
This commit is contained in:
David Yat Sin
2023-08-17 15:04:58 +00:00
والد 431a70471e
کامیت 8d666dea01
3فایلهای تغییر یافته به همراه184 افزوده شده و 3 حذف شده
@@ -46,6 +46,7 @@
#define HSA_RUNTIME_CORE_INC_AMD_GPU_AGENT_H_
#include <vector>
#include <list>
#include <map>
#include "hsakmt/hsakmt.h"
@@ -720,6 +721,13 @@ class GpuAgent : public GpuAgentInt {
} pcs_hosttrap_sampling_data_t;
typedef struct {
/* Hosttrap data - stored on device so that trap_handler code can access efficiently */
pcs_hosttrap_sampling_data_t* device_data;
/* Hosttrap host buffer - stored on host */
uint8_t* host_buffer;
size_t host_buffer_size;
os::Thread thread;
pcs::PcsRuntime::PcSamplingSession* session;
} pcs_hosttrap_t;