From 288a2c654432c91e3c877378d5655b61b6803326 Mon Sep 17 00:00:00 2001 From: "jochen@chromium.org" Date: Wed, 13 Jun 2012 14:37:36 +0000 Subject: Sort memory leaks by size BUG=none TEST=none Review URL: https://chromiumcodereview.appspot.com/10544118 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141889 0039d316-1c4b-4281-b951-d872f2087c98 --- tools/tcmalloc/print-live-objects.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/tcmalloc') diff --git a/tools/tcmalloc/print-live-objects.py b/tools/tcmalloc/print-live-objects.py index 9886fd1..dfed9c6 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"]) -- cgit v1.1