intel: Rename gen_perf prefix to intel_perf in source files

export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965
grep -E "gen_perf" -rIl $SEARCH_PATH | xargs sed -ie "s/gen_perf\([^\.]\)/intel_perf\1/g"

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>
This commit is contained in:
Anuj Phogat
2021-04-06 13:32:02 -07:00
committed by Marge Bot
parent e6e79436af
commit bbe81292c6
22 changed files with 542 additions and 542 deletions

View File

@@ -46,9 +46,9 @@ anv_physical_device_init_perf(struct anv_physical_device *device, int fd)
if (devinfo->ver < 8)
return;
struct gen_perf_config *perf = gen_perf_new(NULL);
struct intel_perf_config *perf = intel_perf_new(NULL);
gen_perf_init_metrics(perf, &device->info, fd, false /* pipeline statistics */);
intel_perf_init_metrics(perf, &device->info, fd, false /* pipeline statistics */);
if (!perf->n_queries) {
if (perf->platform_supported) {
@@ -67,7 +67,7 @@ anv_physical_device_init_perf(struct anv_physical_device *device, int fd)
* perf revision 2.
*/
if (!(INTEL_DEBUG & DEBUG_NO_OACONFIG)) {
if (!gen_perf_has_hold_preemption(perf))
if (!intel_perf_has_hold_preemption(perf))
goto err;
}
@@ -76,10 +76,10 @@ anv_physical_device_init_perf(struct anv_physical_device *device, int fd)
/* Compute the number of commands we need to implement a performance
* query.
*/
const struct gen_perf_query_field_layout *layout = &perf->query_layout;
const struct intel_perf_query_field_layout *layout = &perf->query_layout;
device->n_perf_query_commands = 0;
for (uint32_t f = 0; f < layout->n_fields; f++) {
struct gen_perf_query_field *field = &layout->fields[f];
struct intel_perf_query_field *field = &layout->fields[f];
switch (field->type) {
case GEN_PERF_QUERY_FIELD_TYPE_MI_RPC:
@@ -140,7 +140,7 @@ anv_device_perf_open(struct anv_device *device, uint64_t metric_id)
* enabled we would use only half on Gfx11 because of functional
* requirements.
*/
if (gen_perf_has_global_sseu(device->physical->perf)) {
if (intel_perf_has_global_sseu(device->physical->perf)) {
properties[p++] = DRM_I915_PERF_PROP_GLOBAL_SSEU;
properties[p++] = (uintptr_t) &device->physical->perf->sseu;
}
@@ -225,7 +225,7 @@ VkResult anv_AcquirePerformanceConfigurationINTEL(
if (!(INTEL_DEBUG & DEBUG_NO_OACONFIG)) {
config->register_config =
gen_perf_load_configuration(device->physical->perf, device->fd,
intel_perf_load_configuration(device->physical->perf, device->fd,
GEN_PERF_QUERY_GUID_MDAPI);
if (!config->register_config) {
vk_object_free(&device->vk, NULL, config);
@@ -233,7 +233,7 @@ VkResult anv_AcquirePerformanceConfigurationINTEL(
}
int ret =
gen_perf_store_configuration(device->physical->perf, device->fd,
intel_perf_store_configuration(device->physical->perf, device->fd,
config->register_config, NULL /* guid */);
if (ret < 0) {
ralloc_free(config->register_config);
@@ -303,7 +303,7 @@ void anv_UninitializePerformanceApiINTEL(
/* VK_KHR_performance_query */
static const VkPerformanceCounterUnitKHR
gen_perf_counter_unit_to_vk_unit[] = {
intel_perf_counter_unit_to_vk_unit[] = {
[GEN_PERF_COUNTER_UNITS_BYTES] = VK_PERFORMANCE_COUNTER_UNIT_BYTES_KHR,
[GEN_PERF_COUNTER_UNITS_HZ] = VK_PERFORMANCE_COUNTER_UNIT_HERTZ_KHR,
[GEN_PERF_COUNTER_UNITS_NS] = VK_PERFORMANCE_COUNTER_UNIT_NANOSECONDS_KHR,
@@ -324,7 +324,7 @@ gen_perf_counter_unit_to_vk_unit[] = {
};
static const VkPerformanceCounterStorageKHR
gen_perf_counter_data_type_to_vk_storage[] = {
intel_perf_counter_data_type_to_vk_storage[] = {
[GEN_PERF_COUNTER_DATA_TYPE_BOOL32] = VK_PERFORMANCE_COUNTER_STORAGE_UINT32_KHR,
[GEN_PERF_COUNTER_DATA_TYPE_UINT32] = VK_PERFORMANCE_COUNTER_STORAGE_UINT32_KHR,
[GEN_PERF_COUNTER_DATA_TYPE_UINT64] = VK_PERFORMANCE_COUNTER_STORAGE_UINT64_KHR,
@@ -340,7 +340,7 @@ VkResult anv_EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR(
VkPerformanceCounterDescriptionKHR* pCounterDescriptions)
{
ANV_FROM_HANDLE(anv_physical_device, pdevice, physicalDevice);
struct gen_perf_config *perf = pdevice->perf;
struct intel_perf_config *perf = pdevice->perf;
uint32_t desc_count = *pCounterCount;
@@ -348,12 +348,12 @@ VkResult anv_EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR(
VK_OUTARRAY_MAKE(out_desc, pCounterDescriptions, &desc_count);
for (int c = 0; c < (perf ? perf->n_counters : 0); c++) {
const struct gen_perf_query_counter *gen_counter = perf->counter_infos[c].counter;
const struct intel_perf_query_counter *gen_counter = perf->counter_infos[c].counter;
vk_outarray_append(&out, counter) {
counter->unit = gen_perf_counter_unit_to_vk_unit[gen_counter->units];
counter->unit = intel_perf_counter_unit_to_vk_unit[gen_counter->units];
counter->scope = VK_QUERY_SCOPE_COMMAND_KHR;
counter->storage = gen_perf_counter_data_type_to_vk_storage[gen_counter->data_type];
counter->storage = intel_perf_counter_data_type_to_vk_storage[gen_counter->data_type];
unsigned char sha1_result[20];
_mesa_sha1_compute(gen_counter->symbol_name,
@@ -379,14 +379,14 @@ void anv_GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR(
uint32_t* pNumPasses)
{
ANV_FROM_HANDLE(anv_physical_device, pdevice, physicalDevice);
struct gen_perf_config *perf = pdevice->perf;
struct intel_perf_config *perf = pdevice->perf;
if (!perf) {
*pNumPasses = 0;
return;
}
*pNumPasses = gen_perf_get_n_passes(perf,
*pNumPasses = intel_perf_get_n_passes(perf,
pPerformanceQueryCreateInfo->pCounterIndices,
pPerformanceQueryCreateInfo->counterIndexCount,
NULL);
@@ -397,8 +397,8 @@ VkResult anv_AcquireProfilingLockKHR(
const VkAcquireProfilingLockInfoKHR* pInfo)
{
ANV_FROM_HANDLE(anv_device, device, _device);
struct gen_perf_config *perf = device->physical->perf;
struct gen_perf_query_info *first_metric_set = &perf->queries[0];
struct intel_perf_config *perf = device->physical->perf;
struct intel_perf_query_info *first_metric_set = &perf->queries[0];
int fd = -1;
assert(device->perf_fd == -1);
@@ -426,13 +426,13 @@ void anv_ReleaseProfilingLockKHR(
}
void
anv_perf_write_pass_results(struct gen_perf_config *perf,
anv_perf_write_pass_results(struct intel_perf_config *perf,
struct anv_query_pool *pool, uint32_t pass,
const struct gen_perf_query_result *accumulated_results,
const struct intel_perf_query_result *accumulated_results,
union VkPerformanceCounterResultKHR *results)
{
for (uint32_t c = 0; c < pool->n_counters; c++) {
const struct gen_perf_counter_pass *counter_pass = &pool->counter_pass[c];
const struct intel_perf_counter_pass *counter_pass = &pool->counter_pass[c];
if (counter_pass->pass != pass)
continue;