All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mathieu Desnoyers <compudj@krystal.dyndns.org>
To: Jan Kiszka <jan.kiszka@web.de>
Cc: Gian Lorenzo Meocci <glmeocci@gmail.com>,
	ltt-dev@lists.casi.polymtl.ca, linux-kernel@vger.kernel.org,
	"K.Prasad" <prasad@linux.vnet.ibm.com>
Subject: Re: [ltt-dev] trace a futex
Date: Wed, 3 Dec 2008 00:26:40 -0500	[thread overview]
Message-ID: <20081203052640.GA13701@Krystal> (raw)
In-Reply-To: <4935B25F.7010701@web.de>

[-- Attachment #1: Type: text/plain, Size: 1979 bytes --]

* Jan Kiszka (jan.kiszka@web.de) wrote:
> Mathieu Desnoyers wrote:
> > * Gian Lorenzo Meocci (glmeocci@gmail.com) wrote:
> >> Hi Mathieu,
> >>
> >> thanks for your reply.
> >>
> >> I want specify that:
> >> 1) I am already patching glibc (and, of course, nptl/pthread_*)
> >> 2) I already add two event to pthread_mutex_lock. The first at the
> >> beginning of the function and the second after all return 0 presented
> >> on that function. But those two events are not enough to establish if
> >> a pthread_mutex_lock has been blocking.
> >> In fact I know only the time spent on pthread_mutex_lock. If this time
> >> is little probably I hold the mutex otherwise I was been descheduled.
> >>
> >> So thanks a lot again,
> >>
> >>
> > 
> > Ok, then you will probably want to correlate your information with :
> > 
> > - scheduling activity regarding your threads
> > - system call entry events, especially sys_futex. Note that a thread
> >   calling sys_futex won't _necessarily_ be put to sleep.. it may still
> >   be able to take the lock relatively quickly.
> > 
> > If you need more than that, we may think of instrumenting futex.c, but I
> > am not sure this is required.
> 
> Haven't checked the state of instrumentation recently: Is the futex
> operation visible in the trace now? It used to be not, and we often had
> to guess the reason for sys_futex (wake, wait, pi or not pi, etc.) from
> the context - or add ad-hoc instrumentation.
> 
> Jan
> 

It still isn't instrumented, and I think it would be good to add such
instrumentation.

Have a look at the patch done by K. Prasad for futex.c : it should
probably be updated so it uses tracepoints instead of markers. Anyone
would like to do this ?

See http://lkml.org/lkml/2008/4/15/125
"[RFC PATCH 0/2] Debugging infrastructure for Futexes using Markers"

Mathieu

-- 
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

       reply	other threads:[~2008-12-03  5:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <8d94e9280812021142j2eb5ca72td730410e97ccd9a1@mail.gmail.com>
     [not found] ` <20081202195015.GA25792@Krystal>
     [not found]   ` <8d94e9280812021215m6a63d6c2l4e64acd26274953d@mail.gmail.com>
     [not found]     ` <20081202215519.GA734@Krystal>
     [not found]       ` <4935B25F.7010701@web.de>
2008-12-03  5:26         ` Mathieu Desnoyers [this message]
2008-12-03 18:01           ` [ltt-dev] trace a futex K.Prasad
2008-12-04  8:53             ` Peter Zijlstra
2008-12-05 12:28               ` Mathieu Desnoyers
2008-12-05 15:58                 ` Peter Zijlstra
2008-12-05 16:01                 ` Peter Zijlstra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081203052640.GA13701@Krystal \
    --to=compudj@krystal.dyndns.org \
    --cc=glmeocci@gmail.com \
    --cc=jan.kiszka@web.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ltt-dev@lists.casi.polymtl.ca \
    --cc=prasad@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.