This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Adding systemtap probe points in pthread library (slightly revised again)


>>>>> "Rayson" == Rayson Ho <rho@redhat.com> writes:

Rayson> +mutex_acquired - probe for pthread_mutex_lock
Rayson> +               arg1 = address of mutex lock
Rayson> +mutex_block   - probe for resume from _possible_ mutex block event
Rayson> +              arg1 = address of mutex lock
Rayson> +mutex_entry   - probe for entry to the pthread_mutex_lock function
Rayson> +              arg1 = address of mutex lock

mutex_block seems misnamed to me.  I would suggest something like
mutex_unblock or mutex_unblocked instead.

Also, mutex_block and mutex_acquired seem fairly close in semantics --
almost redundant.  So another approach would be to just drop
mutex_block.

The piece that is missing for my scenario is a probe that fires just
before glibc blocks on a mutex.  I couldn't think of a way to get this
information with the current set of probes.

The rationale for such a probe is to make it possible to implement a
deadlock detector in gdb.  Maybe this could be done with the current
probes, assuming that debuginfo is available.  But it seems like it
would be simpler with an "about to block" probe.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]