[WIP] Add more mangling information to demangling API. #45
Open
AdamBrouwersHarries wants to merge 1 commit into
Open
[WIP] Add more mangling information to demangling API. #45AdamBrouwersHarries wants to merge 1 commit into
AdamBrouwersHarries wants to merge 1 commit into
Conversation
…demangle_any to return the kind of mangling in addition to the name
Owner
|
Interesting, so this gives the mangled names both for the outer function and for any functions that were inlined at the sampled code addresses. Do you know what clang expects for inlined functions? Does it want to know if an inlined function call is hit, or is it ok to just tell it about the outer functions? |
|
Is there any reason this isn't merged other than time and effort to review etc. |
maryreed23
approved these changes
Feb 24, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview:
This patch adds a field to
FrameDebugInfoto store the (original) mangled name that has been retrieved during symbolication, and extendsdemangle_anyto return the demangling scheme used, as well as the demangled name. This allows users of thedemangle_anyinterface andFrameDebugInfoto access (respectively) the scheme by which a given name was mangled, as well as the original mangled name.Rationale:
I'm currently working on a tool that needs to be able to symbolicise in precisely the same way that samply-symbols/wholesym provides, with one cavaet: I need to be able to access the original mangled names.
Given an address (e.g. from a firefox profile), this is currently quite difficult, as there is no "built-in" way to retrieve an address. Users would instead have to retrieve a de-mangled name from a symbolication source and then manually mangle it themselves. Given the difficulties of mangling, combined with the various sources of mangling (e.g. finding a name from code compiled with MSVC, but re-mangling into an Itanium form), this approach is extremely difficult.
The specific case that I'm interested in is transforming processed Firefox profiles into Clang PGO (profile guided optimisation) compatible profiles. Clang's PGO optimisations are compatibile with sampling based profilers, but require mangled names.