X-Git-Url: http://git.monstr.eu/?a=blobdiff_plain;ds=sidebyside;f=tools%2Fperf%2Futil%2Fstat-shadow.c;h=a04cf56d3517fb3955e6d2a7bc3efa3132d818fc;hb=7f6a78fe34f041da317e46813254abab776d46f7;hp=719d6cb86952e5c6482e7a09070370360efe2030;hpb=e558bdc21ae1f0db520eccd84015e17d8a589973;p=linux-2.6-microblaze.git diff --git a/tools/perf/util/stat-shadow.c b/tools/perf/util/stat-shadow.c index 719d6cb86952..a04cf56d3517 100644 --- a/tools/perf/util/stat-shadow.c +++ b/tools/perf/util/stat-shadow.c @@ -70,7 +70,11 @@ static int saved_value_cmp(struct rb_node *rb_node, const void *entry) return a->ctx - b->ctx; if (a->cpu != b->cpu) return a->cpu - b->cpu; - return a->evsel - b->evsel; + if (a->evsel == b->evsel) + return 0; + if ((char *)a->evsel < (char *)b->evsel) + return -1; + return +1; } static struct rb_node *saved_value_new(struct rblist *rblist __maybe_unused,