Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 277290
b: refs/heads/master
c: 246d4ce
h: refs/heads/master
v: v3
  • Loading branch information
Arnaldo Carvalho de Melo committed Nov 28, 2011
1 parent ef6be92 commit d779c61
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 15 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: 10d0f086df77f3ff259b46cb501362dbaf2c7989
refs/heads/master: 246d4ce8107ea16521384c8b2a8fcff354ef2b7c
5 changes: 3 additions & 2 deletions trunk/tools/perf/builtin-report.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ static int perf_session__add_hist_entry(struct perf_session *session,
struct hist_entry *he;

if ((sort__has_parent || symbol_conf.use_callchain) && sample->callchain) {
err = perf_session__resolve_callchain(session, al->thread,
err = perf_session__resolve_callchain(session, evsel, al->thread,
sample->callchain, &parent);
if (err)
return err;
Expand All @@ -76,7 +76,8 @@ static int perf_session__add_hist_entry(struct perf_session *session,
return -ENOMEM;

if (symbol_conf.use_callchain) {
err = callchain_append(he->callchain, &session->callchain_cursor,
err = callchain_append(he->callchain,
&evsel->hists.callchain_cursor,
sample->period);
if (err)
return err;
Expand Down
2 changes: 1 addition & 1 deletion trunk/tools/perf/builtin-script.c
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ static void process_event(union perf_event *event __unused,
printf(" ");
else
printf("\n");
perf_session__print_ip(event, sample, session,
perf_session__print_ip(event, evsel, sample, session,
PRINT_FIELD(SYM), PRINT_FIELD(DSO));
}

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 @@ -777,7 +777,7 @@ static void perf_event__process_sample(const union perf_event *event,

if ((sort__has_parent || symbol_conf.use_callchain) &&
sample->callchain) {
err = perf_session__resolve_callchain(session, al.thread,
err = perf_session__resolve_callchain(session, evsel, al.thread,
sample->callchain, &parent);
if (err)
return;
Expand All @@ -790,7 +790,7 @@ static void perf_event__process_sample(const union perf_event *event,
}

if (symbol_conf.use_callchain) {
err = callchain_append(he->callchain, &session->callchain_cursor,
err = callchain_append(he->callchain, &evsel->hists.callchain_cursor,
sample->period);
if (err)
return;
Expand Down
12 changes: 6 additions & 6 deletions trunk/tools/perf/util/session.c
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ static bool symbol__match_parent_regex(struct symbol *sym)
return 0;
}

int perf_session__resolve_callchain(struct perf_session *self,
int perf_session__resolve_callchain(struct perf_session *self, struct perf_evsel *evsel,
struct thread *thread,
struct ip_callchain *chain,
struct symbol **parent)
Expand All @@ -225,7 +225,7 @@ int perf_session__resolve_callchain(struct perf_session *self,
unsigned int i;
int err;

callchain_cursor_reset(&self->callchain_cursor);
callchain_cursor_reset(&evsel->hists.callchain_cursor);

for (i = 0; i < chain->nr; i++) {
u64 ip;
Expand Down Expand Up @@ -261,7 +261,7 @@ int perf_session__resolve_callchain(struct perf_session *self,
break;
}

err = callchain_cursor_append(&self->callchain_cursor,
err = callchain_cursor_append(&evsel->hists.callchain_cursor,
ip, al.map, al.sym);
if (err)
return err;
Expand Down Expand Up @@ -1254,14 +1254,14 @@ struct perf_evsel *perf_session__find_first_evtype(struct perf_session *session,
return NULL;
}

void perf_session__print_ip(union perf_event *event,
void perf_session__print_ip(union perf_event *event, struct perf_evsel *evsel,
struct perf_sample *sample,
struct perf_session *session,
int print_sym, int print_dso)
{
struct addr_location al;
const char *symname, *dsoname;
struct callchain_cursor *cursor = &session->callchain_cursor;
struct callchain_cursor *cursor = &evsel->hists.callchain_cursor;
struct callchain_cursor_node *node;

if (perf_event__preprocess_sample(event, session, &al, sample,
Expand All @@ -1273,7 +1273,7 @@ void perf_session__print_ip(union perf_event *event,

if (symbol_conf.use_callchain && sample->callchain) {

if (perf_session__resolve_callchain(session, al.thread,
if (perf_session__resolve_callchain(session, evsel, al.thread,
sample->callchain, NULL) != 0) {
if (verbose)
error("Failed to resolve callchain. Skipping\n");
Expand Down
5 changes: 2 additions & 3 deletions trunk/tools/perf/util/session.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ struct perf_session {
int cwdlen;
char *cwd;
struct ordered_samples ordered_samples;
struct callchain_cursor callchain_cursor;
char filename[0];
};

Expand Down Expand Up @@ -100,7 +99,7 @@ int __perf_session__process_events(struct perf_session *self,
int perf_session__process_events(struct perf_session *self,
struct perf_event_ops *event_ops);

int perf_session__resolve_callchain(struct perf_session *self,
int perf_session__resolve_callchain(struct perf_session *self, struct perf_evsel *evsel,
struct thread *thread,
struct ip_callchain *chain,
struct symbol **parent);
Expand Down Expand Up @@ -169,7 +168,7 @@ static inline int perf_session__parse_sample(struct perf_session *session,
struct perf_evsel *perf_session__find_first_evtype(struct perf_session *session,
unsigned int type);

void perf_session__print_ip(union perf_event *event,
void perf_session__print_ip(union perf_event *event, struct perf_evsel *evsel,
struct perf_sample *sample,
struct perf_session *session,
int print_sym, int print_dso);
Expand Down

0 comments on commit d779c61

Please sign in to comment.