]> sourceware.org Git - systemtap.git/commitdiff
probefunc(): Use [u]addr() instead of [u]stack(0).
authorMark Wielaard <mjw@redhat.com>
Sun, 18 Nov 2012 21:29:49 +0000 (22:29 +0100)
committerMark Wielaard <mjw@redhat.com>
Sun, 18 Nov 2012 21:29:49 +0000 (22:29 +0100)
The result is the same, but the use of [u]stack(0) triggers the inclusion
of unwind tables (even though there is literally zero unwinding going on).

tapset/linux/context-symbols.stp

index de7aeebed08b3c943e6deadea182bcda9c110812..40d5c875b4406a1b0ffe9a0d56484f906b3a3dc9 100644 (file)
@@ -87,8 +87,8 @@ function sprint_stack:string(stk:string) { return sprint_syms(stk) }
  * sfunction probefunc - Return the probe point's function name, if known
  *
  * Description: This function returns the name of the function being probed
- * based on the current address, as computed by symname(stack(0)) or
- * usymname(ustack(0)) depending on probe context (whether the probe is
+ * based on the current address, as computed by symname(addr()) or
+ * usymname(uaddr()) depending on probe context (whether the probe is
  * a user probe or a kernel probe).
  *
  * Please note: this function's behaviour differs between SystemTap 2.0
@@ -130,9 +130,9 @@ function probefunc:string () %( systemtap_v < "2.0" %?
 %:
 {
        %( systemtap_privilege != "stapusr" %?
-          return user_mode() ? usymname(ustack(0)) : symname(stack(0))
+          return user_mode() ? usymname(uaddr()) : symname(addr())
        %:
-          return user_mode() ? usymname(ustack(0))
+          return user_mode() ? usymname(uaddr())
                              : error("kernel probefunc() query from unprivileged script") /* XXX should be impossible */
         %)
 }
This page took 0.027472 seconds and 5 git commands to generate.