]> sourceware.org Git - systemtap.git/commitdiff
Fixed PR12338 by updating softirq.entry/softirq.exit probes for 2.6.37+.
authorDavid Smith <dsmith@redhat.com>
Tue, 21 Dec 2010 21:53:33 +0000 (15:53 -0600)
committerDavid Smith <dsmith@redhat.com>
Tue, 21 Dec 2010 21:53:33 +0000 (15:53 -0600)
* tapset/irq.stp: Added 'vec_nr' variable to softirq.entry/softirq.exit
  probes.  Used @defined() to make sure old variables are present.
* testsuite/buildok/irq-detailed.stp: Updated softirq.entry/softirq.exit
  test.

tapset/irq.stp
testsuite/buildok/irq-detailed.stp

index 0a67cbce392deaf1741fd8ff0a12c72c2e6c3f93..9dc480e1f1291addfa0f15fdea684281825cb32d 100644 (file)
@@ -130,12 +130,16 @@ probe irq_handler.exit = kernel.trace("irq_handler_exit") ?
  * @h: struct softirq_action* for current pending softirq
  * @vec: softirq_action vector
  * @action: pointer to softirq handler just about to execute
+ * @vec_nr:  softirq vector number
  */
 probe softirq.entry = kernel.trace("softirq_entry") ?
 {
-       h = $h
-       vec = $vec
-       action = $h->action
+       # kernels < 2.6.37
+       h = (@defined($h) ? $h : 0)
+       vec = (@defined($vec) ? $vec : 0)
+       action = (@defined($h) ? $h->action : 0)
+       # kernels >= 2.6.37
+       vec_nr = (@defined($vec_nr) ? $vec_nr : 0)
 }
 
 /**
@@ -143,10 +147,14 @@ probe softirq.entry = kernel.trace("softirq_entry") ?
  * @h: struct softirq_action* for just executed softirq
  * @vec: softirq_action vector
  * @action: pointer to softirq handler that just finished execution
+ * @vec_nr:  softirq vector number
  */
 probe softirq.exit = kernel.trace("softirq_exit") ?
 {
-       h = $h
-       vec = $vec
-       action = $h->action
+       # kernels < 2.6.37
+       h = (@defined($h) ? $h : 0)
+       vec = (@defined($vec) ? $vec : 0)
+       action = (@defined($h) ? $h->action : 0)
+       # kernels >= 2.6.37
+       vec_nr = (@defined($vec_nr) ? $vec_nr : 0)
 }
index f24e50527e10994cf7010824c271facdcf6e743b..1f768ba51bce145b64200e56b7f93d380f270e8a 100755 (executable)
@@ -36,7 +36,7 @@ probe irq_handler.entry ?, irq_handler.exit ?
 
 probe softirq.entry ?, softirq.exit ?
 {
-       printf("%p %p %p\n", h, vec, action)
+       printf("%p %p %p %d\n", h, vec, action, vec_nr)
 }
 
 # Make sure we've got at least one probe.
This page took 0.031255 seconds and 5 git commands to generate.