[opt-viewer] Sort entries with identical hotness by source line

We want entries that are close to each other in the source appear next to each
other.

llvm-svn: 296764
This commit is contained in:
Adam Nemet 2017-03-02 17:00:49 +00:00
parent 08c1afa98f
commit 2057c42517
1 changed files with 1 additions and 1 deletions

View File

@ -190,7 +190,7 @@ def generate_report(pmap, all_remarks, file_remarks, source_dir, output_dir, sho
pmap(_render_file_bound, file_remarks.items())
if should_display_hotness:
sorted_remarks = sorted(all_remarks.itervalues(), key=lambda r: (r.Hotness, r.__dict__), reverse=True)
sorted_remarks = sorted(all_remarks.itervalues(), key=lambda r: (r.Hotness, r.File, r.Line, r.Column, r.__dict__), reverse=True)
else:
sorted_remarks = sorted(all_remarks.itervalues(), key=lambda r: (r.File, r.Line, r.Column, r.__dict__))
IndexRenderer(args.output_dir).render(sorted_remarks)