Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 234451
b: refs/heads/master
c: fec9cbd
h: refs/heads/master
i:
  234449: 55b1118
  234447: 500ca51
v: v3
  • Loading branch information
Arnaldo Carvalho de Melo committed Feb 17, 2011
1 parent 89f8418 commit 7de2900
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 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: f0c55bcf4aa41b4b1dbee826513b1acb01bf65e1
refs/heads/master: fec9cbd15b9e99bab9bc50f1ed7e20a1087d7c6d
7 changes: 5 additions & 2 deletions trunk/tools/perf/util/hist.c
Original file line number Diff line number Diff line change
Expand Up @@ -591,6 +591,7 @@ int hist_entry__snprintf(struct hist_entry *self, char *s, size_t size,
{
struct sort_entry *se;
u64 period, total, period_sys, period_us, period_guest_sys, period_guest_us;
u64 nr_events;
const char *sep = symbol_conf.field_sep;
int ret;

Expand All @@ -599,13 +600,15 @@ int hist_entry__snprintf(struct hist_entry *self, char *s, size_t size,

if (pair_hists) {
period = self->pair ? self->pair->period : 0;
nr_events = self->pair ? self->pair->nr_events : 0;
total = pair_hists->stats.total_period;
period_sys = self->pair ? self->pair->period_sys : 0;
period_us = self->pair ? self->pair->period_us : 0;
period_guest_sys = self->pair ? self->pair->period_guest_sys : 0;
period_guest_us = self->pair ? self->pair->period_guest_us : 0;
} else {
period = self->period;
nr_events = self->nr_events;
total = session_total;
period_sys = self->period_sys;
period_us = self->period_us;
Expand Down Expand Up @@ -646,9 +649,9 @@ int hist_entry__snprintf(struct hist_entry *self, char *s, size_t size,

if (symbol_conf.show_nr_samples) {
if (sep)
ret += snprintf(s + ret, size - ret, "%c%" PRIu64, *sep, period);
ret += snprintf(s + ret, size - ret, "%c%" PRIu64, *sep, nr_events);
else
ret += snprintf(s + ret, size - ret, "%11" PRIu64, period);
ret += snprintf(s + ret, size - ret, "%11" PRIu64, nr_events);
}

if (pair_hists) {
Expand Down

0 comments on commit 7de2900

Please sign in to comment.