Commit 39c12be8 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'perf-fixes-for-linus' of...

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
parents 231d0aef 0f940cb7
...@@ -102,6 +102,7 @@ static int op_create_counter(int cpu, int event) ...@@ -102,6 +102,7 @@ static int op_create_counter(int cpu, int event)
if (IS_ERR(pevent)) { if (IS_ERR(pevent)) {
ret = PTR_ERR(pevent); ret = PTR_ERR(pevent);
} else if (pevent->state != PERF_EVENT_STATE_ACTIVE) { } else if (pevent->state != PERF_EVENT_STATE_ACTIVE) {
perf_event_release_kernel(pevent);
pr_warning("oprofile: failed to enable event %d " pr_warning("oprofile: failed to enable event %d "
"on CPU %d\n", event, cpu); "on CPU %d\n", event, cpu);
ret = -EBUSY; ret = -EBUSY;
...@@ -365,6 +366,7 @@ int __init oprofile_arch_init(struct oprofile_operations *ops) ...@@ -365,6 +366,7 @@ int __init oprofile_arch_init(struct oprofile_operations *ops)
ret = init_driverfs(); ret = init_driverfs();
if (ret) { if (ret) {
kfree(counter_config); kfree(counter_config);
counter_config = NULL;
return ret; return ret;
} }
...@@ -402,7 +404,6 @@ void oprofile_arch_exit(void) ...@@ -402,7 +404,6 @@ void oprofile_arch_exit(void)
struct perf_event *event; struct perf_event *event;
if (*perf_events) { if (*perf_events) {
exit_driverfs();
for_each_possible_cpu(cpu) { for_each_possible_cpu(cpu) {
for (id = 0; id < perf_num_counters; ++id) { for (id = 0; id < perf_num_counters; ++id) {
event = perf_events[cpu][id]; event = perf_events[cpu][id];
...@@ -413,8 +414,10 @@ void oprofile_arch_exit(void) ...@@ -413,8 +414,10 @@ void oprofile_arch_exit(void)
} }
} }
if (counter_config) if (counter_config) {
kfree(counter_config); kfree(counter_config);
exit_driverfs();
}
} }
#else #else
int __init oprofile_arch_init(struct oprofile_operations *ops) int __init oprofile_arch_init(struct oprofile_operations *ops)
......
...@@ -660,8 +660,12 @@ static int p4_pmu_handle_irq(struct pt_regs *regs) ...@@ -660,8 +660,12 @@ static int p4_pmu_handle_irq(struct pt_regs *regs)
for (idx = 0; idx < x86_pmu.num_counters; idx++) { for (idx = 0; idx < x86_pmu.num_counters; idx++) {
int overflow; int overflow;
if (!test_bit(idx, cpuc->active_mask)) if (!test_bit(idx, cpuc->active_mask)) {
/* catch in-flight IRQs */
if (__test_and_clear_bit(idx, cpuc->running))
handled++;
continue; continue;
}
event = cpuc->events[idx]; event = cpuc->events[idx];
hwc = &event->hw; hwc = &event->hw;
......
...@@ -674,6 +674,7 @@ static int __init ppro_init(char **cpu_type) ...@@ -674,6 +674,7 @@ static int __init ppro_init(char **cpu_type)
case 0x0f: case 0x0f:
case 0x16: case 0x16:
case 0x17: case 0x17:
case 0x1d:
*cpu_type = "i386/core_2"; *cpu_type = "i386/core_2";
break; break;
case 0x1a: case 0x1a:
......
...@@ -1017,7 +1017,7 @@ builtin-revert.o wt-status.o: wt-status.h ...@@ -1017,7 +1017,7 @@ builtin-revert.o wt-status.o: wt-status.h
# we compile into subdirectories. if the target directory is not the source directory, they might not exists. So # we compile into subdirectories. if the target directory is not the source directory, they might not exists. So
# we depend the various files onto their directories. # we depend the various files onto their directories.
DIRECTORY_DEPS = $(LIB_OBJS) $(BUILTIN_OBJS) $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)common-cmds.h DIRECTORY_DEPS = $(LIB_OBJS) $(BUILTIN_OBJS) $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)common-cmds.h
$(DIRECTORY_DEPS): $(sort $(dir $(DIRECTORY_DEPS))) $(DIRECTORY_DEPS): | $(sort $(dir $(DIRECTORY_DEPS)))
# In the second step, we make a rule to actually create these directories # In the second step, we make a rule to actually create these directories
$(sort $(dir $(DIRECTORY_DEPS))): $(sort $(dir $(DIRECTORY_DEPS))):
$(QUIET_MKDIR)$(MKDIR) -p $@ 2>/dev/null $(QUIET_MKDIR)$(MKDIR) -p $@ 2>/dev/null
......
...@@ -97,7 +97,7 @@ void setup_python_scripting(void) ...@@ -97,7 +97,7 @@ void setup_python_scripting(void)
register_python_scripting(&python_scripting_unsupported_ops); register_python_scripting(&python_scripting_unsupported_ops);
} }
#else #else
struct scripting_ops python_scripting_ops; extern struct scripting_ops python_scripting_ops;
void setup_python_scripting(void) void setup_python_scripting(void)
{ {
...@@ -158,7 +158,7 @@ void setup_perl_scripting(void) ...@@ -158,7 +158,7 @@ void setup_perl_scripting(void)
register_perl_scripting(&perl_scripting_unsupported_ops); register_perl_scripting(&perl_scripting_unsupported_ops);
} }
#else #else
struct scripting_ops perl_scripting_ops; extern struct scripting_ops perl_scripting_ops;
void setup_perl_scripting(void) void setup_perl_scripting(void)
{ {
......
...@@ -773,7 +773,7 @@ int hists__browse(struct hists *self, const char *helpline, const char *ev_name) ...@@ -773,7 +773,7 @@ int hists__browse(struct hists *self, const char *helpline, const char *ev_name)
switch (key) { switch (key) {
case 'a': case 'a':
if (browser->selection->map == NULL && if (browser->selection->map == NULL ||
browser->selection->map->dso->annotate_warned) browser->selection->map->dso->annotate_warned)
continue; continue;
goto do_annotate; goto do_annotate;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment