diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-13 17:39:42 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-13 17:39:42 -0500 |
| commit | 9fdfbc2bff587f454dd95e2caa6d147c9abe39e4 (patch) | |
| tree | 2feaee47cbcfb57dd0d5cf23509e22011541e717 | |
| parent | 8cea4eb642890a1de58980e7e1617d1765ef8f7c (diff) | |
| parent | dc1d628a67a8f042e711ea5accc0beedc3ef0092 (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: Provide generic perf_sample_data initialization
MAINTAINERS: Add Arnaldo as tools/perf/ co-maintainer
perf trace: Don't use pager if scripting
perf trace/scripting: Remove extraneous header read
perf, ARM: Modify kuser rmb() call to compile for Thumb-2
x86/stacktrace: Don't dereference bad frame pointers
perf archive: Don't try to collect files without a build-id
perf_events, x86: Fixup fixed counter constraints
perf, x86: Restrict the ANY flag
perf, x86: rename macro in ARCH_PERFMON_EVENTSEL_ENABLE
perf, x86: add some IBS macros to perf_event.h
perf, x86: make IBS macros available in perf_event.h
hw-breakpoints: Remove stub unthrottle callback
x86/hw-breakpoints: Remove the name field
perf: Remove pointless breakpoint union
perf lock: Drop the buffers multiplexing dependency
perf lock: Fix and add misc documentally things
percpu: Add __percpu sparse annotations to hw_breakpoint
27 files changed, 327 insertions, 129 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index fe88b5f732cd..3341d92ff002 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
| @@ -4316,6 +4316,7 @@ PERFORMANCE EVENTS SUBSYSTEM | |||
| 4316 | M: Peter Zijlstra <a.p.zijlstra@chello.nl> | 4316 | M: Peter Zijlstra <a.p.zijlstra@chello.nl> |
| 4317 | M: Paul Mackerras <paulus@samba.org> | 4317 | M: Paul Mackerras <paulus@samba.org> |
| 4318 | M: Ingo Molnar <mingo@elte.hu> | 4318 | M: Ingo Molnar <mingo@elte.hu> |
| 4319 | M: Arnaldo Carvalho de Melo <acme@redhat.com> | ||
| 4319 | S: Supported | 4320 | S: Supported |
| 4320 | F: kernel/perf_event.c | 4321 | F: kernel/perf_event.c |
| 4321 | F: include/linux/perf_event.h | 4322 | F: include/linux/perf_event.h |
diff --git a/arch/arm/kernel/perf_event.c b/arch/arm/kernel/perf_event.c index c54ceb3d1f97..3875d99cc40f 100644 --- a/arch/arm/kernel/perf_event.c +++ b/arch/arm/kernel/perf_event.c | |||
| @@ -965,7 +965,7 @@ armv6pmu_handle_irq(int irq_num, | |||
| 965 | */ | 965 | */ |
| 966 | armv6_pmcr_write(pmcr); | 966 | armv6_pmcr_write(pmcr); |
| 967 | 967 | ||
| 968 | data.addr = 0; | 968 | perf_sample_data_init(&data, 0); |
| 969 | 969 | ||
| 970 | cpuc = &__get_cpu_var(cpu_hw_events); | 970 | cpuc = &__get_cpu_var(cpu_hw_events); |
| 971 | for (idx = 0; idx <= armpmu->num_events; ++idx) { | 971 | for (idx = 0; idx <= armpmu->num_events; ++idx) { |
| @@ -1945,7 +1945,7 @@ static irqreturn_t armv7pmu_handle_irq(int irq_num, void *dev) | |||
| 1945 | */ | 1945 | */ |
| 1946 | regs = get_irq_regs(); | 1946 | regs = get_irq_regs(); |
| 1947 | 1947 | ||
| 1948 | data.addr = 0; | 1948 | perf_sample_data_init(&data, 0); |
| 1949 | 1949 | ||
| 1950 | cpuc = &__get_cpu_var(cpu_hw_events); | 1950 | cpuc = &__get_cpu_var(cpu_hw_events); |
| 1951 | for (idx = 0; idx <= armpmu->num_events; ++idx) { | 1951 | for (idx = 0; idx <= armpmu->num_events; ++idx) { |
diff --git a/arch/powerpc/kernel/perf_event.c b/arch/powerpc/kernel/perf_event.c index b6cf8f1f4d35..5120bd44f69a 100644 --- a/arch/powerpc/kernel/perf_event.c +++ b/arch/powerpc/kernel/perf_event.c | |||
| @@ -1164,10 +1164,10 @@ static void record_and_restart(struct perf_event *event, unsigned long val, | |||
| 1164 | * Finally record data if requested. | 1164 | * Finally record data if requested. |
| 1165 | */ | 1165 | */ |
| 1166 | if (record) { | 1166 | if (record) { |
| 1167 | struct perf_sample_data data = { | 1167 | struct perf_sample_data data; |
| 1168 | .addr = ~0ULL, | 1168 | |
| 1169 | .period = event->hw.last_period, | 1169 | perf_sample_data_init(&data, ~0ULL); |
| 1170 | }; | 1170 | data.period = event->hw.last_period; |
| 1171 | 1171 | ||
| 1172 | if (event->attr.sample_type & PERF_SAMPLE_ADDR) | 1172 | if (event->attr.sample_type & PERF_SAMPLE_ADDR) |
| 1173 | perf_get_data_addr(regs, &data.addr); | 1173 | perf_get_data_addr(regs, &data.addr); |
diff --git a/arch/sparc/kernel/perf_event.c b/arch/sparc/kernel/perf_event.c index b867ab3353b4..68cb9b42088f 100644 --- a/arch/sparc/kernel/perf_event.c +++ b/arch/sparc/kernel/perf_event.c | |||
| @@ -1189,7 +1189,7 @@ static int __kprobes perf_event_nmi_handler(struct notifier_block *self, | |||
| 1189 | 1189 | ||
| 1190 | regs = args->regs; | 1190 | regs = args->regs; |
| 1191 | 1191 | ||
| 1192 | data.addr = 0; | 1192 | perf_sample_data_init(&data, 0); |
| 1193 | 1193 | ||
| 1194 | cpuc = &__get_cpu_var(cpu_hw_events); | 1194 | cpuc = &__get_cpu_var(cpu_hw_events); |
| 1195 | 1195 | ||
diff --git a/arch/x86/include/asm/hw_breakpoint.h b/arch/x86/include/asm/hw_breakpoint.h index 0675a7c4c20e..2a1bd8f4f23a 100644 --- a/arch/x86/include/asm/hw_breakpoint.h +++ b/arch/x86/include/asm/hw_breakpoint.h | |||
| @@ -10,7 +10,6 @@ | |||
| 10 | * (display/resolving) | 10 | * (display/resolving) |
| 11 | */ | 11 | */ |
| 12 | struct arch_hw_breakpoint { | 12 | struct arch_hw_breakpoint { |
| 13 | char *name; /* Contains name of the symbol to set bkpt */ | ||
| 14 | unsigned long address; | 13 | unsigned long address; |
| 15 | u8 len; | 14 | u8 len; |
| 16 | u8 type; | 15 | u8 type; |
diff --git a/arch/x86/include/asm/perf_event.h b/arch/x86/include/asm/perf_event.h index befd172c82ad..db6109a885a7 100644 --- a/arch/x86/include/asm/perf_event.h +++ b/arch/x86/include/asm/perf_event.h | |||
| @@ -18,7 +18,7 @@ | |||
| 18 | #define MSR_ARCH_PERFMON_EVENTSEL0 0x186 | 18 | #define MSR_ARCH_PERFMON_EVENTSEL0 0x186 |
| 19 | #define MSR_ARCH_PERFMON_EVENTSEL1 0x187 | 19 | #define MSR_ARCH_PERFMON_EVENTSEL1 0x187 |
| 20 | 20 | ||
| 21 | #define ARCH_PERFMON_EVENTSEL0_ENABLE (1 << 22) | 21 | #define ARCH_PERFMON_EVENTSEL_ENABLE (1 << 22) |
| 22 | #define ARCH_PERFMON_EVENTSEL_ANY (1 << 21) | 22 | #define ARCH_PERFMON_EVENTSEL_ANY (1 << 21) |
| 23 | #define ARCH_PERFMON_EVENTSEL_INT (1 << 20) | 23 | #define ARCH_PERFMON_EVENTSEL_INT (1 << 20) |
| 24 | #define ARCH_PERFMON_EVENTSEL_OS (1 << 17) | 24 | #define ARCH_PERFMON_EVENTSEL_OS (1 << 17) |
| @@ -50,7 +50,7 @@ | |||
| 50 | INTEL_ARCH_INV_MASK| \ | 50 | INTEL_ARCH_INV_MASK| \ |
| 51 | INTEL_ARCH_EDGE_MASK|\ | 51 | INTEL_ARCH_EDGE_MASK|\ |
| 52 | INTEL_ARCH_UNIT_MASK|\ | 52 | INTEL_ARCH_UNIT_MASK|\ |
| 53 | INTEL_ARCH_EVTSEL_MASK) | 53 | INTEL_ARCH_EVENT_MASK) |
| 54 | 54 | ||
| 55 | #define ARCH_PERFMON_UNHALTED_CORE_CYCLES_SEL 0x3c | 55 | #define ARCH_PERFMON_UNHALTED_CORE_CYCLES_SEL 0x3c |
| 56 | #define ARCH_PERFMON_UNHALTED_CORE_CYCLES_UMASK (0x00 << 8) | 56 | #define ARCH_PERFMON_UNHALTED_CORE_CYCLES_UMASK (0x00 << 8) |
| @@ -117,6 +117,18 @@ union cpuid10_edx { | |||
| 117 | */ | 117 | */ |
| 118 | #define X86_PMC_IDX_FIXED_BTS (X86_PMC_IDX_FIXED + 16) | 118 | #define X86_PMC_IDX_FIXED_BTS (X86_PMC_IDX_FIXED + 16) |
| 119 | 119 | ||
| 120 | /* IbsFetchCtl bits/masks */ | ||
| 121 | #define IBS_FETCH_RAND_EN (1ULL<<57) | ||
| 122 | #define IBS_FETCH_VAL (1ULL<<49) | ||
| 123 | #define IBS_FETCH_ENABLE (1ULL<<48) | ||
| 124 | #define IBS_FETCH_CNT 0xFFFF0000ULL | ||
| 125 | #define IBS_FETCH_MAX_CNT 0x0000FFFFULL | ||
| 126 | |||
| 127 | /* IbsOpCtl bits */ | ||
| 128 | #define IBS_OP_CNT_CTL (1ULL<<19) | ||
| 129 | #define IBS_OP_VAL (1ULL<<18) | ||
| 130 | #define IBS_OP_ENABLE (1ULL<<17) | ||
| 131 | #define IBS_OP_MAX_CNT 0x0000FFFFULL | ||
| 120 | 132 | ||
| 121 | #ifdef CONFIG_PERF_EVENTS | 133 | #ifdef CONFIG_PERF_EVENTS |
| 122 | extern void init_hw_perf_events(void); | 134 | extern void init_hw_perf_events(void); |
diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c index b1fbdeecf6c9..42aafd11e170 100644 --- a/arch/x86/kernel/cpu/perf_event.c +++ b/arch/x86/kernel/cpu/perf_event.c | |||
| @@ -73,10 +73,10 @@ struct debug_store { | |||
| 73 | struct event_constraint { | 73 | struct event_constraint { |
| 74 | union { | 74 | union { |
| 75 | unsigned long idxmsk[BITS_TO_LONGS(X86_PMC_IDX_MAX)]; | 75 | unsigned long idxmsk[BITS_TO_LONGS(X86_PMC_IDX_MAX)]; |
| 76 | u64 idxmsk64[1]; | 76 | u64 idxmsk64; |
| 77 | }; | 77 | }; |
