]> sourceware.org Git - systemtap.git/commitdiff
Remove preempt_disable from unwind hotpath.
authorMark Wielaard <mjw@redhat.com>
Thu, 11 Aug 2011 10:03:55 +0000 (12:03 +0200)
committerMark Wielaard <mjw@redhat.com>
Thu, 11 Aug 2011 10:15:40 +0000 (12:15 +0200)
We only need to preempt_disable when we fail to find a kernel module to
unwind through so we can call __module_text_address.

runtime/unwind.c

index e31c76e6a97ff45663b737a1d742aa9c4a06d6a6..bd3068431953d0009d65e67dfe928908a35bce8a 100644 (file)
@@ -1329,11 +1329,12 @@ static int unwind(struct unwind_context *context,
          }
        else
           {
-            preempt_disable(); /* probably redundant */
             m = _stp_kmod_sec_lookup (pc, &s);
             if (!m) {
 #ifdef STAPCONF_MODULE_TEXT_ADDRESS
-                struct module *ko = __module_text_address (pc);
+                struct module *ko;
+                preempt_disable();
+                ko = __module_text_address (pc);
                 if (ko) { module_name = ko->name; }
                 else { 
                   /* Possible heuristic: we could assume we're talking
@@ -1341,9 +1342,9 @@ static int unwind(struct unwind_context *context,
                      were SYMBOL_EXPORT'd, we could call that and be
                      more sure. */
                 } 
+                preempt_enable_no_resched();
 #endif
             }
-            preempt_enable_no_resched();
           }
 
        if (unlikely(m == NULL)) {
This page took 0.032264 seconds and 5 git commands to generate.