diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2019-08-09 10:53:39 -0400 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2019-08-09 10:53:39 -0400 |
commit | 0e1c438c44dd9cde56effb44c5f1cfeda72e108d (patch) | |
tree | fa3492d4d7d8b7444e5d8ebe6c78210826333e4b /tools/perf/builtin-script.c | |
parent | c096397c78f766db972f923433031f2dec01cae0 (diff) | |
parent | cdb2d3ee0436d74fa9092f2df46aaa6f9e03c969 (diff) |
Merge tag 'kvmarm-fixes-for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD
KVM/arm fixes for 5.3
- A bunch of switch/case fall-through annotation, fixing one actual bug
- Fix PMU reset bug
- Add missing exception class debug strings
Diffstat (limited to 'tools/perf/builtin-script.c')
-rw-r--r-- | tools/perf/builtin-script.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c index 2f6232f1bfdc..8f24865596af 100644 --- a/tools/perf/builtin-script.c +++ b/tools/perf/builtin-script.c | |||
@@ -14,7 +14,6 @@ | |||
14 | #include "util/symbol.h" | 14 | #include "util/symbol.h" |
15 | #include "util/thread.h" | 15 | #include "util/thread.h" |
16 | #include "util/trace-event.h" | 16 | #include "util/trace-event.h" |
17 | #include "util/util.h" | ||
18 | #include "util/evlist.h" | 17 | #include "util/evlist.h" |
19 | #include "util/evsel.h" | 18 | #include "util/evsel.h" |
20 | #include "util/sort.h" | 19 | #include "util/sort.h" |
@@ -34,6 +33,7 @@ | |||
34 | #include <linux/kernel.h> | 33 | #include <linux/kernel.h> |
35 | #include <linux/stringify.h> | 34 | #include <linux/stringify.h> |
36 | #include <linux/time64.h> | 35 | #include <linux/time64.h> |
36 | #include <linux/zalloc.h> | ||
37 | #include <sys/utsname.h> | 37 | #include <sys/utsname.h> |
38 | #include "asm/bug.h" | 38 | #include "asm/bug.h" |
39 | #include "util/mem-events.h" | 39 | #include "util/mem-events.h" |
@@ -2289,6 +2289,12 @@ static int process_switch_event(struct perf_tool *tool, | |||
2289 | if (perf_event__process_switch(tool, event, sample, machine) < 0) | 2289 | if (perf_event__process_switch(tool, event, sample, machine) < 0) |
2290 | return -1; | 2290 | return -1; |
2291 | 2291 | ||
2292 | if (scripting_ops && scripting_ops->process_switch) | ||
2293 | scripting_ops->process_switch(event, sample, machine); | ||
2294 | |||
2295 | if (!script->show_switch_events) | ||
2296 | return 0; | ||
2297 | |||
2292 | thread = machine__findnew_thread(machine, sample->pid, | 2298 | thread = machine__findnew_thread(machine, sample->pid, |
2293 | sample->tid); | 2299 | sample->tid); |
2294 | if (thread == NULL) { | 2300 | if (thread == NULL) { |
@@ -2467,7 +2473,7 @@ static int __cmd_script(struct perf_script *script) | |||
2467 | script->tool.mmap = process_mmap_event; | 2473 | script->tool.mmap = process_mmap_event; |
2468 | script->tool.mmap2 = process_mmap2_event; | 2474 | script->tool.mmap2 = process_mmap2_event; |
2469 | } | 2475 | } |
2470 | if (script->show_switch_events) | 2476 | if (script->show_switch_events || (scripting_ops && scripting_ops->process_switch)) |
2471 | script->tool.context_switch = process_switch_event; | 2477 | script->tool.context_switch = process_switch_event; |
2472 | if (script->show_namespace_events) | 2478 | if (script->show_namespace_events) |
2473 | script->tool.namespaces = process_namespaces_event; | 2479 | script->tool.namespaces = process_namespaces_event; |
@@ -3752,7 +3758,8 @@ int cmd_script(int argc, const char **argv) | |||
3752 | goto out_delete; | 3758 | goto out_delete; |
3753 | 3759 | ||
3754 | uname(&uts); | 3760 | uname(&uts); |
3755 | if (!strcmp(uts.machine, session->header.env.arch) || | 3761 | if (data.is_pipe || /* assume pipe_mode indicates native_arch */ |
3762 | !strcmp(uts.machine, session->header.env.arch) || | ||
3756 | (!strcmp(uts.machine, "x86_64") && | 3763 | (!strcmp(uts.machine, "x86_64") && |
3757 | !strcmp(session->header.env.arch, "i386"))) | 3764 | !strcmp(session->header.env.arch, "i386"))) |
3758 | native_arch = true; | 3765 | native_arch = true; |