Add options to dump PGO counts in text.

Authored by yamauchi on Sep 12 2017, 3:34 PM.



Added text options to -pgo-view-counts and -pgo-view-raw-counts that dump block frequency and branch probability info in text.

This is useful when the graph is very large and complex (the dot command crashes, lines/edges too close to tell apart, hard to navigate without textual search) or simply when text is preferred.

yamauchi created this revision.Sep 12 2017, 3:34 PM
davidxl added inline comments.Sep 12 2017, 3:53 PM

To share most of the code, I think it is better to make PGOViewRawCounts an enum type option, just like:


By doing so, we can do:

-pgo-view-raw-counts=graph --> dump dot graph
-pgo-view-raw-counts=text --> dump text

similarly for the other option.

yamauchi updated this revision to Diff 114947.Sep 12 2017, 5:41 PM

Addressed the comment.

yamauchi edited the summary of this revision. (Show Details)Sep 12 2017, 5:43 PM
yamauchi marked an inline comment as done.Sep 12 2017, 5:57 PM
davidxl accepted this revision.Sep 12 2017, 6:36 PM


This revision is now accepted and ready to land.Sep 12 2017, 6:36 PM
yamauchi closed this revision.Sep 13 2017, 10:21 AM