From: Kris Van Hees Date: Tue, 16 May 2017 13:38:04 +0000 (-0400) Subject: dtrace: improve probe execution debugging X-Git-Tag: v4.1.12-111.0.20170907_2225~3^2~3^2~13 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=0870d9256c5bab0dce3268db081dd3d82285ac8b;p=users%2Fjedix%2Flinux-maple.git dtrace: improve probe execution debugging The debugging code for probe execution had a few cases were the start of execution was logged in debugging output but the completion was not because of early termination conditions. Now all forms of completion should be covered in debugging output. Signed-off-by: Kris Van Hees Reviewed-by: Tomas Jedlicka Reviewed-by: Nick Alcock --- diff --git a/dtrace/dtrace_probe.c b/dtrace/dtrace_probe.c index 0dac1e6283d1b..08d23e87fc3f8 100644 --- a/dtrace/dtrace_probe.c +++ b/dtrace/dtrace_probe.c @@ -677,8 +677,11 @@ void dtrace_probe(dtrace_id_t id, uintptr_t arg0, uintptr_t arg1, if ((ecb->dte_cond & DTRACE_COND_USERMODE) && prov->dtpv_pops.dtps_usermode( prov->dtpv_arg, probe->dtpr_id, probe->dtpr_arg - ) == 0) + ) == 0) { + dt_dbg_probe("Probe (ID %d EPID %d) Skipped\n", + id, ecb->dte_epid); continue; + } /* * This is more subtle than it looks. We have to be @@ -705,8 +708,12 @@ void dtrace_probe(dtrace_id_t id, uintptr_t arg0, uintptr_t arg1, !uid_eq(s_cr->euid, cr->suid) || !gid_eq(s_cr->egid, cr->egid) || !gid_eq(s_cr->egid, cr->gid) || - !gid_eq(s_cr->egid, cr->sgid)) + !gid_eq(s_cr->egid, cr->sgid)) { + dt_dbg_probe("Probe (ID %d EPID %d) " + "Skipped\n", + id, ecb->dte_epid); continue; + } } } @@ -732,14 +739,19 @@ void dtrace_probe(dtrace_id_t id, uintptr_t arg0, uintptr_t arg1, } while (cmpxchg(activity, curr, DTRACE_ACTIVITY_KILLED) != curr); + dt_dbg_probe("Probe (ID %d EPID %d) Skipped\n", + id, ecb->dte_epid); continue; } } if ((offs = dtrace_buffer_reserve(buf, ecb->dte_needed, ecb->dte_alignment, state, - &mstate)) < 0) + &mstate)) < 0) { + dt_dbg_probe("Probe (ID %d EPID %d) Skipped\n", + id, ecb->dte_epid); continue; + } tomax = buf->dtb_tomax; ASSERT(tomax != NULL); @@ -782,6 +794,8 @@ void dtrace_probe(dtrace_id_t id, uintptr_t arg0, uintptr_t arg1, dt_dbg_probe(" Predicate not met (%d)\n", rval); + dt_dbg_probe("Probe (ID %d EPID %d) Done\n", + id, ecb->dte_epid); continue; }