]> sourceware.org Git - systemtap.git/commitdiff
pplabel(): clarify usage and rename to pnlabel()
authorJonathan Lebon <jlebon@redhat.com>
Wed, 22 Jan 2014 21:32:28 +0000 (16:32 -0500)
committerJonathan Lebon <jlebon@redhat.com>
Wed, 22 Jan 2014 21:32:28 +0000 (16:32 -0500)
NEWS
tapset/pn.stp
testsuite/systemtap.base/labels.exp

diff --git a/NEWS b/NEWS
index 171eabe296e85a37e272c28628e27dd10ec93861..0341911058937db9ddebfc7a2545f98344ead559 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -31,7 +31,7 @@
 - SystemTap colors can now be turned off by simply setting
   SYSTEMTAP_COLORS to be empty, rather than having to make it invalid.
 
-- There is a new context tapset function, pplabel(), which returns the
+- There is a new context tapset function, pnlabel(), which returns the
   name of the label which fired.
 
 * What's new in version 2.4, 2013-11-06
index 21bf19cf609f457e758cfe506d415fc287f03f87..bb61c51f7de87bb6ab19f47485e1c3bb0a88f0af 100644 (file)
@@ -25,12 +25,14 @@ function pn:string ()
 %}
 
 /**
- * sfunction pplabel - Returns the label name parsed from the probe name
+ * sfunction pnlabel - Returns the label name parsed from the probe name
  *
- * Description: This returns the label name from the active probe name.
- * Context: The current probe name.
+ * Description: This returns the label name as parsed from the
+ * script-level probe point. This function will only work if called
+ * directly from the body of a '.label' probe point (i.e. no aliases).
+ * Context: The current probe point.
  */
-function pplabel:string ()
+function pnlabel:string ()
 %{ /* pure */ /* unprivileged */
        char *ptr, *start;
 
index b0065f3af0e18a2d503345267e299fe51060181d..072ab6ac2a904b812ffe0d78bffa158fbbac65f1 100644 (file)
@@ -40,7 +40,7 @@ puts $fp "
 probe process(\"labels.x\").function(\"main@labels.c\").label(\"init_*\") {printf (\"VARS %s\\n\",\$\$vars)}
 probe process(\"labels.x\").function(\"main@labels.c\").label(\"ptr_inited\") {printf (\"VARS %s\\n\",\$\$vars)}
 probe process(\"labels.x\").function(\"main@labels.c\").label(\"init_an_int\") {printf (\"init_an_int\\n\")}
-probe process(\"labels.x\").function(\"*\").label(\"*\") {printf (\"label=%s\\n\", pplabel())}
+probe process(\"labels.x\").function(\"*\").label(\"*\") {printf (\"label=%s\\n\", pnlabel())}
 "
 close $fp
 
This page took 0.040894 seconds and 5 git commands to generate.