aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/pmu.h
diff options
context:
space:
mode:
authorStephane Eranian <eranian@google.com>2014-01-17 16:34:05 +0100
committerArnaldo Carvalho de Melo <acme@redhat.com>2014-01-20 16:19:08 -0300
commit8a398897ff21f73cb8b15a19514660f032926882 (patch)
treebb08e1fcfe48e09b30ec21f67b7b7fbb5fb7f176 /tools/perf/util/pmu.h
parentperf tools: Add support for the xtensa architecture (diff)
downloadlinux-dev-8a398897ff21f73cb8b15a19514660f032926882.tar.xz
linux-dev-8a398897ff21f73cb8b15a19514660f032926882.zip
perf stat: fix NULL pointer reference bug with event unit
This patch fixes a problem with the handling of the newly introduced optional event unit. The following cmdline caused a segfault: $ perf stat -e cpu/event-0x3c/ ls This patch fixes the problem with the default setting for alias->unit which was eventually causing the segfault. Signed-off-by: Stephane Eranian <eranian@google.com> Cc: David Ahern <dsahern@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/1389972846-6566-2-git-send-email-eranian@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/pmu.h')
-rw-r--r--tools/perf/util/pmu.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/pmu.h b/tools/perf/util/pmu.h
index 9183380e2038..8b64125a9281 100644
--- a/tools/perf/util/pmu.h
+++ b/tools/perf/util/pmu.h
@@ -29,7 +29,7 @@ int perf_pmu__config_terms(struct list_head *formats,
struct perf_event_attr *attr,
struct list_head *head_terms);
int perf_pmu__check_alias(struct perf_pmu *pmu, struct list_head *head_terms,
- char **unit, double *scale);
+ const char **unit, double *scale);
struct list_head *perf_pmu__alias(struct perf_pmu *pmu,
struct list_head *head_terms);
int perf_pmu_wrap(void);