adding agent to device callback data

Change-Id: I7d631e4faae685ce23704ac65308bf2aae0c157a
This commit is contained in:
Evgeny
2018-10-03 18:06:57 -05:00
والد 704420bead
کامیت 4edc6c98cf
3فایلهای تغییر یافته به همراه3 افزوده شده و 0 حذف شده
+1
مشاهده پرونده
@@ -484,6 +484,7 @@ struct rocprofiler_hsa_callback_data_t {
struct {
hsa_device_type_t type; // type of assigned device
uint32_t id; // id of assigned device
hsa_agent_t agent; // device HSA agent handle
const void* ptr; // ptr the device is assigned to
} device;
struct {
@@ -169,6 +169,7 @@ class HsaInterceptor {
hsa_agent_t agent = *agent_p;
rocprofiler_hsa_callback_data_t data{};
data.device.id = util::HsaRsrcFactory::Instance().GetAgentInfo(agent)->dev_index;
data.device.agent = agent;
data.device.ptr = ptr;
HSA_RT(hsa_agent_get_info(agent, HSA_AGENT_INFO_DEVICE, &data.device.type));
+1
مشاهده پرونده
@@ -847,6 +847,7 @@ hsa_status_t hsa_unified_callback(
case ROCPROFILER_HSA_CB_ID_DEVICE:
printf(" device type = 0x%x\n", data->device.type);
printf(" device id = %u\n", data->device.id);
printf(" device agent = 0x%lx\n", data->device.agent.handle);
printf(" assigned ptr = %p\n", data->device.ptr);
break;
case ROCPROFILER_HSA_CB_ID_MEMCOPY: