summaryrefslogtreecommitdiffstats
path: root/src/intel/perf
diff options
context:
space:
mode:
Diffstat (limited to 'src/intel/perf')
-rw-r--r--src/intel/perf/gen_perf.c22
-rw-r--r--src/intel/perf/gen_perf.h18
-rw-r--r--src/intel/perf/gen_perf.py12
3 files changed, 26 insertions, 26 deletions
diff --git a/src/intel/perf/gen_perf.c b/src/intel/perf/gen_perf.c
index 648ec460afc..758353956fc 100644
--- a/src/intel/perf/gen_perf.c
+++ b/src/intel/perf/gen_perf.c
@@ -41,7 +41,7 @@
#define FILE_DEBUG_FLAG DEBUG_PERFMON
static bool
-get_sysfs_dev_dir(struct gen_perf *perf, int fd)
+get_sysfs_dev_dir(struct gen_perf_config *perf, int fd)
{
struct stat sb;
int min, maj;
@@ -125,7 +125,7 @@ read_file_uint64(const char *file, uint64_t *val)
}
static bool
-read_sysfs_drm_device_file_uint64(struct gen_perf *perf,
+read_sysfs_drm_device_file_uint64(struct gen_perf_config *perf,
const char *file,
uint64_t *value)
{
@@ -142,7 +142,7 @@ read_sysfs_drm_device_file_uint64(struct gen_perf *perf,
}
static void
-register_oa_config(struct gen_perf *perf,
+register_oa_config(struct gen_perf_config *perf,
const struct gen_perf_query_info *query,
uint64_t config_id)
{
@@ -156,7 +156,7 @@ register_oa_config(struct gen_perf *perf,
}
static void
-enumerate_sysfs_metrics(struct gen_perf *perf)
+enumerate_sysfs_metrics(struct gen_perf_config *perf)
{
DIR *metricsdir = NULL;
struct dirent *metric_entry;
@@ -210,7 +210,7 @@ enumerate_sysfs_metrics(struct gen_perf *perf)
}
static bool
-kernel_has_dynamic_config_support(struct gen_perf *perf, int fd)
+kernel_has_dynamic_config_support(struct gen_perf_config *perf, int fd)
{
uint64_t invalid_config_id = UINT64_MAX;
@@ -219,7 +219,7 @@ kernel_has_dynamic_config_support(struct gen_perf *perf, int fd)
}
bool
-gen_perf_load_metric_id(struct gen_perf *perf, const char *guid,
+gen_perf_load_metric_id(struct gen_perf_config *perf, const char *guid,
uint64_t *metric_id)
{
char config_path[280];
@@ -232,7 +232,7 @@ gen_perf_load_metric_id(struct gen_perf *perf, const char *guid,
}
static void
-init_oa_configs(struct gen_perf *perf, int fd)
+init_oa_configs(struct gen_perf_config *perf, int fd)
{
hash_table_foreach(perf->oa_metrics_table, entry) {
const struct gen_perf_query_info *query = entry->data;
@@ -272,7 +272,7 @@ init_oa_configs(struct gen_perf *perf, int fd)
}
static void
-compute_topology_builtins(struct gen_perf *perf,
+compute_topology_builtins(struct gen_perf_config *perf,
const struct gen_device_info *devinfo)
{
perf->sys_vars.slice_mask = devinfo->slice_masks;
@@ -308,7 +308,7 @@ compute_topology_builtins(struct gen_perf *perf,
}
static bool
-init_oa_sys_vars(struct gen_perf *perf, const struct gen_device_info *devinfo)
+init_oa_sys_vars(struct gen_perf_config *perf, const struct gen_device_info *devinfo)
{
uint64_t min_freq_mhz = 0, max_freq_mhz = 0;
@@ -328,7 +328,7 @@ init_oa_sys_vars(struct gen_perf *perf, const struct gen_device_info *devinfo)
return true;
}
-typedef void (*perf_register_oa_queries_t)(struct gen_perf *);
+typedef void (*perf_register_oa_queries_t)(struct gen_perf_config *);
static perf_register_oa_queries_t
get_register_queries_function(const struct gen_device_info *devinfo)
@@ -372,7 +372,7 @@ get_register_queries_function(const struct gen_device_info *devinfo)
}
bool
-gen_perf_load_oa_metrics(struct gen_perf *perf, int fd,
+gen_perf_load_oa_metrics(struct gen_perf_config *perf, int fd,
const struct gen_device_info *devinfo)
{
perf_register_oa_queries_t oa_register = get_register_queries_function(devinfo);
diff --git a/src/intel/perf/gen_perf.h b/src/intel/perf/gen_perf.h
index 64db89ed6aa..cb2768e45ce 100644
--- a/src/intel/perf/gen_perf.h
+++ b/src/intel/perf/gen_perf.h
@@ -35,7 +35,7 @@
struct gen_device_info;
-struct gen_perf;
+struct gen_perf_config;
struct gen_perf_query_info;
enum gen_perf_counter_type {
@@ -108,10 +108,10 @@ struct gen_perf_query_counter {
size_t offset;
union {
- uint64_t (*oa_counter_read_uint64)(struct gen_perf *perf,
+ uint64_t (*oa_counter_read_uint64)(struct gen_perf_config *perf,
const struct gen_perf_query_info *query,
const uint64_t *accumulator);
- float (*oa_counter_read_float)(struct gen_perf *perf,
+ float (*oa_counter_read_float)(struct gen_perf_config *perf,
const struct gen_perf_query_info *query,
const uint64_t *accumulator);
struct gen_pipeline_stat pipeline_stat;
@@ -158,7 +158,7 @@ struct gen_perf_query_info {
uint32_t n_b_counter_regs;
};
-struct gen_perf {
+struct gen_perf_config {
struct gen_perf_query_info *queries;
int n_queries;
@@ -212,7 +212,7 @@ gen_perf_query_counter_get_size(const struct gen_perf_query_counter *counter)
}
static inline struct gen_perf_query_info *
-gen_perf_query_append_query_info(struct gen_perf *perf, int max_counters)
+gen_perf_query_append_query_info(struct gen_perf_config *perf, int max_counters)
{
struct gen_perf_query_info *query;
@@ -263,19 +263,19 @@ gen_perf_query_info_add_basic_stat_reg(struct gen_perf_query_info *query,
gen_perf_query_info_add_stat_reg(query, reg, 1, 1, name, name);
}
-static inline struct gen_perf *
+static inline struct gen_perf_config *
gen_perf_new(void *ctx, int (*ioctl_cb)(int, unsigned long, void *))
{
- struct gen_perf *perf = rzalloc(ctx, struct gen_perf);
+ struct gen_perf_config *perf = rzalloc(ctx, struct gen_perf_config);
perf->ioctl = ioctl_cb;
return perf;
}
-bool gen_perf_load_oa_metrics(struct gen_perf *perf, int fd,
+bool gen_perf_load_oa_metrics(struct gen_perf_config *perf, int fd,
const struct gen_device_info *devinfo);
-bool gen_perf_load_metric_id(struct gen_perf *perf, const char *guid,
+bool gen_perf_load_metric_id(struct gen_perf_config *perf, const char *guid,
uint64_t *metric_id);
void gen_perf_query_result_read_frequencies(struct gen_perf_query_result *result,
diff --git a/src/intel/perf/gen_perf.py b/src/intel/perf/gen_perf.py
index ef3aca64f2e..6f42c04dab8 100644
--- a/src/intel/perf/gen_perf.py
+++ b/src/intel/perf/gen_perf.py
@@ -278,7 +278,7 @@ def output_counter_read(gen, set, counter):
read_eq = counter.get('equation')
c("static " + ret_type)
- c(counter.read_sym + "(UNUSED struct gen_perf *perf,\n")
+ c(counter.read_sym + "(UNUSED struct gen_perf_config *perf,\n")
c_indent(len(counter.read_sym) + 1)
c("const struct gen_perf_query_info *query,\n")
c("const uint64_t *accumulator)\n")
@@ -313,7 +313,7 @@ def output_counter_max(gen, set, counter):
ret_type = "uint64_t"
c("static " + ret_type)
- c(counter.max_sym() + "(struct gen_perf *perf)\n")
+ c(counter.max_sym() + "(struct gen_perf_config *perf)\n")
c("{")
c_indent(3)
output_rpn_equation_code(set, counter, max_eq)
@@ -611,7 +611,7 @@ def main():
h(textwrap.dedent("""\
#pragma once
- struct gen_perf;
+ struct gen_perf_config;
"""))
@@ -700,7 +700,7 @@ def main():
c("};\n")
c("\nstatic void\n")
- c("{0}_register_{1}_counter_query(struct gen_perf *perf)\n".format(gen.chipset, set.underscore_name))
+ c("{0}_register_{1}_counter_query(struct gen_perf_config *perf)\n".format(gen.chipset, set.underscore_name))
c("{\n")
c_indent(3)
@@ -731,10 +731,10 @@ def main():
c_outdent(3)
c("}\n")
- h("void gen_oa_register_queries_" + gen.chipset + "(struct gen_perf *perf);\n")
+ h("void gen_oa_register_queries_" + gen.chipset + "(struct gen_perf_config *perf);\n")
c("\nvoid")
- c("gen_oa_register_queries_" + gen.chipset + "(struct gen_perf *perf)")
+ c("gen_oa_register_queries_" + gen.chipset + "(struct gen_perf_config *perf)")
c("{")
c_indent(3)