[PATCH v4 1/5] perf tools: Fix sorting of dynamic sort keys

From: Namhyung Kim
Date: Wed Jan 06 2016 - 19:12:51 EST


Currently it sorts entries in reverse (alphabetic) order, fix it.

Signed-off-by: Namhyung Kim <namhyung@xxxxxxxxxx>
---
This patch can be folded into the original patch c7c2a5e40f17
("perf tools: Add dynamic sort key for tracepoint events")

tools/perf/util/sort.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c
index 04e2a5cb19e3..425097d2a1cd 100644
--- a/tools/perf/util/sort.c
+++ b/tools/perf/util/sort.c
@@ -1795,7 +1795,7 @@ static int64_t __sort__hde_cmp(struct perf_hpp_fmt *fmt,
update_dynamic_len(hde, b);
}

- return memcmp(a->raw_data + offset, b->raw_data + offset, size);
+ return memcmp(b->raw_data + offset, a->raw_data + offset, size);
}

bool perf_hpp__is_dynamic_entry(struct perf_hpp_fmt *fmt)
--
2.6.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/