public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Torvald Riegel <triegel@redhat.com>
To: Martin Galvan <omgalvan.86@gmail.com>
Cc: GLIBC Devel <libc-alpha@sourceware.org>
Subject: Re: [PATCH] Fix mutex pretty printer test and pretty printer output.
Date: Wed, 11 Jan 2017 10:32:00 -0000	[thread overview]
Message-ID: <1484130735.5606.245.camel@redhat.com> (raw)
In-Reply-To: <CAN19L9FtwUUsFXi-Gyt3VbPxAhCjiYSRxfv3S9-BbMcuW35VfQ@mail.gmail.com>

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.

  reply	other threads:[~2017-01-11 10:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-10 16:11 Torvald Riegel
2017-01-10 16:39 ` Martin Galvan
2017-01-11 10:32   ` Torvald Riegel [this message]
2017-01-11 12:45     ` Martin Galvan
2017-01-11 12:49       ` Martin Galvan
2017-01-11 14:01       ` Torvald Riegel
2017-01-11 14:08         ` Martin Galvan
2017-01-11 14:23           ` Torvald Riegel

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=1484130735.5606.245.camel@redhat.com \
    --to=triegel@redhat.com \
    --cc=libc-alpha@sourceware.org \
    --cc=omgalvan.86@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).