Add options to dump PGO counts in text.
ClosedPublic

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

Details

Summary

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.Tue, Sep 12, 3:34 PM
davidxl added inline comments.Tue, Sep 12, 3:53 PM
lib/Transforms/Instrumentation/PGOInstrumentation.cpp
184

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

ViewBlockFreqPropagationDAG

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.Tue, Sep 12, 5:41 PM

Addressed the comment.

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

lgtm

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