intel/perf: constify accumlator parameter
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Fri, 5 Oct 2018 16:29:17 +0000 (17:29 +0100)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Wed, 17 Apr 2019 13:10:42 +0000 (14:10 +0100)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Mark Janes <mark.a.janes@intel.com>
src/intel/perf/gen_perf.h
src/intel/perf/gen_perf.py

index 6e7a6d36c1570ec6a4f0e81cfeba606a33780e19..64db89ed6aa873ac40d5a2f222f24916bff75060 100644 (file)
@@ -110,10 +110,10 @@ struct gen_perf_query_counter {
    union {
       uint64_t (*oa_counter_read_uint64)(struct gen_perf *perf,
                                          const struct gen_perf_query_info *query,
    union {
       uint64_t (*oa_counter_read_uint64)(struct gen_perf *perf,
                                          const struct gen_perf_query_info *query,
-                                         uint64_t *accumulator);
+                                         const uint64_t *accumulator);
       float (*oa_counter_read_float)(struct gen_perf *perf,
                                      const struct gen_perf_query_info *query,
       float (*oa_counter_read_float)(struct gen_perf *perf,
                                      const struct gen_perf_query_info *query,
-                                     uint64_t *accumulator);
+                                     const uint64_t *accumulator);
       struct gen_pipeline_stat pipeline_stat;
    };
 };
       struct gen_pipeline_stat pipeline_stat;
    };
 };
index f7d0b86b2cf211767cf07e76ca73dcc91a89d186..8874845613aad5fb1835d7ff54535012cadfa75a 100644 (file)
@@ -281,7 +281,7 @@ def output_counter_read(gen, set, counter):
         c(counter.read_sym + "(MAYBE_UNUSED struct gen_perf *perf,\n")
         c_indent(len(counter.read_sym) + 1)
         c("const struct gen_perf_query_info *query,\n")
         c(counter.read_sym + "(MAYBE_UNUSED struct gen_perf *perf,\n")
         c_indent(len(counter.read_sym) + 1)
         c("const struct gen_perf_query_info *query,\n")
-        c("uint64_t *accumulator)\n")
+        c("const uint64_t *accumulator)\n")
         c_outdent(len(counter.read_sym) + 1)
 
         c("{")
         c_outdent(len(counter.read_sym) + 1)
 
         c("{")