Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 223916
b: refs/heads/master
c: ddbc24b
h: refs/heads/master
v: v3
  • Loading branch information
Arnaldo Carvalho de Melo committed Dec 9, 2010
1 parent 145d2b8 commit a14a146
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 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: ba74f0640d963ccc914ac533cb0ba133ee07bcf2
refs/heads/master: ddbc24b72c2c3f3f0182bbc2cb70b31c52a6f45b
23 changes: 11 additions & 12 deletions trunk/tools/perf/util/session.c
Original file line number Diff line number Diff line change
Expand Up @@ -639,13 +639,10 @@ static int perf_session_queue_event(struct perf_session *s, event_t *event,
return 0;
}

static void callchain__dump(struct sample_data *sample)
static void callchain__printf(struct sample_data *sample)
{
unsigned int i;

if (!dump_trace)
return;

printf("... chain: nr:%Lu\n", sample->callchain->nr);

for (i = 0; i < sample->callchain->nr; i++)
Expand Down Expand Up @@ -675,27 +672,29 @@ static void dump_event(struct perf_session *session, event_t *event,
if (!dump_trace)
return;

dump_printf("\n%#Lx [%#x]: event: %d\n", file_offset,
event->header.size, event->header.type);
printf("\n%#Lx [%#x]: event: %d\n", file_offset, event->header.size,
event->header.type);

trace_event(event);

if (sample)
perf_session__print_tstamp(session, event, sample);

dump_printf("%#Lx [%#x]: PERF_RECORD_%s",
file_offset, event->header.size,
event__get_event_name(event->header.type));
printf("%#Lx [%#x]: PERF_RECORD_%s", file_offset, event->header.size,
event__get_event_name(event->header.type));
}

static void dump_sample(struct perf_session *session, event_t *event,
struct sample_data *sample)
{
dump_printf("(IP, %d): %d/%d: %#Lx period: %Ld\n", event->header.misc,
sample->pid, sample->tid, sample->ip, sample->period);
if (!dump_trace)
return;

printf("(IP, %d): %d/%d: %#Lx period: %Ld\n", event->header.misc,
sample->pid, sample->tid, sample->ip, sample->period);

if (session->sample_type & PERF_SAMPLE_CALLCHAIN)
callchain__dump(sample);
callchain__printf(sample);
}

static int perf_session_deliver_event(struct perf_session *session,
Expand Down

0 comments on commit a14a146

Please sign in to comment.