Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 311934
b: refs/heads/master
c: 25c037d
h: refs/heads/master
v: v3
  • Loading branch information
Ingo Molnar committed Jul 10, 2012
1 parent ec0ccc9 commit d9def11
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 48fdc72f23ad9a9956e524a47843135d0bbc3317
refs/heads/master: 25c037d64e7a0a8effb562babb2b6218829134ac
29 changes: 15 additions & 14 deletions trunk/tools/perf/util/map.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/tools/perf/util/session.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 1 addition & 2 deletions trunk/tools/perf/util/trace-event-parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,8 @@ void print_trace_event(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(int cpu, void *data, int size, unsigned long long nsecs,
Expand Down

0 comments on commit d9def11

Please sign in to comment.