This is an archive of the discontinued LLVM Phabricator instance.

[llvm-profgen] An option to dump disasm of specified symbols
ClosedPublic

Authored by hoy on Sep 20 2021, 9:45 AM.

Details

Summary

For large app, dumping disasm of the whole program can be slow and result in gianant output. Adding a switch to dump specific symbols only.

Diff Detail

Event Timeline

hoy created this revision.Sep 20 2021, 9:45 AM
hoy requested review of this revision.Sep 20 2021, 9:45 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 20 2021, 9:45 AM
wlei accepted this revision.Sep 20 2021, 1:48 PM

Thanks for the change!

Nit: probably we can add an early check in validateCommandLine to make sure ShowDisassemblyOnly must be true if ShowSymbols is not empty.

This revision is now accepted and ready to land.Sep 20 2021, 1:48 PM

Second what Lei said, adding a check in validateCommandLine would be helpful.

llvm/tools/llvm-profgen/ProfiledBinary.cpp
42

nit: show-symbols -> disassemble-functions. this only works for function.

hoy added a comment.Sep 21 2021, 9:13 AM

Thanks for the change!

Nit: probably we can add an early check in validateCommandLine to make sure ShowDisassemblyOnly must be true if ShowSymbols is not empty.

Sounds good.

llvm/tools/llvm-profgen/ProfiledBinary.cpp
42

Makes sense.

hoy updated this revision to Diff 373963.Sep 21 2021, 9:13 AM

Updating D110079: [llvm-profgen] An option to dump disasm of specified symbols

This revision was landed with ongoing or failed builds.Sep 22 2021, 10:33 AM
This revision was automatically updated to reflect the committed changes.