This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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] Fix mutex pretty printer test and pretty printer output.


On Tue, 2017-01-10 at 13:38 -0300, Martin Galvan wrote:
> Thanks a lot for doing this; I was about to start working on something similar.
> 
> If I might make a suggestion: "Owner ID (if known)" doesn't really
> help the user understand what's happening when the mutex is acquired
> but the owner isn't recorded.

If it's zero, it may not be known.  Understanding why would require
explaining details of the mutex implementation.
Do you have a concrete suggestion for alternative wording, or do you
think that "(if known)" is okay?

> I'd say we should at least document this
> case somewhere (perhaps in the README?). I can write that myself if
> you want to.

Maybe.  If you want to go ahead and explain what the pretty printers
reveal, and how they should not be misunderstood (which is an important
part of this -- users should be aware that they get simplified
information), then please propose a patch.

It might also be worth to clearly state the design goals for the pretty
printers, which in my opinion is roughly:
* Provide simplified information about the state of synchronization
constructs to users.
* There is no guarantee that this information is complete and covers
everything a particular thread might do (e.g., the pretty printers do
not show if a thread is spin-waiting in an attempt to acquire a mutex).
* It is not aimed at understanding the details of the implementation of
the synchronization construct.


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