Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 304811
b: refs/heads/master
c: cc68628
h: refs/heads/master
i:
  304809: 472befb
  304807: b6edcaa
v: v3
  • Loading branch information
Ashay Rane authored and Arnaldo Carvalho de Melo committed Apr 7, 2012
1 parent e19a659 commit 5f1cfc9
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 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: 08be4eeda40ea813fa326036fdaf8fa7667eb021
refs/heads/master: cc68628096b813010f30f69fcf7d1832d18fa767
11 changes: 7 additions & 4 deletions trunk/tools/perf/builtin-report.c
Original file line number Diff line number Diff line change
Expand Up @@ -296,12 +296,15 @@ static size_t hists__fprintf_nr_sample_events(struct hists *self,
{
size_t ret;
char unit;
unsigned long nr_events = self->stats.nr_events[PERF_RECORD_SAMPLE];
unsigned long nr_samples = self->stats.nr_events[PERF_RECORD_SAMPLE];
u64 nr_events = self->stats.total_period;

nr_events = convert_unit(nr_events, &unit);
ret = fprintf(fp, "# Events: %lu%c", nr_events, unit);
nr_samples = convert_unit(nr_samples, &unit);
ret = fprintf(fp, "# Samples: %lu%c", nr_samples, unit);
if (evname != NULL)
ret += fprintf(fp, " %s", evname);
ret += fprintf(fp, " of event '%s'", evname);

ret += fprintf(fp, "\n# Event count (approx.): %lu", nr_events);
return ret + fprintf(fp, "\n#\n");
}

Expand Down
10 changes: 7 additions & 3 deletions trunk/tools/perf/util/ui/browsers/hists.c
Original file line number Diff line number Diff line change
Expand Up @@ -840,10 +840,14 @@ static int hists__browser_title(struct hists *self, char *bf, size_t size,
int printed;
const struct dso *dso = self->dso_filter;
const struct thread *thread = self->thread_filter;
unsigned long nr_events = self->stats.nr_events[PERF_RECORD_SAMPLE];
unsigned long nr_samples = self->stats.nr_events[PERF_RECORD_SAMPLE];
u64 nr_events = self->stats.total_period;

nr_samples = convert_unit(nr_samples, &unit);
printed = scnprintf(bf, size,
"Samples: %lu%c of event '%s', Event count (approx.): %lu",
nr_samples, unit, ev_name, nr_events);

nr_events = convert_unit(nr_events, &unit);
printed = scnprintf(bf, size, "Events: %lu%c %s", nr_events, unit, ev_name);

if (self->uid_filter_str)
printed += snprintf(bf + printed, size - printed,
Expand Down

0 comments on commit 5f1cfc9

Please sign in to comment.