Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'perf/urgent' into perf/core

Conflicts:
tools/perf/util/ui/browsers/hists.c

Merge reason: fix the conflict and merge in changes for dependent patch.

Signed-off-by: Ingo Molnar <mingo@elte.hu>

+27 -7
+5 -2
arch/arm/oprofile/common.c
··· 102 102 if (IS_ERR(pevent)) { 103 103 ret = PTR_ERR(pevent); 104 104 } else if (pevent->state != PERF_EVENT_STATE_ACTIVE) { 105 + perf_event_release_kernel(pevent); 105 106 pr_warning("oprofile: failed to enable event %d " 106 107 "on CPU %d\n", event, cpu); 107 108 ret = -EBUSY; ··· 366 365 ret = init_driverfs(); 367 366 if (ret) { 368 367 kfree(counter_config); 368 + counter_config = NULL; 369 369 return ret; 370 370 } 371 371 ··· 404 402 struct perf_event *event; 405 403 406 404 if (*perf_events) { 407 - exit_driverfs(); 408 405 for_each_possible_cpu(cpu) { 409 406 for (id = 0; id < perf_num_counters; ++id) { 410 407 event = perf_events[cpu][id]; ··· 414 413 } 415 414 } 416 415 417 - if (counter_config) 416 + if (counter_config) { 418 417 kfree(counter_config); 418 + exit_driverfs(); 419 + } 419 420 } 420 421 #else 421 422 int __init oprofile_arch_init(struct oprofile_operations *ops)
+2
arch/x86/kernel/Makefile
··· 11 11 CFLAGS_REMOVE_tsc.o = -pg 12 12 CFLAGS_REMOVE_rtc.o = -pg 13 13 CFLAGS_REMOVE_paravirt-spinlocks.o = -pg 14 + CFLAGS_REMOVE_pvclock.o = -pg 15 + CFLAGS_REMOVE_kvmclock.o = -pg 14 16 CFLAGS_REMOVE_ftrace.o = -pg 15 17 CFLAGS_REMOVE_early_printk.o = -pg 16 18 endif
+11 -1
arch/x86/kernel/cpu/perf_event.c
··· 102 102 */ 103 103 struct perf_event *events[X86_PMC_IDX_MAX]; /* in counter order */ 104 104 unsigned long active_mask[BITS_TO_LONGS(X86_PMC_IDX_MAX)]; 105 + unsigned long running[BITS_TO_LONGS(X86_PMC_IDX_MAX)]; 105 106 int enabled; 106 107 107 108 int n_events; ··· 1035 1034 1036 1035 cpuc->events[idx] = event; 1037 1036 __set_bit(idx, cpuc->active_mask); 1037 + __set_bit(idx, cpuc->running); 1038 1038 x86_pmu.enable(event); 1039 1039 perf_event_update_userpage(event); 1040 1040 } ··· 1161 1159 cpuc = &__get_cpu_var(cpu_hw_events); 1162 1160 1163 1161 for (idx = 0; idx < x86_pmu.num_counters; idx++) { 1164 - if (!test_bit(idx, cpuc->active_mask)) 1162 + if (!test_bit(idx, cpuc->active_mask)) { 1163 + /* 1164 + * Though we deactivated the counter some cpus 1165 + * might still deliver spurious interrupts still 1166 + * in flight. Catch them: 1167 + */ 1168 + if (__test_and_clear_bit(idx, cpuc->running)) 1169 + handled++; 1165 1170 continue; 1171 + } 1166 1172 1167 1173 event = cpuc->events[idx]; 1168 1174 hwc = &event->hw;
+5 -1
arch/x86/kernel/cpu/perf_event_p4.c
··· 904 904 for (idx = 0; idx < x86_pmu.num_counters; idx++) { 905 905 int overflow; 906 906 907 - if (!test_bit(idx, cpuc->active_mask)) 907 + if (!test_bit(idx, cpuc->active_mask)) { 908 + /* catch in-flight IRQs */ 909 + if (__test_and_clear_bit(idx, cpuc->running)) 910 + handled++; 908 911 continue; 912 + } 909 913 910 914 event = cpuc->events[idx]; 911 915 hwc = &event->hw;
+1
arch/x86/oprofile/nmi_int.c
··· 674 674 case 0x0f: 675 675 case 0x16: 676 676 case 0x17: 677 + case 0x1d: 677 678 *cpu_type = "i386/core_2"; 678 679 break; 679 680 case 0x1a:
+1 -1
tools/perf/Makefile
··· 1035 1035 # we compile into subdirectories. if the target directory is not the source directory, they might not exists. So 1036 1036 # we depend the various files onto their directories. 1037 1037 DIRECTORY_DEPS = $(LIB_OBJS) $(BUILTIN_OBJS) $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)common-cmds.h 1038 - $(DIRECTORY_DEPS): $(sort $(dir $(DIRECTORY_DEPS))) 1038 + $(DIRECTORY_DEPS): | $(sort $(dir $(DIRECTORY_DEPS))) 1039 1039 # In the second step, we make a rule to actually create these directories 1040 1040 $(sort $(dir $(DIRECTORY_DEPS))): 1041 1041 $(QUIET_MKDIR)$(MKDIR) -p $@ 2>/dev/null
+2 -2
tools/perf/util/trace-event-scripting.c
··· 97 97 register_python_scripting(&python_scripting_unsupported_ops); 98 98 } 99 99 #else 100 - struct scripting_ops python_scripting_ops; 100 + extern struct scripting_ops python_scripting_ops; 101 101 102 102 void setup_python_scripting(void) 103 103 { ··· 158 158 register_perl_scripting(&perl_scripting_unsupported_ops); 159 159 } 160 160 #else 161 - struct scripting_ops perl_scripting_ops; 161 + extern struct scripting_ops perl_scripting_ops; 162 162 163 163 void setup_perl_scripting(void) 164 164 {