if (*start != '[')
error (EXIT_FAILURE, 0,
- _("'[' expected in the internal -ff stream"));
+ _("'[' (at 0x%lx) expected in the internal -ff stream"),
+ (unsigned long) (start - buf));
if (start[1] == 0)
{
/* We need more data. */
break;
}
+ *argp++ = "-g";
*argp++ = opt_Z;
*argp = NULL;
probe end
{
- if (nest[last_tid])
+ if (nest[last_tid] && funcname[last_tid] != "")
{
printf (") = ? <tracer terminated>")
realnl ()
}
}
-/* BUG: sleeping function called from invalid context at kernel/mutex.c:94
+/* BUG: sleeping function called from invalid context at kernel/mutex.c:94 */
%{static DEFINE_MUTEX (tracer_mutex);%}
-function lock ()
+function lock:long ()
%{
+ if (in_atomic () || irqs_disabled())
+ {
+ THIS->__retvalue = 0;
+ return;
+ }
mutex_lock (&tracer_mutex);
+ THIS->__retvalue = 1;
%}
function unlock ()
%{
mutex_unlock (&tracer_mutex);
%}
-*/
+/*
+# systamtap bug? on void function value use no warning is given.
global lockvar
-function lock ()
+function lock:long ()
{
lockvar++
+ return 1
}
function unlock ()
{
- lockvar++
+ lockvar--
}
+*/
#probe kprocess.start
#{
}
probe syscall.*
{
- if (trace[tid ()] != 0)
+ if (trace[tid ()] != 0 && lock ())
{
- lock ()
/* Why is mmap() called recursively twice? */
- if (nest[last_tid])
+ if (nest[last_tid] && funcname[last_tid] != "")
{
if (last_tid != tid ())
{
}
probe syscall.*.return
{
- if (trace[tid ()] != 0)
+ if (trace[tid ()] != 0 && lock ())
{
- lock ()
- if (last_tid != tid () && nest[last_tid])
+ if (last_tid != tid () && nest[last_tid] && funcname[last_tid] != "")
{
if (opt_ff)
print ("c\n")