This is an archive of the discontinued LLVM Phabricator instance.

Improve llvm-gsymutil performance in quiet mode.
ClosedPublic

Authored by clayborg on Aug 8 2023, 6:20 PM.

Details

Summary

The GSYM code alwasy logging to streams even in quiet mode. When in quiet mode we would use the "nulls()" stream to avoid logging to the terminal, but this still caused logging functions to be called on DWARFDie objects and other messages which were quite expensive and not needed if we weren't logging anything. This patch switches some logs in performant areas to be "raw_ostream *" values and if the ostream pointer is NULL, then we don't call the expensive logging functions on DWARFDie and other objects which will improve performance.

Diff Detail

Event Timeline

clayborg created this revision.Aug 8 2023, 6:20 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 8 2023, 6:20 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
clayborg requested review of this revision.Aug 8 2023, 6:20 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 8 2023, 6:20 PM
clayborg updated this revision to Diff 548432.Aug 8 2023, 6:22 PM

Remove the "Log" member variable from the DWARFTransformer class.

ayermolo accepted this revision.Aug 8 2023, 6:37 PM
This revision is now accepted and ready to land.Aug 8 2023, 6:37 PM
This revision was landed with ongoing or failed builds.Aug 9 2023, 12:34 AM
This revision was automatically updated to reflect the committed changes.