aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-10-05 14:57:37 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-10-05 14:57:37 -0400
commit39c12be86aaedd2f81bfb2236aca5333a2334dea (patch)
treeba3edacaa130bc875813674ed960b100c9158e64
parent231d0aefd88e94129cb8fb84794f9bb788c6366e (diff)
parent0f940cb7d970f4fd569bb5f9f49774422f2ccbee (diff)
Merge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: perf trace scripting: Fix extern struct definitions perf ui hist browser: Fix segfault on 'a' for annotate perf tools: Fix build breakage perf, x86: Handle in flight NMIs on P4 platform oprofile, ARM: Release resources on failure oprofile: Add Support for Intel CPU Family 6 / Model 29
-rw-r--r--arch/arm/oprofile/common.c7
-rw-r--r--arch/x86/kernel/cpu/perf_event_p4.c6
-rw-r--r--arch/x86/oprofile/nmi_int.c1
-rw-r--r--tools/perf/Makefile2
-rw-r--r--tools/perf/util/trace-event-scripting.c4
-rw-r--r--tools/perf/util/ui/browsers/hists.c2
6 files changed, 15 insertions, 7 deletions
diff --git a/arch/arm/oprofile/common.c b/arch/arm/oprofile/common.c
index 0691176899ff..72e09eb642dd 100644
--- a/arch/arm/oprofile/common.c
+++ b/arch/arm/oprofile/common.c
@@ -102,6 +102,7 @@ static int op_create_counter(int cpu, int event)
102 if (IS_ERR(pevent)) { 102 if (IS_ERR(pevent)) {
103 ret = PTR_ERR(pevent); 103 ret = PTR_ERR(pevent);
104 } else if (pevent->state != PERF_EVENT_STATE_ACTIVE) { 104 } else if (pevent->state != PERF_EVENT_STATE_ACTIVE) {
105 perf_event_release_kernel(pevent);
105 pr_warning("oprofile: failed to enable event %d " 106 pr_warning("oprofile: failed to enable event %d "
106 "on CPU %d\n", event, cpu); 107 "on CPU %d\n", event, cpu);
107 ret = -EBUSY; 108 ret = -EBUSY;
@@ -365,6 +366,7 @@ int __init oprofile_arch_init(struct oprofile_operations *ops)
365 ret = init_driverfs(); 366 ret = init_driverfs();
366 if (ret) { 367 if (ret) {
367 kfree(counter_config); 368 kfree(counter_config);
369 counter_config = NULL;
368 return ret; 370 return ret;
369 } 371 }
370 372
@@ -402,7 +404,6 @@ void oprofile_arch_exit(void)
402 struct perf_event *event; 404 struct perf_event *event;
403 405
404 if (*perf_events) { 406 if (*perf_events) {
405 exit_driverfs();
406 for_each_possible_cpu(cpu) { 407 for_each_possible_cpu(cpu) {
407 for (id = 0; id < perf_num_counters; ++id) { 408 for (id = 0; id < perf_num_counters; ++id) {
408 event = perf_events[cpu][id]; 409 event = perf_events[cpu][id];
@@ -413,8 +414,10 @@ void oprofile_arch_exit(void)
413 } 414 }
414 } 415 }
415 416
416 if (counter_config) 417 if (counter_config) {
417 kfree(counter_config); 418 kfree(counter_config);
419 exit_driverfs();
420 }
418} 421}
419#else 422#else
420int __init oprofile_arch_init(struct oprofile_operations *ops) 423int __init oprofile_arch_init(struct oprofile_operations *ops)
diff --git a/arch/x86/kernel/cpu/perf_event_p4.c b/arch/x86/kernel/cpu/perf_event_p4.c
index b560db3305be..249015173992 100644
--- a/arch/x86/kernel/cpu/perf_event_p4.c
+++ b/arch/x86/kernel/cpu/perf_event_p4.c
@@ -660,8 +660,12 @@ static int p4_pmu_handle_irq(struct pt_regs *regs)
660 for (idx = 0; idx < x86_pmu.num_counters; idx++) { 660 for (idx = 0; idx < x86_pmu.num_counters; idx++) {
661 int overflow; 661 int overflow;
662 662
663 if (!test_bit(idx, cpuc->active_mask)) 663 if (!test_bit(idx, cpuc->active_mask)) {
664 /* catch in-flight IRQs */
665 if (__test_and_clear_bit(idx, cpuc->running))
666 handled++;
664 continue; 667 continue;
668 }
665 669
666 event = cpuc->events[idx]; 670 event = cpuc->events[idx];
667 hwc = &event->hw; 671 hwc = &event->hw;
diff --git a/arch/x86/oprofile/nmi_int.c b/arch/x86/oprofile/nmi_int.c
index 009b819f48d0..f1575c9a2572 100644
--- a/arch/x86/oprofile/nmi_int.c
+++ b/arch/x86/oprofile/nmi_int.c
@@ -674,6 +674,7 @@ static int __init ppro_init(char **cpu_type)
674 case 0x0f: 674 case 0x0f:
675 case 0x16: 675 case 0x16:
676 case 0x17: 676 case 0x17:
677 case 0x1d:
677 *cpu_type = "i386/core_2"; 678 *cpu_type = "i386/core_2";
678 break; 679 break;
679 case 0x1a: 680 case 0x1a:
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 4f1fa77c1feb..1950e19af1cf 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -1017,7 +1017,7 @@ builtin-revert.o wt-status.o: wt-status.h
1017# we compile into subdirectories. if the target directory is not the source directory, they might not exists. So 1017# we compile into subdirectories. if the target directory is not the source directory, they might not exists. So
1018# we depend the various files onto their directories. 1018# we depend the various files onto their directories.
1019DIRECTORY_DEPS = $(LIB_OBJS) $(BUILTIN_OBJS) $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)common-cmds.h 1019DIRECTORY_DEPS = $(LIB_OBJS) $(BUILTIN_OBJS) $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)common-cmds.h
1020$(DIRECTORY_DEPS): $(sort $(dir $(DIRECTORY_DEPS))) 1020$(DIRECTORY_DEPS): | $(sort $(dir $(DIRECTORY_DEPS)))
1021# In the second step, we make a rule to actually create these directories 1021# In the second step, we make a rule to actually create these directories
1022$(sort $(dir $(DIRECTORY_DEPS))): 1022$(sort $(dir $(DIRECTORY_DEPS))):
1023 $(QUIET_MKDIR)$(MKDIR) -p $@ 2>/dev/null 1023 $(QUIET_MKDIR)$(MKDIR) -p $@ 2>/dev/null
diff --git a/tools/perf/util/trace-event-scripting.c b/tools/perf/util/trace-event-scripting.c
index 7ea983acfaea..f7af2fca965d 100644
--- a/tools/perf/util/trace-event-scripting.c
+++ b/tools/perf/util/trace-event-scripting.c
@@ -97,7 +97,7 @@ void setup_python_scripting(void)
97 register_python_scripting(&python_scripting_unsupported_ops); 97 register_python_scripting(&python_scripting_unsupported_ops);
98} 98}
99#else 99#else
100struct scripting_ops python_scripting_ops; 100extern struct scripting_ops python_scripting_ops;
101 101
102void setup_python_scripting(void) 102void setup_python_scripting(void)
103{ 103{
@@ -158,7 +158,7 @@ void setup_perl_scripting(void)
158 register_perl_scripting(&perl_scripting_unsupported_ops); 158 register_perl_scripting(&perl_scripting_unsupported_ops);
159} 159}
160#else 160#else
161struct scripting_ops perl_scripting_ops; 161extern struct scripting_ops perl_scripting_ops;
162 162
163void setup_perl_scripting(void) 163void setup_perl_scripting(void)
164{ 164{
diff --git a/tools/perf/util/ui/browsers/hists.c b/tools/perf/util/ui/browsers/hists.c
index dafdf6775d77..6866aa4c41e0 100644
--- a/tools/perf/util/ui/browsers/hists.c
+++ b/tools/perf/util/ui/browsers/hists.c
@@ -773,7 +773,7 @@ int hists__browse(struct hists *self, const char *helpline, const char *ev_name)
773 773
774 switch (key) { 774 switch (key) {
775 case 'a': 775 case 'a':
776 if (browser->selection->map == NULL && 776 if (browser->selection->map == NULL ||
777 browser->selection->map->dso->annotate_warned) 777 browser->selection->map->dso->annotate_warned)
778 continue; 778 continue;
779 goto do_annotate; 779 goto do_annotate;