perf tools: Refactor unit and scale function parameters
authorMatt Fleming <matt.fleming@intel.com>
Wed, 24 Sep 2014 14:04:06 +0000 (15:04 +0100)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 29 Sep 2014 18:03:57 +0000 (15:03 -0300)
commit46441bdc76fee08e297ebcf17e4ca91013b1ee9e
tree21787b6918ed42578cf673d284d119585bfb6ace
parent07394b5f13a04f86b27e0ddd96a36c7d9bfe1a4f
perf tools: Refactor unit and scale function parameters

Passing pointers to alias modifiers 'unit' and 'scale' isn't very
future-proof since if we add more modifiers to the list we'll end up
passing more arguments.

Instead wrap everything up in a struct perf_pmu_info, which can easily
be expanded when additional alias modifiers are necessary in the future.

Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1411567455-31264-3-git-send-email-matt@console-pimps.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/parse-events.c
tools/perf/util/pmu.c
tools/perf/util/pmu.h