From 2e4f17d230d84579fef07836fb5f69bf1a0a47ad Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Wed, 13 Oct 2010 03:46:25 +0900 Subject: sh: oprofile: Fix up and extend op_name_from_perf_id(). op_name_from_perf_id() currently returns a local variable, which isn't terribly productive. As we only handle a single PMU case for now, simply allocate and free the string from the arch init/exit context and have op_name_from_perf_id() hand back the cached string. This also takes UTS_MACHINE in to account, given that we build for multiple architectures. Signed-off-by: Paul Mundt --- arch/sh/kernel/cpu/sh4/perf_event.c | 2 +- arch/sh/kernel/cpu/sh4a/perf_event.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/sh/kernel') diff --git a/arch/sh/kernel/cpu/sh4/perf_event.c b/arch/sh/kernel/cpu/sh4/perf_event.c index 7f9ecc9c2d0..dbf3b4bb71f 100644 --- a/arch/sh/kernel/cpu/sh4/perf_event.c +++ b/arch/sh/kernel/cpu/sh4/perf_event.c @@ -225,7 +225,7 @@ static void sh7750_pmu_enable_all(void) } static struct sh_pmu sh7750_pmu = { - .name = "SH7750", + .name = "sh7750", .num_events = 2, .event_map = sh7750_event_map, .max_events = ARRAY_SIZE(sh7750_general_events), diff --git a/arch/sh/kernel/cpu/sh4a/perf_event.c b/arch/sh/kernel/cpu/sh4a/perf_event.c index b8b873d8d6b..58027652573 100644 --- a/arch/sh/kernel/cpu/sh4a/perf_event.c +++ b/arch/sh/kernel/cpu/sh4a/perf_event.c @@ -259,7 +259,7 @@ static void sh4a_pmu_enable_all(void) } static struct sh_pmu sh4a_pmu = { - .name = "SH-4A", + .name = "sh4a", .num_events = 2, .event_map = sh4a_event_map, .max_events = ARRAY_SIZE(sh4a_general_events), -- cgit v1.2.3