From f8d3f838f68b46b1886289375f97113e9636620d Mon Sep 17 00:00:00 2001 From: Andy Isaacson Date: Fri, 11 Jun 2010 19:44:04 -0700 Subject: [PATCH] --- yaml --- r: 205267 b: refs/heads/master c: 84c104ad429c8a474b93dd374815d1c238032fa8 h: refs/heads/master i: 205265: 0eea6e959632f51984028b07772c11eb01e6f954 205263: 82c1e01f57579f48fddf12447c9e508ed1d4691f v: v3 --- [refs] | 2 +- trunk/tools/perf/util/debug.c | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index ef33ed715785..4c5a50610d9e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9ed7e1b85cd55dc46cb9410a23086bdaa2ff3eb9 +refs/heads/master: 84c104ad429c8a474b93dd374815d1c238032fa8 diff --git a/trunk/tools/perf/util/debug.c b/trunk/tools/perf/util/debug.c index 6cddff2bc970..318dab15d177 100644 --- a/trunk/tools/perf/util/debug.c +++ b/trunk/tools/perf/util/debug.c @@ -86,12 +86,10 @@ void trace_event(event_t *event) dump_printf_color(" ", color); for (j = 0; j < 15-(i & 15); j++) dump_printf_color(" ", color); - for (j = 0; j < (i & 15); j++) { - if (isprint(raw_event[i-15+j])) - dump_printf_color("%c", color, - raw_event[i-15+j]); - else - dump_printf_color(".", color); + for (j = i & ~15; j <= i; j++) { + dump_printf_color("%c", color, + isprint(raw_event[j]) ? + raw_event[j] : '.'); } dump_printf_color("\n", color); }