diff options
author | Ingo Molnar <mingo@kernel.org> | 2012-07-18 05:17:17 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2012-07-18 05:17:17 -0400 |
commit | a2fe194723f6e4990d01d8c208c7b138fd410522 (patch) | |
tree | 7aee93fa8f4ba1e18b56fa7d8eab75d249fc6966 /tools/perf/util | |
parent | c3b7cdf180090d2686239a75bb0ae408108ed749 (diff) | |
parent | a018540141a931f5299a866907b27886916b4374 (diff) |
Merge branch 'linus' into perf/core
Pick up the latest ring-buffer fixes, before applying a new fix.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/util')
-rw-r--r-- | tools/perf/util/map.c | 29 | ||||
-rw-r--r-- | tools/perf/util/session.c | 2 | ||||
-rw-r--r-- | tools/perf/util/trace-event-parse.c | 3 |
3 files changed, 17 insertions, 17 deletions
diff --git a/tools/perf/util/map.c b/tools/perf/util/map.c index 35ae56864e4f..a1f4e3669142 100644 --- a/tools/perf/util/map.c +++ b/tools/perf/util/map.c | |||
@@ -669,25 +669,26 @@ struct machine *machines__find(struct rb_root *self, pid_t pid) | |||
669 | struct machine *machines__findnew(struct rb_root *self, pid_t pid) | 669 | struct machine *machines__findnew(struct rb_root *self, pid_t pid) |
670 | { | 670 | { |
671 | char path[PATH_MAX]; | 671 | char path[PATH_MAX]; |
672 | const char *root_dir; | 672 | const char *root_dir = ""; |
673 | struct machine *machine = machines__find(self, pid); | 673 | struct machine *machine = machines__find(self, pid); |
674 | 674 | ||
675 | if (!machine || machine->pid != pid) { | 675 | if (machine && (machine->pid == pid)) |
676 | if (pid == HOST_KERNEL_ID || pid == DEFAULT_GUEST_KERNEL_ID) | 676 | goto out; |
677 | root_dir = ""; | 677 | |
678 | else { | 678 | if ((pid != HOST_KERNEL_ID) && |
679 | if (!symbol_conf.guestmount) | 679 | (pid != DEFAULT_GUEST_KERNEL_ID) && |
680 | goto out; | 680 | (symbol_conf.guestmount)) { |
681 | sprintf(path, "%s/%d", symbol_conf.guestmount, pid); | 681 | sprintf(path, "%s/%d", symbol_conf.guestmount, pid); |
682 | if (access(path, R_OK)) { | 682 | if (access(path, R_OK)) { |
683 | pr_err("Can't access file %s\n", path); | 683 | pr_err("Can't access file %s\n", path); |
684 | goto out; | 684 | machine = NULL; |
685 | } | 685 | goto out; |
686 | root_dir = path; | ||
687 | } | 686 | } |
688 | machine = machines__add(self, pid, root_dir); | 687 | root_dir = path; |
689 | } | 688 | } |
690 | 689 | ||
690 | machine = machines__add(self, pid, root_dir); | ||
691 | |||
691 | out: | 692 | out: |
692 | return machine; | 693 | return machine; |
693 | } | 694 | } |
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index f5baff1495e6..8e485592ca20 100644 --- a/tools/perf/util/session.c +++ b/tools/perf/util/session.c | |||
@@ -926,7 +926,7 @@ static struct machine * | |||
926 | else | 926 | else |
927 | pid = event->ip.pid; | 927 | pid = event->ip.pid; |
928 | 928 | ||
929 | return perf_session__find_machine(session, pid); | 929 | return perf_session__findnew_machine(session, pid); |
930 | } | 930 | } |
931 | 931 | ||
932 | return perf_session__find_host_machine(session); | 932 | return perf_session__find_host_machine(session); |
diff --git a/tools/perf/util/trace-event-parse.c b/tools/perf/util/trace-event-parse.c index a51bd86f4d09..0715c843c2e7 100644 --- a/tools/perf/util/trace-event-parse.c +++ b/tools/perf/util/trace-event-parse.c | |||
@@ -188,9 +188,8 @@ void print_trace_event(struct pevent *pevent, int cpu, void *data, int size) | |||
188 | record.data = data; | 188 | record.data = data; |
189 | 189 | ||
190 | trace_seq_init(&s); | 190 | trace_seq_init(&s); |
191 | pevent_print_event(pevent, &s, &record); | 191 | pevent_event_info(&s, event, &record); |
192 | trace_seq_do_printf(&s); | 192 | trace_seq_do_printf(&s); |
193 | printf("\n"); | ||
194 | } | 193 | } |
195 | 194 | ||
196 | void print_event(struct pevent *pevent, int cpu, void *data, int size, | 195 | void print_event(struct pevent *pevent, int cpu, void *data, int size, |