Bug 21403 - provide something like ppfunc() that also provided the class name of the function
Summary: provide something like ppfunc() that also provided the class name of the func...
Status: RESOLVED DUPLICATE of bug 14832
Alias: None
Product: systemtap
Classification: Unclassified
Component: translator (show other bugs)
Version: unspecified
: P2 enhancement
Target Milestone: ---
Assignee: Unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-20 13:57 UTC by David Smith
Modified: 2017-05-09 00:02 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Smith 2017-04-20 13:57:21 UTC
It would be nice if there was a way for a function to not just return the function name the current probe point, but also the class name (assuming we're in a C++ class).

The problem here is that the pp() information (which is what ppfunc() parses) has the class name, but in a mangled format. We'd have to add a C++ demangler for this to work properly.
Comment 1 David Smith 2017-04-20 19:51:40 UTC
(In reply to David Smith from comment #0)
> It would be nice if there was a way for a function to not just return the
> function name the current probe point, but also the class name (assuming
> we're in a C++ class).
> 
> The problem here is that the pp() information (which is what ppfunc()
> parses) has the class name, but in a mangled format. We'd have to add a C++
> demangler for this to work properly.

Just to be clear here, I'm not suggesting we put a C++ demangler in the kernel modules. I'm suggesting that we add enough code to the translator to put the unmangled C++ class/function name ("CLASS::FUNCTION") as part of the probe point name field the translator emits. Then a ppfunc() variant could extract CLASS::FUNCTION from the full probe name field.

(Note that we'd still have mangled C++ names in backtraces that would need to be passed through c++filt to get demangled.)
Comment 2 Frank Ch. Eigler 2017-05-09 00:02:38 UTC
Closely related.

*** This bug has been marked as a duplicate of bug 14832 ***