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

Bert Wesarg bert.wesarg@googlemail.com
Wed Feb 9 18:23:00 GMT 2011


On Wed, Feb 9, 2011 at 18:09, Rayson Ho <rho@redhat.com> wrote:
> Thanks again, Roland! I've applied my changes on top of your latest
> branch refresh, and it works with & without those probes enabled.
>
> So here's my pthread probing patch again:
>
> diff --git a/nptl/DESIGN-systemtap-probes.txt b/nptl/DESIGN-systemtap-probes.txt
> index e69de29..5485ce4 100644
> --- a/nptl/DESIGN-systemtap-probes.txt
> +++ b/nptl/DESIGN-systemtap-probes.txt
> @@ -0,0 +1,88 @@

> +
> +wrlock_entry - probe for entry to the pthread_rwlock_wrlock function
> +             arg1 = address of rw lock
> +rdlock_entry - probe for entry to the pthread_rwlock_rdlock function
> +             arg1 = address of rw lock
> +
> +rwlock_destroy - probe for pthread_rwlock_destroy
> +               arg1 = address of rw lock
> +rwlock_acquire_write - probe for pthread_rwlock_wrlock (after getting the lock)
> +                     arg1 = address of rw lock

IMHO, this is a typo. Because for 'read' you have
'rdlock_acquire_read' and 'rdlock_entry'. So judging from this
pattern, I would expect, that this probe would be
'wrlock_acquire_write', like 'wrlock_entry'. Also note, that in the
'acquire' probe names are redundancies for 'read' and 'write' (after
fixing the typo), while in the 'entry' names not.

Bert

> +rdlock_acquire_read - probe for pthread_rwlock_rdlock after successfully getting
> +                      the lock
> +                    arg1 = address of rw lock
> +rwlock_unlock - probe for pthread_rwlock_unlock
> +              arg1 = address of rw lock
> +



More information about the Libc-alpha mailing list