public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Noah Goldstein <goldstein.w.n@gmail.com>
Cc: libc-alpha@sourceware.org
Subject: Re: [PATCH 2/2] x86: Add generic CPUID data dumper to ld.so --list-diagnostics
Date: Mon, 11 Sep 2023 06:24:21 +0200	[thread overview]
Message-ID: <871qf549sa.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <CAFUsyfKZaCyuU1Bjvrw=P6GOJcr4hRDWa5pzBPPgmhfMJo_XXQ@mail.gmail.com> (Noah Goldstein's message of "Sun, 10 Sep 2023 14:56:24 -0500")

* Noah Goldstein:

> On Fri, Sep 8, 2023 at 3:10 PM Florian Weimer <fweimer@redhat.com> wrote:
>>
>> This is surprisingly difficult to implement if the goal is to produce
>> reasonably sized output.  With the current approaches to output
>> compression (suppressing zeros and repeated results between CPUs,
>> folding ranges of identical subleaves, dealing with the %ecx
>> reflection issue), the output is less than 600 KiB even for systems
>> with 256 threads.
>>
> Maybe should just output a complete json?

JSON cannot directly represent 64-bit integers, so it would need some
custom transformation for other parts of the --list-diagnostics output.

> Then users can pretty easily write scripts to extract the exact information
> they are after. Or or the dumper can be extended in the future to let
> the user specify fields/values to dump so it can be configured to be more
> reasonable?

I'm not sure what is unreasonable about the current implementation?  I
complained about how hard it is getting the data and distilling it into
something that is not a gigantic data blob.

To be clear, without only trivial zero-values suppression, brute-force
enumeration (cutting off at 512 subleaves) results in roughly 8 KiB of
raw data per *CPU*.  It's even larger for recent CPUs which have more of
the funny ECX behavior (where unsupported subleaves do not come back as
zero).

Thanks,
Florian


  reply	other threads:[~2023-09-11  4:24 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-08 20:09 [PATCH 1/2] elf: Wire up _dl_diagnostics_cpu_kernel Florian Weimer
2023-09-08 20:10 ` [PATCH 2/2] x86: Add generic CPUID data dumper to ld.so --list-diagnostics Florian Weimer
2023-09-10 19:56   ` Noah Goldstein
2023-09-11  4:24     ` Florian Weimer [this message]
2023-09-11 16:16       ` Noah Goldstein
2023-09-11 16:25         ` Florian Weimer
2023-09-11 16:28           ` Noah Goldstein
2023-09-11 16:31             ` Noah Goldstein
2023-09-11 17:48             ` Florian Weimer
2023-09-11 18:35               ` Noah Goldstein
2023-09-11 16:08   ` Adhemerval Zanella Netto
2023-09-11 16:19     ` Florian Weimer
2023-09-11 16:41       ` Adhemerval Zanella Netto
2024-02-09 19:08 [PATCH 0/2] Enhanced x86 CPU diagnostics Florian Weimer
2024-02-09 19:08 ` [PATCH 2/2] x86: Add generic CPUID data dumper to ld.so --list-diagnostics Florian Weimer
2024-02-09 19:34   ` H.J. Lu
2024-02-10  0:44     ` H.J. Lu

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=871qf549sa.fsf@oldenburg.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=goldstein.w.n@gmail.com \
    --cc=libc-alpha@sourceware.org \
    /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).