diff options
author | Ingo Molnar <mingo@kernel.org> | 2012-07-18 11:17:17 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2012-07-18 11:17:17 +0200 |
commit | a2fe194723f6e4990d01d8c208c7b138fd410522 (patch) | |
tree | 7aee93fa8f4ba1e18b56fa7d8eab75d249fc6966 /tools/perf | |
parent | c3b7cdf180090d2686239a75bb0ae408108ed749 (diff) | |
parent | a018540141a931f5299a866907b27886916b4374 (diff) | |
download | op-kernel-dev-a2fe194723f6e4990d01d8c208c7b138fd410522.zip op-kernel-dev-a2fe194723f6e4990d01d8c208c7b138fd410522.tar.gz |
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')
-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 35ae568..a1f4e36 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) struct machine *machines__findnew(struct rb_root *self, pid_t pid) { char path[PATH_MAX]; - const char *root_dir; + const char *root_dir = ""; struct machine *machine = machines__find(self, pid); - if (!machine || machine->pid != pid) { - if (pid == HOST_KERNEL_ID || pid == DEFAULT_GUEST_KERNEL_ID) - root_dir = ""; - else { - if (!symbol_conf.guestmount) - goto out; - sprintf(path, "%s/%d", symbol_conf.guestmount, pid); - if (access(path, R_OK)) { - pr_err("Can't access file %s\n", path); - goto out; - } - root_dir = path; + if (machine && (machine->pid == pid)) + goto out; + + if ((pid != HOST_KERNEL_ID) && + (pid != DEFAULT_GUEST_KERNEL_ID) && + (symbol_conf.guestmount)) { + sprintf(path, "%s/%d", symbol_conf.guestmount, pid); + if (access(path, R_OK)) { + pr_err("Can't access file %s\n", path); + machine = NULL; + goto out; } - machine = machines__add(self, pid, root_dir); + root_dir = path; } + machine = machines__add(self, pid, root_dir); + out: return machine; } diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index f5baff1..8e48559 100644 --- a/tools/perf/util/session.c +++ b/tools/perf/util/session.c @@ -926,7 +926,7 @@ static struct machine * else pid = event->ip.pid; - return perf_session__find_machine(session, pid); + return perf_session__findnew_machine(session, pid); } 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 a51bd86..0715c84 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) record.data = data; trace_seq_init(&s); - pevent_print_event(pevent, &s, &record); + pevent_event_info(&s, event, &record); trace_seq_do_printf(&s); - printf("\n"); } void print_event(struct pevent *pevent, int cpu, void *data, int size, |