diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-21 12:06:31 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-21 12:06:31 -0400 |
commit | f4eccb6d979e0cc5a719a50af5f9a56e79092a2d (patch) | |
tree | 00b3ca17251430ce1336d813cf76e95ccdd55099 /arch/x86 | |
parent | 8e4bc3dd2ca07d77882eba73cea240aba95a1854 (diff) | |
parent | cd74c86bdf705f824d494a2bbda393d1d562b40a (diff) |
Merge branch 'perfcounters-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'perfcounters-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
perf_counter, powerpc, sparc: Fix compilation after perf_counter_overflow() change
perf_counter: x86: Fix PMU resource leak
perf util: SVG performance improvements
perf util: Make the timechart SVG width dynamic
perf timechart: Show the duration of scheduler delays in the SVG
perf timechart: Show the name of the waker/wakee in timechart
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kernel/cpu/perf_counter.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/x86/kernel/cpu/perf_counter.c b/arch/x86/kernel/cpu/perf_counter.c index dbdf712fae9..a6c8b27553c 100644 --- a/arch/x86/kernel/cpu/perf_counter.c +++ b/arch/x86/kernel/cpu/perf_counter.c | |||
@@ -924,6 +924,8 @@ static int __hw_perf_counter_init(struct perf_counter *counter) | |||
924 | if (err) | 924 | if (err) |
925 | return err; | 925 | return err; |
926 | 926 | ||
927 | counter->destroy = hw_perf_counter_destroy; | ||
928 | |||
927 | /* | 929 | /* |
928 | * Generate PMC IRQs: | 930 | * Generate PMC IRQs: |
929 | * (keep 'enabled' bit clear for now) | 931 | * (keep 'enabled' bit clear for now) |
@@ -953,8 +955,6 @@ static int __hw_perf_counter_init(struct perf_counter *counter) | |||
953 | return -EOPNOTSUPP; | 955 | return -EOPNOTSUPP; |
954 | } | 956 | } |
955 | 957 | ||
956 | counter->destroy = hw_perf_counter_destroy; | ||
957 | |||
958 | /* | 958 | /* |
959 | * Raw event type provide the config in the event structure | 959 | * Raw event type provide the config in the event structure |
960 | */ | 960 | */ |
@@ -2107,8 +2107,11 @@ const struct pmu *hw_perf_counter_init(struct perf_counter *counter) | |||
2107 | int err; | 2107 | int err; |
2108 | 2108 | ||
2109 | err = __hw_perf_counter_init(counter); | 2109 | err = __hw_perf_counter_init(counter); |
2110 | if (err) | 2110 | if (err) { |
2111 | if (counter->destroy) | ||
2112 | counter->destroy(counter); | ||
2111 | return ERR_PTR(err); | 2113 | return ERR_PTR(err); |
2114 | } | ||
2112 | 2115 | ||
2113 | return &pmu; | 2116 | return &pmu; |
2114 | } | 2117 | } |