This is an archive of the discontinued LLVM Phabricator instance.

[LegacyPassManager] Demangling function name in ftime-trace output.
Needs ReviewPublic

Authored by Sockke on Sep 23 2021, 6:04 AM.

Details

Summary

Demangling compiled C++ function names so that it makes the data more readable in analyzing platform.

Diff Detail

Event Timeline

Sockke created this revision.Sep 23 2021, 6:04 AM
Sockke requested review of this revision.Sep 23 2021, 6:04 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 23 2021, 6:04 AM
Enna1 removed a reviewer: Enna1.Sep 23 2021, 6:49 AM
Enna1 added a subscriber: Enna1.
anton-afanasyev added a subscriber: aras-p.

Thanks, looks good (after reformatting suggested by lint).
Add @aras-p: hi, Aras, just to warn you about output format changing, which may be sensitive for tools like ClangBuildAnalyzer.

  1. Legacy PM is dead. Why change it? What about NewPM?
  2. Is this really an UX improvement? Now instead you can't easily find the LLVM IR function. There is a demangler command, but is there a mangler?

I agree with Roman. Those that want demangled names can just pipe through c++filt, but it's hard to go in the other direction, and the mangled names are easier to copy/paste/integrate with other tooling.

lebedev.ri requested changes to this revision.Sep 23 2021, 8:35 AM
This revision now requires changes to proceed.Sep 23 2021, 8:35 AM

Thanks, sorry for the delayed reply.
Yes, fair point. How about adding an option to determine whether to demangle the function name or not?

Please can you explain what problem you are trying to solve, on the higher level?

Sockke added a comment.EditedSep 29 2021, 6:05 AM

Please can you explain what problem you are trying to solve, on the higher level?

Currently, I just want to make the output data generated by ftime-trace more readable in Chrome.

How about adding an option to determine whether to demangle the function name or not?

Making this a non-default option sounds good.

This comment was removed by Sockke.

How about adding an option to determine whether to demangle the function name or not?

Making this a non-default option sounds good.

Sorry for delayed response. Thanks for your review, what is the follow-up of this patch? Any other thoughts?

How about adding an option to determine whether to demangle the function name or not?

Making this a non-default option sounds good.

Sorry for delayed response. Thanks for your review, what is the follow-up of this patch? Any other thoughts?

As before, I believe making this a non-default option would be a good compromise.

lebedev.ri resigned from this revision.Jan 12 2023, 4:49 PM

This review seems to be stuck/dead, consider abandoning if no longer relevant.

This revision now requires review to proceed.Jan 12 2023, 4:49 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 12 2023, 4:49 PM
Herald added a subscriber: StephenFan. · View Herald Transcript