On 18/02/09 03:34 PM, James Litchfield wrote:
rw_enter, mutex_enter, et al. are assembly language functions
that do not engage in the typical function call save/restore register
stuff that DTrace keys from. The only things you're able to watch via
DTrace from those functions is the C functions they call out to if the
fast path is not possible.

I suppose what I'm seeking is an answer on whether or not it is
possible to implement the fbt probes for such functions despite
their implementation in the kernel being outside the realm of
those that are normally associated with fbt. Well, I suppose
this is just software, so theoretically anything is possible.
But is this something that would be entertained?

Darren


lockstat works its magic by rewriting some code in those functions at
certain places (e.g., .rw_read_enter_lockstat_patch_point). Some of the patch points are early but some are quite late (as is the case with rw_enter).

See $SRC/sparc/v9/mp/lock_prim.s for the details of the SPARC implementation.

Jim
---

----- Original Message -----
From: Darren Reed <darren.r...@sun.com>
Date: Wednesday, February 18, 2009 3:11 pm
Subject: [dtrace-discuss] dtrace and locking...
To: dtrace-discuss@opensolaris.org


What I'd like to be able to do is include functions such as
rw_enter in fbt scripting. The problem I'm faced with is
that functions such as these appear to not be present in
fbt, only rw_enter_sleep...

I glanced over at lockstat but rw-acquired is on the wrong
side of the lock for me.

What I'm trying to do is provoke a race condition and
the easiest way that I could think of would be to force
the thread to sleep as its about to enter the protected
section of code.

Is there any chance of there being RFE-able work here
to provide an fbt or other probe pre-lock on the "leading"
edge of functions such as rw_enter?

Darren

_______________________________________________
dtrace-discuss mailing list
dtrace-discuss@opensolaris.org

_______________________________________________
dtrace-discuss mailing list
dtrace-discuss@opensolaris.org

Reply via email to