Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 349934
b: refs/heads/master
c: 34ba512
h: refs/heads/master
v: v3
  • Loading branch information
Arnaldo Carvalho de Melo committed Jan 24, 2013
1 parent c1aceb4 commit 1fa37d3
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 22 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: 09ecbb07a5c9fa31dc72ee8fb1c3fbd1145448dd
refs/heads/master: 34ba5122bf198c9cdfcbecc9b23eaa414244a3f6
7 changes: 1 addition & 6 deletions trunk/tools/perf/builtin-kmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ static void __print_result(struct rb_root *root, struct perf_session *session,
int n_lines, int is_caller)
{
struct rb_node *next;
struct machine *machine;
struct machine *machine = &session->machines.host;

printf("%.102s\n", graph_dotted_line);
printf(" %-34s |", is_caller ? "Callsite": "Alloc Ptr");
Expand All @@ -349,11 +349,6 @@ static void __print_result(struct rb_root *root, struct perf_session *session,

next = rb_first(root);

machine = perf_session__find_host_machine(session);
if (!machine) {
pr_err("__print_result: couldn't find kernel information\n");
return;
}
while (next && n_lines--) {
struct alloc_stat *data = rb_entry(next, struct alloc_stat,
node);
Expand Down
7 changes: 1 addition & 6 deletions trunk/tools/perf/builtin-record.c
Original file line number Diff line number Diff line change
Expand Up @@ -512,12 +512,7 @@ static int __cmd_record(struct perf_record *rec, int argc, const char **argv)

rec->post_processing_offset = lseek(output, 0, SEEK_CUR);

machine = perf_session__find_host_machine(session);
if (!machine) {
pr_err("Couldn't find native kernel information.\n");
err = -1;
goto out_delete_session;
}
machine = &session->machines.host;

if (opts->pipe_output) {
err = perf_event__synthesize_attrs(tool, session,
Expand Down
4 changes: 2 additions & 2 deletions trunk/tools/perf/builtin-top.c
Original file line number Diff line number Diff line change
Expand Up @@ -847,13 +847,13 @@ static void perf_top__mmap_read_idx(struct perf_top *top, int idx)
++top->us_samples;
if (top->hide_user_symbols)
continue;
machine = perf_session__find_host_machine(session);
machine = &session->machines.host;
break;
case PERF_RECORD_MISC_KERNEL:
++top->kernel_samples;
if (top->hide_kernel_symbols)
continue;
machine = perf_session__find_host_machine(session);
machine = &session->machines.host;
break;
case PERF_RECORD_MISC_GUEST_KERNEL:
++top->guest_kernel_samples;
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 @@ -821,7 +821,7 @@ static struct machine *
return perf_session__findnew_machine(session, pid);
}

return perf_session__find_host_machine(session);
return &session->machines.host;
}

static int perf_session_deliver_event(struct perf_session *session,
Expand Down
6 changes: 0 additions & 6 deletions trunk/tools/perf/util/session.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,6 @@ int perf_session__create_kernel_maps(struct perf_session *self);
void perf_session__set_id_hdr_size(struct perf_session *session);
void perf_session__remove_thread(struct perf_session *self, struct thread *th);

static inline
struct machine *perf_session__find_host_machine(struct perf_session *self)
{
return &self->machines.host;
}

static inline
struct machine *perf_session__find_machine(struct perf_session *self, pid_t pid)
{
Expand Down

0 comments on commit 1fa37d3

Please sign in to comment.