Commit bbe81292 authored by Anuj Phogat's avatar Anuj Phogat Committed by Marge Bot
Browse files

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's avatarAnuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke's avatarKenneth Graunke <kenneth@whitecape.org>
Part-of: <!10241>
parent e6e79436
......@@ -662,7 +662,7 @@ struct iris_context {
struct iris_bo *scratch_bos[1 << 4][MESA_SHADER_STAGES];
} shaders;
struct gen_perf_context *perf_ctx;
struct intel_perf_context *perf_ctx;
/** Frame number for debug prints */
uint32_t frame;
......
......@@ -35,7 +35,7 @@ struct iris_monitor_object {
size_t result_size;
unsigned char *result_buffer;
struct gen_perf_query_object *query;
struct intel_perf_query_object *query;
};
int
......@@ -43,7 +43,7 @@ iris_get_monitor_info(struct pipe_screen *pscreen, unsigned index,
struct pipe_driver_query_info *info)
{
const struct iris_screen *screen = (struct iris_screen *)pscreen;
const struct gen_perf_config *perf_cfg = screen->perf_cfg;
const struct intel_perf_config *perf_cfg = screen->perf_cfg;
assert(perf_cfg);
if (!perf_cfg)
return 0;
......@@ -53,8 +53,8 @@ iris_get_monitor_info(struct pipe_screen *pscreen, unsigned index,
return perf_cfg->n_counters;
}
struct gen_perf_query_counter_info *counter_info = &perf_cfg->counter_infos[index];
struct gen_perf_query_counter *counter = counter_info->counter;
struct intel_perf_query_counter_info *counter_info = &perf_cfg->counter_infos[index];
struct intel_perf_query_counter *counter = counter_info->counter;
info->group_id = counter_info->location.group_idx;
info->name = counter->name;
......@@ -93,7 +93,7 @@ iris_get_monitor_info(struct pipe_screen *pscreen, unsigned index,
static bool
iris_monitor_init_metrics(struct iris_screen *screen)
{
struct gen_perf_config *perf_cfg = gen_perf_new(screen);
struct intel_perf_config *perf_cfg = intel_perf_new(screen);
if (unlikely(!perf_cfg))
return false;
......@@ -101,7 +101,7 @@ iris_monitor_init_metrics(struct iris_screen *screen)
iris_perf_init_vtbl(perf_cfg);
gen_perf_init_metrics(perf_cfg, &screen->devinfo, screen->fd,
intel_perf_init_metrics(perf_cfg, &screen->devinfo, screen->fd,
true /* pipeline stats*/);
return perf_cfg->n_counters > 0;
......@@ -118,7 +118,7 @@ iris_get_monitor_group_info(struct pipe_screen *pscreen,
return 0;
}
const struct gen_perf_config *perf_cfg = screen->perf_cfg;
const struct intel_perf_config *perf_cfg = screen->perf_cfg;
if (!info) {
/* return the count that can be queried */
......@@ -130,7 +130,7 @@ iris_get_monitor_group_info(struct pipe_screen *pscreen,
return 0;
}
struct gen_perf_query_info *query = &perf_cfg->queries[group_index];
struct intel_perf_query_info *query = &perf_cfg->queries[group_index];
info->name = query->name;
info->max_active_queries = query->n_counters;
......@@ -144,13 +144,13 @@ iris_init_monitor_ctx(struct iris_context *ice)
{
struct iris_screen *screen = (struct iris_screen *) ice->ctx.screen;
ice->perf_ctx = gen_perf_new_context(ice);
ice->perf_ctx = intel_perf_new_context(ice);
if (unlikely(!ice->perf_ctx))
return;
struct gen_perf_context *perf_ctx = ice->perf_ctx;
struct gen_perf_config *perf_cfg = screen->perf_cfg;
gen_perf_init_context(perf_ctx,
struct intel_perf_context *perf_ctx = ice->perf_ctx;
struct intel_perf_config *perf_cfg = screen->perf_cfg;
intel_perf_init_context(perf_ctx,
perf_cfg,
ice,
ice,
......@@ -167,8 +167,8 @@ iris_create_monitor_object(struct iris_context *ice,
unsigned *query_types)
{
struct iris_screen *screen = (struct iris_screen *) ice->ctx.screen;
struct gen_perf_config *perf_cfg = screen->perf_cfg;
struct gen_perf_query_object *query_obj = NULL;
struct intel_perf_config *perf_cfg = screen->perf_cfg;
struct intel_perf_query_object *query_obj = NULL;
/* initialize perf context if this has not already been done. This
* function is the first entry point that carries the gl context.
......@@ -176,7 +176,7 @@ iris_create_monitor_object(struct iris_context *ice,
if (ice->perf_ctx == NULL) {
iris_init_monitor_ctx(ice);
}
struct gen_perf_context *perf_ctx = ice->perf_ctx;
struct intel_perf_context *perf_ctx = ice->perf_ctx;
assert(num_queries > 0);
int query_index = query_types[0] - PIPE_QUERY_DRIVER_SPECIFIC;
......@@ -204,8 +204,8 @@ iris_create_monitor_object(struct iris_context *ice,
perf_cfg->counter_infos[current_query_index].location.counter_idx;
}
/* create the gen_perf_query */
query_obj = gen_perf_new_query(perf_ctx, group);
/* create the intel_perf_query */
query_obj = intel_perf_new_query(perf_ctx, group);
if (unlikely(!query_obj))
goto allocation_failure;
......@@ -233,7 +233,7 @@ iris_destroy_monitor_object(struct pipe_context *ctx,
{
struct iris_context *ice = (struct iris_context *)ctx;
gen_perf_delete_query(ice->perf_ctx, monitor->query);
intel_perf_delete_query(ice->perf_ctx, monitor->query);
free(monitor->result_buffer);
monitor->result_buffer = NULL;
free(monitor->active_counters);
......@@ -246,9 +246,9 @@ iris_begin_monitor(struct pipe_context *ctx,
struct iris_monitor_object *monitor)
{
struct iris_context *ice = (void *) ctx;
struct gen_perf_context *perf_ctx = ice->perf_ctx;
struct intel_perf_context *perf_ctx = ice->perf_ctx;
return gen_perf_begin_query(perf_ctx, monitor->query);
return intel_perf_begin_query(perf_ctx, monitor->query);
}
bool
......@@ -256,9 +256,9 @@ iris_end_monitor(struct pipe_context *ctx,
struct iris_monitor_object *monitor)
{
struct iris_context *ice = (void *) ctx;
struct gen_perf_context *perf_ctx = ice->perf_ctx;
struct intel_perf_context *perf_ctx = ice->perf_ctx;
gen_perf_end_query(perf_ctx, monitor->query);
intel_perf_end_query(perf_ctx, monitor->query);
return true;
}
......@@ -269,22 +269,22 @@ iris_get_monitor_result(struct pipe_context *ctx,
union pipe_numeric_type_union *result)
{
struct iris_context *ice = (void *) ctx;
struct gen_perf_context *perf_ctx = ice->perf_ctx;
struct intel_perf_context *perf_ctx = ice->perf_ctx;
struct iris_batch *batch = &ice->batches[IRIS_BATCH_RENDER];
bool monitor_ready =
gen_perf_is_query_ready(perf_ctx, monitor->query, batch);
intel_perf_is_query_ready(perf_ctx, monitor->query, batch);
if (!monitor_ready) {
if (!wait)
return false;
gen_perf_wait_query(perf_ctx, monitor->query, batch);
intel_perf_wait_query(perf_ctx, monitor->query, batch);
}
assert(gen_perf_is_query_ready(perf_ctx, monitor->query, batch));
assert(intel_perf_is_query_ready(perf_ctx, monitor->query, batch));
unsigned bytes_written;
gen_perf_get_query_data(perf_ctx, monitor->query, batch,
intel_perf_get_query_data(perf_ctx, monitor->query, batch,
monitor->result_size,
(unsigned*) monitor->result_buffer,
&bytes_written);
......@@ -294,11 +294,11 @@ iris_get_monitor_result(struct pipe_context *ctx,
/* copy metrics into the batch result */
for (int i = 0; i < monitor->num_active_counters; ++i) {
int current_counter = monitor->active_counters[i];
const struct gen_perf_query_info *info =
gen_perf_query_info(monitor->query);
const struct gen_perf_query_counter *counter =
const struct intel_perf_query_info *info =
intel_perf_query_info(monitor->query);
const struct intel_perf_query_counter *counter =
&info->counters[current_counter];
assert(gen_perf_query_counter_get_size(counter));
assert(intel_perf_query_counter_get_size(counter));
switch (counter->data_type) {
case GEN_PERF_COUNTER_DATA_TYPE_UINT64:
result[i].u64 = *(uint64_t*)(monitor->result_buffer + counter->offset);
......
......@@ -83,7 +83,7 @@ typedef void (*bo_wait_rendering_t)(void *bo);
typedef int (*bo_busy_t)(void *bo);
void
iris_perf_init_vtbl(struct gen_perf_config *perf_cfg)
iris_perf_init_vtbl(struct intel_perf_config *perf_cfg)
{
perf_cfg->vtbl.bo_alloc = iris_oa_bo_alloc;
perf_cfg->vtbl.bo_unreference = (bo_unreference_t)iris_bo_unreference;
......
......@@ -26,6 +26,6 @@
#include "perf/intel_perf.h"
#include "perf/intel_perf_query.h"
void iris_perf_init_vtbl(struct gen_perf_config *cfg);
void iris_perf_init_vtbl(struct intel_perf_config *cfg);
#endif /* IRIS_PERF_H */
......@@ -27,7 +27,7 @@
struct iris_perf_query {
struct gl_perf_query_object base;
struct gen_perf_query_object *query;
struct intel_perf_query_object *query;
};
static unsigned
......@@ -35,9 +35,9 @@ iris_init_perf_query_info(struct pipe_context *pipe)
{
struct iris_context *ice = (void *) pipe;
struct iris_screen *screen = (struct iris_screen *) ice->ctx.screen;
struct gen_perf_config *perf_cfg = NULL;
struct intel_perf_config *perf_cfg = NULL;
/* make sure pipe perf counter type/data-type enums are matched with gen_perf's */
/* make sure pipe perf counter type/data-type enums are matched with intel_perf's */
STATIC_ASSERT(PIPE_PERF_COUNTER_TYPE_EVENT == (enum pipe_perf_counter_type)GEN_PERF_COUNTER_TYPE_EVENT);
STATIC_ASSERT(PIPE_PERF_COUNTER_TYPE_DURATION_NORM == (enum pipe_perf_counter_type)GEN_PERF_COUNTER_TYPE_DURATION_NORM);
STATIC_ASSERT(PIPE_PERF_COUNTER_TYPE_DURATION_RAW == (enum pipe_perf_counter_type)GEN_PERF_COUNTER_TYPE_DURATION_RAW);
......@@ -51,21 +51,21 @@ iris_init_perf_query_info(struct pipe_context *pipe)
STATIC_ASSERT(PIPE_PERF_COUNTER_DATA_TYPE_DOUBLE == (enum pipe_perf_counter_data_type)GEN_PERF_COUNTER_DATA_TYPE_DOUBLE);
if (!ice->perf_ctx)
ice->perf_ctx = gen_perf_new_context(ice);
ice->perf_ctx = intel_perf_new_context(ice);
if (unlikely(!ice->perf_ctx))
return 0;
perf_cfg = gen_perf_config(ice->perf_ctx);
perf_cfg = intel_perf_config(ice->perf_ctx);
if (perf_cfg)
return perf_cfg->n_queries;
perf_cfg = gen_perf_new(ice->perf_ctx);
perf_cfg = intel_perf_new(ice->perf_ctx);
iris_perf_init_vtbl(perf_cfg);
gen_perf_init_context(ice->perf_ctx,
intel_perf_init_context(ice->perf_ctx,
perf_cfg,
ice,
ice,
......@@ -74,7 +74,7 @@ iris_init_perf_query_info(struct pipe_context *pipe)
ice->batches[IRIS_BATCH_RENDER].hw_ctx_id,
screen->fd);
gen_perf_init_metrics(perf_cfg, &screen->devinfo, screen->fd, true /* pipeline_statistics */);
intel_perf_init_metrics(perf_cfg, &screen->devinfo, screen->fd, true /* pipeline_statistics */);
return perf_cfg->n_queries;
}
......@@ -83,14 +83,14 @@ static struct pipe_query *
iris_new_perf_query_obj(struct pipe_context *pipe, unsigned query_index)
{
struct iris_context *ice = (void *) pipe;
struct gen_perf_context *perf_ctx = ice->perf_ctx;
struct gen_perf_query_object * obj = gen_perf_new_query(perf_ctx, query_index);
struct intel_perf_context *perf_ctx = ice->perf_ctx;
struct intel_perf_query_object * obj = intel_perf_new_query(perf_ctx, query_index);
if (unlikely(!obj))
return NULL;
struct iris_perf_query *q = calloc(1, sizeof(struct iris_perf_query));
if (unlikely(!q)) {
gen_perf_delete_query(perf_ctx, obj);
intel_perf_delete_query(perf_ctx, obj);
return NULL;
}
......@@ -103,10 +103,10 @@ iris_begin_perf_query(struct pipe_context *pipe, struct pipe_query *q)
{
struct iris_context *ice = (void *) pipe;
struct iris_perf_query *perf_query= (struct iris_perf_query *) q;
struct gen_perf_query_object *obj = perf_query->query;
struct gen_perf_context *perf_ctx = ice->perf_ctx;
struct intel_perf_query_object *obj = perf_query->query;
struct intel_perf_context *perf_ctx = ice->perf_ctx;
return gen_perf_begin_query(perf_ctx, obj);
return intel_perf_begin_query(perf_ctx, obj);
}
static void
......@@ -114,10 +114,10 @@ iris_end_perf_query(struct pipe_context *pipe, struct pipe_query *q)
{
struct iris_context *ice = (void *) pipe;
struct iris_perf_query *perf_query = (struct iris_perf_query *) q;
struct gen_perf_query_object *obj = perf_query->query;
struct gen_perf_context *perf_ctx = ice->perf_ctx;
struct intel_perf_query_object *obj = perf_query->query;
struct intel_perf_context *perf_ctx = ice->perf_ctx;
gen_perf_end_query(perf_ctx, obj);
intel_perf_end_query(perf_ctx, obj);
}
static void
......@@ -125,10 +125,10 @@ iris_delete_perf_query(struct pipe_context *pipe, struct pipe_query *q)
{
struct iris_context *ice = (void *) pipe;
struct iris_perf_query *perf_query = (struct iris_perf_query *) q;
struct gen_perf_query_object *obj = perf_query->query;
struct gen_perf_context *perf_ctx = ice->perf_ctx;
struct intel_perf_query_object *obj = perf_query->query;
struct intel_perf_context *perf_ctx = ice->perf_ctx;
gen_perf_delete_query(perf_ctx, obj);
intel_perf_delete_query(perf_ctx, obj);
free(q);
}
......@@ -141,14 +141,14 @@ iris_get_perf_query_info(struct pipe_context *pipe,
uint32_t *n_active)
{
struct iris_context *ice = (void *) pipe;
struct gen_perf_context *perf_ctx = ice->perf_ctx;
struct gen_perf_config *perf_cfg = gen_perf_config(perf_ctx);
const struct gen_perf_query_info *info = &perf_cfg->queries[query_index];
struct intel_perf_context *perf_ctx = ice->perf_ctx;
struct intel_perf_config *perf_cfg = intel_perf_config(perf_ctx);
const struct intel_perf_query_info *info = &perf_cfg->queries[query_index];
*name = info->name;
*data_size = info->data_size;
*n_counters = info->n_counters;
*n_active = gen_perf_active_queries(perf_ctx, info);
*n_active = intel_perf_active_queries(perf_ctx, info);
}
static void
......@@ -164,15 +164,15 @@ iris_get_perf_counter_info(struct pipe_context *pipe,
uint64_t *raw_max)
{
struct iris_context *ice = (void *) pipe;
struct gen_perf_context *perf_ctx = ice->perf_ctx;
struct gen_perf_config *perf_cfg = gen_perf_config(perf_ctx);
const struct gen_perf_query_info *info = &perf_cfg->queries[query_index];
const struct gen_perf_query_counter *counter = &info->counters[counter_index];
struct intel_perf_context *perf_ctx = ice->perf_ctx;
struct intel_perf_config *perf_cfg = intel_perf_config(perf_ctx);
const struct intel_perf_query_info *info = &perf_cfg->queries[query_index];
const struct intel_perf_query_counter *counter = &info->counters[counter_index];
*name = counter->name;
*desc = counter->desc;
*offset = counter->offset;
*data_size = gen_perf_query_counter_get_size(counter);
*data_size = intel_perf_query_counter_get_size(counter);
*type_enum = counter->type;
*data_type_enum = counter->data_type;
*raw_max = counter->raw_max;
......@@ -183,10 +183,10 @@ iris_wait_perf_query(struct pipe_context *pipe, struct pipe_query *q)
{
struct iris_context *ice = (void *) pipe;
struct iris_perf_query *perf_query = (struct iris_perf_query *) q;
struct gen_perf_query_object *obj = perf_query->query;
struct gen_perf_context *perf_ctx = ice->perf_ctx;
struct intel_perf_query_object *obj = perf_query->query;
struct intel_perf_context *perf_ctx = ice->perf_ctx;
gen_perf_wait_query(perf_ctx, obj, &ice->batches[IRIS_BATCH_RENDER]);
intel_perf_wait_query(perf_ctx, obj, &ice->batches[IRIS_BATCH_RENDER]);
}
static bool
......@@ -194,13 +194,13 @@ iris_is_perf_query_ready(struct pipe_context *pipe, struct pipe_query *q)
{
struct iris_context *ice = (void *) pipe;
struct iris_perf_query *perf_query = (struct iris_perf_query *) q;
struct gen_perf_query_object *obj = perf_query->query;
struct gen_perf_context *perf_ctx = ice->perf_ctx;
struct intel_perf_query_object *obj = perf_query->query;
struct intel_perf_context *perf_ctx = ice->perf_ctx;
if (perf_query->base.Ready)
return true;
return gen_perf_is_query_ready(perf_ctx, obj, &ice->batches[IRIS_BATCH_RENDER]);
return intel_perf_is_query_ready(perf_ctx, obj, &ice->batches[IRIS_BATCH_RENDER]);
}
static void
......@@ -212,10 +212,10 @@ iris_get_perf_query_data(struct pipe_context *pipe,
{
struct iris_context *ice = (void *) pipe;
struct iris_perf_query *perf_query = (struct iris_perf_query *) q;
struct gen_perf_query_object *obj = perf_query->query;
struct gen_perf_context *perf_ctx = ice->perf_ctx;
struct intel_perf_query_object *obj = perf_query->query;
struct intel_perf_context *perf_ctx = ice->perf_ctx;
gen_perf_get_query_data(perf_ctx, obj, &ice->batches[IRIS_BATCH_RENDER],
intel_perf_get_query_data(perf_ctx, obj, &ice->batches[IRIS_BATCH_RENDER],
data_size, data, bytes_written);
}
......
......@@ -202,7 +202,7 @@ struct iris_screen {
struct isl_device isl_dev;
struct iris_bufmgr *bufmgr;
struct brw_compiler *compiler;
struct gen_perf_config *perf_cfg;
struct intel_perf_config *perf_cfg;
const struct intel_l3_config *l3_config_3d;
const struct intel_l3_config *l3_config_cs;
......
......@@ -286,10 +286,10 @@ def output_counter_read(gen, set, counter):
read_eq = counter.get('equation')
c("static " + ret_type)
c(counter.read_sym + "(UNUSED struct gen_perf_config *perf,\n")
c(counter.read_sym + "(UNUSED struct intel_perf_config *perf,\n")
c_indent(len(counter.read_sym) + 1)
c("const struct gen_perf_query_info *query,\n")
c("const struct gen_perf_query_result *results)\n")
c("const struct intel_perf_query_info *query,\n")
c("const struct intel_perf_query_result *results)\n")
c_outdent(len(counter.read_sym) + 1)
c("{")
......@@ -321,7 +321,7 @@ def output_counter_max(gen, set, counter):
ret_type = "uint64_t"
c("static " + ret_type)
c(counter.max_sym() + "(struct gen_perf_config *perf)\n")
c(counter.max_sym() + "(struct intel_perf_config *perf)\n")
c("{")
c_indent(3)
output_rpn_equation_code(set, counter, max_eq)
......@@ -468,7 +468,7 @@ def generate_register_configs(set):
c_indent(3)
registers = register_config.findall('register')
c("static const struct gen_perf_query_register_prog %s[] = {" % t)
c("static const struct intel_perf_query_register_prog %s[] = {" % t)
c_indent(3)
for register in registers:
c("{ .reg = %s, .val = %s }," % (register.get('address'), register.get('value')))
......@@ -666,7 +666,7 @@ def main():
h(textwrap.dedent("""\
#pragma once
struct gen_perf_config;
struct intel_perf_config;
"""))
......@@ -709,11 +709,11 @@ def main():
c("\n")
c("\nstatic void\n")
c("{0}_register_{1}_counter_query(struct gen_perf_config *perf)\n".format(gen.chipset, set.underscore_name))
c("{0}_register_{1}_counter_query(struct intel_perf_config *perf)\n".format(gen.chipset, set.underscore_name))
c("{\n")
c_indent(3)
c("struct gen_perf_query_info *query = rzalloc(perf, struct gen_perf_query_info);\n")
c("struct intel_perf_query_info *query = rzalloc(perf, struct intel_perf_query_info);\n")
c("\n")
c("query->perf = perf;\n")
c("query->kind = GEN_PERF_QUERY_TYPE_OA;\n")
......@@ -721,7 +721,7 @@ def main():
c("query->symbol_name = \"" + set.symbol_name + "\";\n")
c("query->guid = \"" + set.hw_config_guid + "\";\n")
c("query->counters = rzalloc_array(query, struct gen_perf_query_counter, %u);" % len(counters))
c("query->counters = rzalloc_array(query, struct intel_perf_query_counter, %u);" % len(counters))
c("query->n_counters = 0;")
c("query->oa_metrics_set_id = 0; /* determined at runtime, via sysfs */")
......@@ -751,7 +751,7 @@ def main():
c("\n")
c("struct gen_perf_query_counter *counter = query->counters;\n")
c("struct intel_perf_query_counter *counter = query->counters;\n")
c("\n")
c("/* Note: we're assuming there can't be any variation in the definition ")
......@@ -767,7 +767,7 @@ def main():
offset = output_counter_report(set, counter, offset)
c("\nquery->data_size = counter->offset + gen_perf_query_counter_get_size(counter);\n")
c("\nquery->data_size = counter->offset + intel_perf_query_counter_get_size(counter);\n")
c_outdent(3)
c("}");
......@@ -777,10 +777,10 @@ def main():
c_outdent(3)
c("}\n")
h("void gen_oa_register_queries_" + gen.chipset + "(struct gen_perf_config *perf);\n")
h("void gen_oa_register_queries_" + gen.chipset + "(struct intel_perf_config *perf);\n")
c("\nvoid")
c("gen_oa_register_queries_" + gen.chipset + "(struct gen_perf_config *perf)")
c("gen_oa_register_queries_" + gen.chipset + "(struct intel_perf_config *perf)")
c("{")
c_indent(3)
......
This diff is collapsed.
......@@ -43,10 +43,10 @@
struct intel_device_info;
struct gen_perf_config;
struct gen_perf_query_info;
struct intel_perf_config;
struct intel_perf_query_info;
enum gen_perf_counter_type {
enum intel_perf_counter_type {
GEN_PERF_COUNTER_TYPE_EVENT,
GEN_PERF_COUNTER_TYPE_DURATION_NORM,
GEN_PERF_COUNTER_TYPE_DURATION_RAW,
......@@ -55,7 +55,7 @@ enum gen_perf_counter_type {
GEN_PERF_COUNTER_TYPE_TIMESTAMP,
};
enum gen_perf_counter_data_type {
enum intel_perf_counter_data_type {
GEN_PERF_COUNTER_DATA_TYPE_BOOL32,
GEN_PERF_COUNTER_DATA_TYPE_UINT32,
GEN_PERF_COUNTER_DATA_TYPE_UINT64,
......@@ -63,7 +63,7 @@ enum gen_perf_counter_data_type {
GEN_PERF_COUNTER_DATA_TYPE_DOUBLE,
};
enum gen_perf_counter_units {
enum intel_perf_counter_units {
/* size */
GEN_PERF_COUNTER_UNITS_BYTES,
......@@ -124,7 +124,7 @@ struct gen_pipeline_stat {
#define I915_PERF_OA_SAMPLE_SIZE (8 + /* drm_i915_perf_record_header */ \
256) /* OA counter report */
struct gen_perf_query_result {
struct intel_perf_query_result {
/**
* Storage for the final accumulated OA counters.
*/
......@@ -168,49 +168,49 @@ struct gen_perf_query_result {
bool query_disjoint;
};
struct gen_perf_query_counter {
struct intel_perf_query_counter {
const char *name;
const char *desc;
const char *symbol_name;
const char *category;
enum gen_perf_counter_type type;
enum gen_perf_counter_data_type data_type;
enum gen_perf_counter_units units;
enum intel_perf_counter_type type;
enum intel_perf_counter_data_type data_type;
enum intel_perf_counter_units units;
uint64_t raw_max;
size_t offset;
union {
uint64_t (*oa_counter_read_uint64)(struct gen_perf_config *perf,
const struct gen_perf_query_info *query,
const struct gen_perf_query_result *results);
float (*oa_counter_read_float)(struct gen_perf_config *perf,
const struct gen_perf_query_info *query,
const struct gen_perf_query_result *results);
uint64_t (*oa_counter_read_uint64)(struct intel_perf_config *perf,
const struct intel_perf_query_info *query,
const struct intel_perf_query_result *results);
float (*oa_counter_read_float)(struct intel_perf_config *perf,
const struct intel_perf_query_info *query,
const struct intel_perf_query_result *results);
struct gen_pipeline_stat pipeline_stat;
};
};
struct gen_perf_query_register_prog {
struct intel_perf_query_register_prog {
uint32_t reg;
uint32_t val;
};
/* Register programming for a given query */
struct gen_perf_registers {
const struct gen_perf_query_register_prog *flex_regs;
struct intel_perf_registers {
const struct intel_perf_query_register_prog *flex_regs;
uint32_t n_flex_regs;