diff options
-rw-r--r-- | arch/arm/oprofile/common.c | 7 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/perf_event_p4.c | 6 | ||||
-rw-r--r-- | arch/x86/oprofile/nmi_int.c | 1 | ||||
-rw-r--r-- | tools/perf/Makefile | 2 | ||||
-rw-r--r-- | tools/perf/util/trace-event-scripting.c | 4 | ||||
-rw-r--r-- | tools/perf/util/ui/browsers/hists.c | 2 |
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 |
420 | int __init oprofile_arch_init(struct oprofile_operations *ops) | 423 | int __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. |
1019 | DIRECTORY_DEPS = $(LIB_OBJS) $(BUILTIN_OBJS) $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)common-cmds.h | 1019 | DIRECTORY_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 |
100 | struct scripting_ops python_scripting_ops; | 100 | extern struct scripting_ops python_scripting_ops; |
101 | 101 | ||
102 | void setup_python_scripting(void) | 102 | void 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 |
161 | struct scripting_ops perl_scripting_ops; | 161 | extern struct scripting_ops perl_scripting_ops; |
162 | 162 | ||
163 | void setup_perl_scripting(void) | 163 | void 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; |