Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 338860
b: refs/heads/master
c: 6e92349
h: refs/heads/master
v: v3
  • Loading branch information
Jiri Olsa authored and Arnaldo Carvalho de Melo committed Oct 5, 2012
1 parent 7545c64 commit 894accf
Show file tree
Hide file tree
Showing 2 changed files with 9 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: d88c48f9b5bfcbd2e296b2d240e8cb0aec99f042
refs/heads/master: 6e92349d5a814a3f633a43d9d6bd3b199ef3ad72
10 changes: 8 additions & 2 deletions trunk/tools/perf/ui/hist.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,15 +179,21 @@ static int hpp__color_baseline(struct perf_hpp *hpp, struct hist_entry *he)
{
double percent = baseline_percent(he);

return percent_color_snprintf(hpp->buf, hpp->size, " %6.2f%%", percent);
if (he->pair)
return percent_color_snprintf(hpp->buf, hpp->size, " %6.2f%%", percent);
else
return scnprintf(hpp->buf, hpp->size, " ");
}

static int hpp__entry_baseline(struct perf_hpp *hpp, struct hist_entry *he)
{
double percent = baseline_percent(he);
const char *fmt = symbol_conf.field_sep ? "%.2f" : " %6.2f%%";

return scnprintf(hpp->buf, hpp->size, fmt, percent);
if (he->pair || symbol_conf.field_sep)
return scnprintf(hpp->buf, hpp->size, fmt, percent);
else
return scnprintf(hpp->buf, hpp->size, " ");
}

static int hpp__header_samples(struct perf_hpp *hpp)
Expand Down

0 comments on commit 894accf

Please sign in to comment.