Index: tools/tcmalloc/print-live-objects.py |
diff --git a/tools/tcmalloc/print-live-objects.py b/tools/tcmalloc/print-live-objects.py |
index 9886fd1924e141e603ef91ffb3e79772fe219189..dfed9c60999c01a8c9347deb5c7846afb192d8b0 100755 |
--- a/tools/tcmalloc/print-live-objects.py |
+++ b/tools/tcmalloc/print-live-objects.py |
@@ -80,7 +80,7 @@ def Main(argv): |
if not traces: |
print "No leaks found!" |
- for trace in traces: |
+ for trace in sorted(traces, key=lambda x: -x["size"]): |
print "Leak of %d bytes at address %s" % (trace["size"], trace["address"]) |
for frame in trace["frames"]: |
print " %s (%s)" % (frame["name"], frame["location"]) |