2
0

Host trap PC sampling uses new record type (#1207)

* Host trap PC sampling uses new record type

* removing redundant field

* formatting

* simplifying templates in the parser - no need for HostTrap boolean

* reviving some parser tests

* hw_id decoding on GFX9

* HW id parser test

* parser CID test

* Parser multigpu test

* removing rocprofiler_pc_sampling_record_t and some fields from hw_id

* simplifying parser context

* keep bench test internally

* initializing gfx9_hw_id_t differently

* anonymous struct first

* avoiding inlining initialization of struct
Este cometimento está contido em:
Vladimir Indic
2024-11-20 21:02:47 +01:00
cometido por GitHub
ascendente 55aea3ef10
cometimento bc52c17e64
21 ficheiros modificados com 1319 adições e 738 eliminações
@@ -202,7 +202,8 @@ test_fail_because_of_wrong_agent(const callback_data*
pcs_config->method,
pcs_config->unit,
pcs_config->min_interval,
cb_data->client_buffer),
cb_data->client_buffer,
0),
ROCPROFILER_STATUS_ERROR_AGENT_NOT_FOUND);
}
@@ -218,7 +219,8 @@ test_fail_because_of_wrong_context(const callback_data*
pcs_config->method,
pcs_config->unit,
pcs_config->min_interval,
cb_data->client_buffer),
cb_data->client_buffer,
0),
ROCPROFILER_STATUS_ERROR_CONTEXT_NOT_FOUND);
}
@@ -234,7 +236,8 @@ test_fail_because_of_wrong_buffer(const callback_data*
pcs_config->method,
pcs_config->unit,
pcs_config->min_interval,
not_existing_buffer_id),
not_existing_buffer_id,
0),
ROCPROFILER_STATUS_ERROR_BUFFER_NOT_FOUND);
}
@@ -254,7 +257,8 @@ test_fail_because_of_unsupported_configuration(
pcs_config->method,
pcs_config->unit,
less_than_min_interval,
cb_data->client_buffer),
cb_data->client_buffer,
0),
ROCPROFILER_STATUS_SUCCESS);
EXPECT_NE(rocprofiler_configure_pc_sampling_service(cb_data->client_ctx,
@@ -262,7 +266,8 @@ test_fail_because_of_unsupported_configuration(
pcs_config->method,
pcs_config->unit,
greater_than_max_interval,
cb_data->client_buffer),
cb_data->client_buffer,
0),
ROCPROFILER_STATUS_SUCCESS);
EXPECT_NE(rocprofiler_configure_pc_sampling_service(cb_data->client_ctx,
@@ -270,7 +275,8 @@ test_fail_because_of_unsupported_configuration(
wrong_method,
pcs_config->unit,
pcs_config->max_interval,
cb_data->client_buffer),
cb_data->client_buffer,
0),
ROCPROFILER_STATUS_SUCCESS);
EXPECT_NE(rocprofiler_configure_pc_sampling_service(cb_data->client_ctx,
@@ -278,7 +284,8 @@ test_fail_because_of_unsupported_configuration(
pcs_config->method,
wrong_unit,
pcs_config->max_interval,
cb_data->client_buffer),
cb_data->client_buffer,
0),
ROCPROFILER_STATUS_SUCCESS);
}
@@ -293,7 +300,8 @@ test_fail_because_service_is_already_configured(
pcs_config->method,
pcs_config->unit,
pcs_config->min_interval,
cb_data->client_buffer),
cb_data->client_buffer,
0),
ROCPROFILER_STATUS_ERROR_SERVICE_ALREADY_CONFIGURED);
}
@@ -374,7 +382,8 @@ TEST(pc_sampling, rocprofiler_configure_pc_sampling_service)
pcs_config.method,
pcs_config.unit,
interval,
cb_data->client_buffer),
cb_data->client_buffer,
0),
"Failed to configure PC sampling service");
test_fail_because_service_is_already_configured(cb_data, agent_id, &pcs_config);
@@ -385,7 +394,8 @@ TEST(pc_sampling, rocprofiler_configure_pc_sampling_service)
pcs_config.method,
pcs_config.unit,
interval,
another_buff),
another_buff,
0),
ROCPROFILER_STATUS_ERROR);
}
@@ -452,6 +462,7 @@ TEST(pc_sampling, rocprofiler_configure_pc_sampling_service)
ROCPROFILER_PC_SAMPLING_METHOD_HOST_TRAP,
ROCPROFILER_PC_SAMPLING_UNIT_TIME,
1,
cb_data.client_buffer),
cb_data.client_buffer,
0),
ROCPROFILER_STATUS_ERROR_CONFIGURATION_LOCKED);
}
@@ -292,7 +292,8 @@ pc_sampling_vs_counter_collection(cc_setup_fn_t cc_setup_fn)
pcs_config.method,
pcs_config.unit,
interval,
cb_data->client_buffer),
cb_data->client_buffer,
0),
ROCPROFILER_STATUS_ERROR_CONTEXT_CONFLICT);
}
@@ -393,7 +394,8 @@ counter_collection_vs_pc_sampling(cc_setup_fn_t cc_setup_fn)
pcs_config.method,
pcs_config.unit,
interval,
cb_data->client_buffer),
cb_data->client_buffer,
0),
ROCPROFILER_STATUS_SUCCESS);
}
@@ -285,7 +285,8 @@ TEST(pc_sampling, query_configs_after_service_setup)
pcs_config.method,
pcs_config.unit,
interval,
cb_data->client_buffer),
cb_data->client_buffer,
0),
"Failed to configure PC sampling service");
// query configuration and expect to see `pcs_config->max_interval` as the `interval`
@@ -251,7 +251,8 @@ TEST(pc_sampling, processing_pc_samples)
pcs_config.method,
pcs_config.unit,
interval,
cb_data->client_buffer),
cb_data->client_buffer,
0),
"Failed to configure PC sampling service");
ROCPROFILER_CALL(rocprofiler_create_callback_thread(&cb_data->client_thread),