]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
dtrace: add support for an SDT probe getting called from multiple functions
authorKris Van Hees <kris.van.hees@oracle.com>
Thu, 7 Feb 2013 21:35:42 +0000 (16:35 -0500)
committerNick Alcock <nick.alcock@oracle.com>
Mon, 29 Jun 2015 21:41:42 +0000 (22:41 +0100)
Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
scripts/dtrace_sdt.sh

index 8ec0aab7664310848bc222f1607e7dab00a95ae7..73a0d11814f666a513135ce9821ec4b88195af8c 100755 (executable)
@@ -139,8 +139,9 @@ lfn="$2"
 
                 for (i = 1; i <= NF; i++) {
                     prb = $i;
+                    pn = fun":"prb;
 
-                    print "\tPTR\t0x" addl(baseaddr, poffst[prb]);
+                    print "\tPTR\t0x" addl(baseaddr, poffst[pn]);
                     print "\tPTR\t" length(prb);
                     print "\tPTR\t" length(fun);
                     print "\t.asciz\t\042" prb "\042";
@@ -165,9 +166,10 @@ lfn="$2"
 
         $3 == "R" {
             sub(/^0+/, "", $2);
+            pn = fun":"$4;
 
             probes[fun] = $4 " " probes[fun];
-            poffst[$4] = subl($2, addr);
+            poffst[pn] = subl($2, addr);
 
             next;
         }