This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug tapsets/6580] revamp backtrace-related tapset functions
- From: "mjw at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sources dot redhat dot com
- Date: 2 Sep 2008 10:14:04 -0000
- Subject: [Bug tapsets/6580] revamp backtrace-related tapset functions
- References: <20080529170209.6580.fche@redhat.com>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From mjw at redhat dot com 2008-09-02 10:14 -------
(In reply to comment #1)
> # Translates an address to a function symbol. Might be expensive
> # so use sparingly in probes, try translating only in end probes.
> function uaddr_symbol:string (uaddr: long) %{ /* pure */
> _stp_symbol_snprint(THIS->__retvalue, MAXSTRINGLEN, THIS->uaddr);
> %}
>
> Can be used with something like the following for a quick and dirty "profiler":
>
> stap -d /path/to/my-static-binary -e 'probe timer.ms(100) {t = tid(); if (t !=
> 0) { printf("%s:.%d 0x%xd:%s\n", execname(), tid(), uaddr(),
> uaddr_symbol(uaddr())); } }'
Franks pointed out that I should mention that _stp_symbol_snprint() only kind of
works by accident for user space and isn't reliable. I filed bug #6866 (Extend
stp_symbol_snprintf for user space) with some more explanation and a plan for
making it reliable.
--
What |Removed |Added
----------------------------------------------------------------------------
BugsThisDependsOn| |6866
http://sourceware.org/bugzilla/show_bug.cgi?id=6580
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.