]> sourceware.org Git - systemtap.git/commitdiff
Fixed PR17155 by changing probefunc() with ppfunc in the examples.
authorDavid Smith <dsmith@redhat.com>
Mon, 14 Jul 2014 15:01:41 +0000 (10:01 -0500)
committerDavid Smith <dsmith@redhat.com>
Mon, 14 Jul 2014 15:01:41 +0000 (10:01 -0500)
* testsuite/systemtap.examples/io/inodewatch.stp: Replaced probefunc()
  with ppfunc().
* testsuite/systemtap.examples/io/inodewatch2.stp: Ditto.
* testsuite/systemtap.examples/io/traceio2.stp: Ditto.
* testsuite/systemtap.examples/process/mutex-contention.stp: Ditto.
* testsuite/systemtap.examples/profiling/fntimes.stp: Ditto.
* testsuite/systemtap.examples/profiling/functioncallcount.stp: Ditto.
* testsuite/systemtap.examples/profiling/functioncallcount.meta: Add '-w'
  to stap line to avoid warnings on blacklisted functions.

testsuite/systemtap.examples/io/inodewatch.stp
testsuite/systemtap.examples/io/inodewatch2.stp
testsuite/systemtap.examples/io/traceio2.stp
testsuite/systemtap.examples/process/mutex-contention.stp
testsuite/systemtap.examples/profiling/fntimes.stp
testsuite/systemtap.examples/profiling/functioncallcount.meta
testsuite/systemtap.examples/profiling/functioncallcount.stp

index 76d0f45bc866813e5183c3281135368cf466836f..99ca33ad7c3c02a242e07384eb8bf817a4937bce 100755 (executable)
@@ -6,5 +6,5 @@ probe vfs.write, vfs.read
   if (dev == MKDEV($1,$2) # major/minor device
       && ino == $3)
     printf ("%s(%d) %s 0x%x/%u\n",
-      execname(), pid(), probefunc(), dev, ino)
+      execname(), pid(), ppfunc(), dev, ino)
 }
index 194ac6d3a7ec5d9dad46e8219d3460e7bec17fb5..42186c26b3f746fef14c2e8cfba87b7b31588ef0 100755 (executable)
@@ -12,5 +12,5 @@ probe kernel.function("setattr_copy")!,
       && inode_nr == $3
       && $attr->ia_valid & ATTR_MODE)
     printf ("%s(%d) %s 0x%x/%u %o %d\n",
-      execname(), pid(), probefunc(), dev_nr, inode_nr, $attr->ia_mode, uid())
+      execname(), pid(), ppfunc(), dev_nr, inode_nr, $attr->ia_mode, uid())
 }
index 797f3062455191a4a689f3da483a7d70a845f7cf..0b04e1bd11e34aa60edf2a8198279bf32cb32f53 100755 (executable)
@@ -15,5 +15,5 @@ probe vfs.write, vfs.read
 {
   if (dev == device_of_interest)
     printf ("%s(%d) %s 0x%x\n",
-            execname(), pid(), probefunc(), dev)
+            execname(), pid(), ppfunc(), dev)
 }
index f418754bce7fec6f12b6f8c06c7a6c6e33aee4dc..aaa14b206aa5bb67ebe3bb7de8fbf1ac0592e697 100755 (executable)
@@ -38,11 +38,11 @@ global FUTEX_WAIT = 0 /*, FUTEX_WAKE = 1 */
 global FUTEX_PRIVATE_FLAG = 128 /* linux 2.6.22+ */
 global FUTEX_CLOCK_REALTIME = 256 /* linux 2.6.29+ */
 
-function process_mutex_init(mutex, probefunc)
+function process_mutex_init(mutex, ppfunc)
 {
   if (verbose && (mutex in mutex_init_stack)) {
     printf("error: %s: mutex %p is already initialized at\n%s\n",
-          probefunc, mutex, mutex_init_stack[mutex])
+          ppfunc, mutex, mutex_init_stack[mutex])
   }
   if (keep_stats) {
     mutex_init_stack[mutex] = sprint_ubacktrace()
@@ -52,7 +52,7 @@ function process_mutex_init(mutex, probefunc)
     printf("init %p at\n%s\n", mutex, sprint_ubacktrace())
   }
   if (verbose) {
-    printf("%s: mutex %p %s\n", probefunc, mutex, mutex_names[mutex])
+    printf("%s: mutex %p %s\n", ppfunc, mutex, mutex_names[mutex])
   }
 }
 
@@ -79,17 +79,17 @@ function show_contention(mutex, stack, type)
 probe process("/lib*/libc.so*").function("pthread_mutex_init")
 {
   if(@defined($mutex))
-    process_mutex_init($mutex, probefunc())
+    process_mutex_init($mutex, ppfunc())
 }
 probe process("/lib*/libpthread.so*").function("__pthread_mutex_init")
 {
   if(@defined($mutex))
-    process_mutex_init($mutex, probefunc())
+    process_mutex_init($mutex, ppfunc())
 }
 probe process("/lib*/libpthread.so*").function("__pthread_rwlock_init")
 {
   if(@defined($rwlock))
-    process_mutex_init($rwlock, probefunc())
+    process_mutex_init($rwlock, ppfunc())
 }
 
 probe syscall.futex.return
index 7359de5f9184c5edcaae0db86fb1d31233d16c7a..0fe5019d194f0e591bc56a691152806143309699 100755 (executable)
@@ -11,7 +11,7 @@ global times
 
 function check(t)   # t: elapsed time
 {
-   pf=probefunc()
+   pf=ppfunc()
    if (@count(times[pf]) >= mincount
        && t >= @max(times[pf]) * note_percent / 100) {   # also consider @avg()
      printf("function %s well over %s time (%d vs %d)\n",
index 8b739a03f384474d5b690a0a5697b112bb9dc5f8..e5555a0c5d30a71245361c8cf1db3b790fa32eac 100644 (file)
@@ -9,5 +9,5 @@ exit: user-controlled
 output: sorted-list on-exit
 scope: system-wide
 description: The functioncallcount.stp script takes one argument, a list of functions to probe. The script will run and count the number of times that each of the functions on the list is called. On exit the script will print a sorted list from most frequently to least frequently called function.
-test_check: stap -p4 functioncallcount.stp "*@mm/*.c"
-test_installcheck: stap  functioncallcount.stp "*@mm/*.c" -c "sleep 1"
+test_check: stap -wp4 functioncallcount.stp "*@mm/*.c"
+test_installcheck: stap -w functioncallcount.stp "*@mm/*.c" -c "sleep 1"
index 31eaee7000551da7ec644f3ba1a550a4fb60304c..4948972646f403724324d9804321871cb02a208d 100755 (executable)
@@ -5,7 +5,7 @@
 # stap  functioncallcount.stp "*@mm/*.c"
 
 probe kernel.function(@1).call {  # probe functions listed on commandline
-  called[probefunc()] <<< 1  # add a count efficiently
+  called[ppfunc()] <<< 1  # add a count efficiently
 }
 
 global called
This page took 0.036728 seconds and 5 git commands to generate.