Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 177430
b: refs/heads/master
c: f823e44
h: refs/heads/master
v: v3
  • Loading branch information
Arnaldo Carvalho de Melo authored and Ingo Molnar committed Dec 15, 2009
1 parent b51ac3a commit 60c9ce2
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 16 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: c019879bcc5692ec9267c1cedad91f1794d0b693
refs/heads/master: f823e441ab4dfaeaf17832fa1931e0dc0fde304d
2 changes: 1 addition & 1 deletion trunk/tools/perf/builtin-annotate.c
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ static int __cmd_annotate(void)
dsos__fprintf(stdout);

perf_session__collapse_resort(session);
perf_session__output_resort(session, event__total[0]);
perf_session__output_resort(session, session->event_total[0]);
perf_session__find_annotations(session);
out_delete:
perf_session__delete(session);
Expand Down
7 changes: 3 additions & 4 deletions trunk/tools/perf/builtin-report.c
Original file line number Diff line number Diff line change
Expand Up @@ -619,8 +619,7 @@ static int process_sample_event(event_t *event, struct perf_session *session)
return -1;
}

event__stats.total += data.period;

session->events_stats.total += data.period;
return 0;
}

Expand Down Expand Up @@ -731,8 +730,8 @@ static int __cmd_report(void)
dsos__fprintf(stdout);

perf_session__collapse_resort(session);
perf_session__output_resort(session, event__stats.total);
perf_session__fprintf_hist_entries(session, event__stats.total, stdout);
perf_session__output_resort(session, session->events_stats.total);
perf_session__fprintf_hist_entries(session, session->events_stats.total, stdout);

if (show_threads)
perf_read_values_destroy(&show_threads_values);
Expand Down
2 changes: 1 addition & 1 deletion trunk/tools/perf/builtin-trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ static int process_sample_event(event_t *event, struct perf_session *session)
data.raw_size,
data.time, thread->comm);
}
event__stats.total += data.period;

session->events_stats.total += data.period;
return 0;
}

Expand Down
6 changes: 2 additions & 4 deletions trunk/tools/perf/util/event.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,6 @@ void event__synthesize_threads(int (*process)(event_t *event,
closedir(proc);
}

struct events_stats event__stats;

int event__process_comm(event_t *self, struct perf_session *session)
{
struct thread *thread = perf_session__findnew(session, self->comm.pid);
Expand All @@ -203,10 +201,10 @@ int event__process_comm(event_t *self, struct perf_session *session)
return 0;
}

int event__process_lost(event_t *self, struct perf_session *session __used)
int event__process_lost(event_t *self, struct perf_session *session)
{
dump_printf(": id:%Ld: lost:%Ld\n", self->lost.id, self->lost.lost);
event__stats.lost += self->lost.lost;
session->events_stats.lost += self->lost.lost;
return 0;
}

Expand Down
5 changes: 0 additions & 5 deletions trunk/tools/perf/util/event.h
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,6 @@ void event__synthesize_threads(int (*process)(event_t *event,
struct perf_session *session),
struct perf_session *session);

extern char *event__cwd;
extern int event__cwdlen;
extern struct events_stats event__stats;
extern unsigned long event__total[PERF_RECORD_MAX];

int event__process_comm(event_t *self, struct perf_session *session);
int event__process_lost(event_t *self, struct perf_session *session);
int event__process_mmap(event_t *self, struct perf_session *session);
Expand Down
3 changes: 3 additions & 0 deletions trunk/tools/perf/util/session.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "header.h"
#include "thread.h"
#include <linux/rbtree.h>
#include "../../../include/linux/perf_event.h"

struct ip_callchain;
struct thread;
Expand All @@ -18,6 +19,8 @@ struct perf_session {
struct map_groups kmaps;
struct rb_root threads;
struct thread *last_match;
struct events_stats events_stats;
unsigned long event_total[PERF_RECORD_MAX];
struct rb_root hists;
u64 sample_type;
int fd;
Expand Down

0 comments on commit 60c9ce2

Please sign in to comment.