This is an archive of the discontinued LLVM Phabricator instance.

[BOLT][NFC] Dump function CFG into html, rendered in browser using d3-graphviz
AbandonedPublic

Authored by Amir on May 18 2022, 11:08 PM.

Details

Reviewers
rafauler
maksfb
Summary

Dump BinaryFunction CFG into html.
Usage:

llvm-bolt <...> -dump-dot-all -dot-html

Then open resulting html in browser.

Diff Detail

Event Timeline

Amir created this revision.May 18 2022, 11:08 PM
Herald added a reviewer: maksfb. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
Herald added a subscriber: ayermolo. · View Herald Transcript
Amir published this revision for review.May 19 2022, 11:42 AM
Amir retitled this revision from [BOLT][NFC] Dump dot into html using d3-graphviz to [BOLT][NFC] Dump function CFG into html, rendered in browser using d3-graphviz.
Amir edited the summary of this revision. (Show Details)
Herald added a project: Restricted Project. · View Herald TranscriptMay 19 2022, 11:43 AM
rafauler accepted this revision.May 19 2022, 12:41 PM

Oh that's awesome

bolt/lib/Core/BinaryFunction.cpp
3065

accidental newline?

This revision is now accepted and ready to land.May 19 2022, 12:41 PM
Amir abandoned this revision.May 23 2022, 1:17 PM

I thought about it and now I don't think embedding html and javascript code into BOLT binary is a good idea.
A better approach would be to embed dot file into html template using an external tool: D126218.