From: John Mellor-Crummey <johnmc@rice.edu>
To: Mark Wielaard <mark@klomp.org>
Cc: John Mellor-Crummey <johnmc@rice.edu>,
elfutils-devel@sourceware.org,
Jonathon Anderson <janderson@rice.edu>,
Xiaozhu Meng <xm13@rice.edu>
Subject: Re: [PATCH] (v2) read inlining info in an NVIDIA extended line map
Date: Wed, 10 Nov 2021 09:14:13 -0600 [thread overview]
Message-ID: <E0D7E89E-0BDA-48AF-BF85-E3FAFDFBBBB6@rice.edu> (raw)
In-Reply-To: <YYub//GCEHIJSu1T@wildebeest.org>
Mark,
Your tweaks are fine. Many thanks for accepting our patch before 186!
--
John Mellor-Crummey Professor
Dept of Computer Science Rice University
email: johnmc@rice.edu phone: 713-348-5179
> On Nov 10, 2021, at 4:16 AM, Mark Wielaard <mark@klomp.org> wrote:
>
> Hi John,
>
> On Thu, Nov 04, 2021 at 04:41:58PM -0500, John Mellor-Crummey via Elfutils-devel wrote:
>> Here I describe just the improvements to that patch that address Mark’s concerns:
>>
>> (1) all of the code for handling NVIDIA DWARF extensions is always
>> available; there is no special configuration switch needed.
>> (2) all changes are bracketed by comments that mark them NVIDIA
>> extensions
>> (3) the DWARF extended opcodes have been renamed with names that
>> include NVIDIA in them
>> (4) the two new API functions to surface the new information have
>> been improved to separate the interface result from the internal
>> representation (at Mark’s request)
>> (4a) the API for extracting the name of an inlined function in a
>> DWARF line now returns a const char * instead of a string
>> table index
>> (4b) the API for extracting an inline “context” now returns a
>> pointer to a DWARF line where the code is inlined rather
>> than returning an unsigned int (an index into the line table
>> that one could use to compute the pointer)
>> (5) there are test cases for readelf and libdw that use a binary
>> generated by NVIDIA’s compiler. the test cases include information
>> about how the binary was generated
>
> This is really nice. I did make a few tweaks:
>
> - Added your original overview as commit message because it contains
> all the relevant context and pointers to more information.
>
> - Added ChangeLog and NEWS entries, mainly for my own review.
>
> - I removed the bracketed comments, I think they cluttered the code
> and made it seem like we wanted to remove it or disable at some
> point. I think it should just be considered part of the normal code
> now.
>
> - I removed the NVIDIA_LINEMAP_INLINING_EXTENSIONS define from
> version.h. If people want they can have a configure check for the
> new dwarf_linecontext or dwarf_linefunctionname functions or the
> DW_LNE_NVIDIA_inlined_call or DW_LNE_NVIDIA_set_function_name
> constants.
>
> - I made dwarf_linefunctionname always return NULL on error (not
> the magic string "???", which is still used in readelf).
>
> - Changed the header check to be exactly 4 bytes, so we are sure to be
> able to read the str offset completely (if it is smaller or larger
> we cannot handle it).
>
> - The new dwarf_linecontext and dwarf_linefunctionname get their own
> new ELFUTILS_0.186 section in libdw.map because they are introduced
> with verion 0.186.
>
> - The new run-nvidia-extended-linemap-libdw.sh and
> run-nvidia-extended-linemap-readelf.sh sripts and
> testfile_nvidia_linemap.bz2 testfile were added to EXTRA_DIST so
> they show up in a dist tarball.
>
> Patch as committed attached. Hope you don't mind the cleanups.
>
> We still want to reduce the size of the Dwarf_Line_s and struct
> line_state (independent of these extensions). I opened a new bug for
> that: https://sourceware.org/bugzilla/show_bug.cgi?id=28574
>
> Thanks,
>
> Mark<0001-libdw-readelf-Read-inlining-info-in-NVIDIA-extended-.patch>
prev parent reply other threads:[~2021-11-10 15:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-06 0:07 Extension: " John Mellor-Crummey
2021-09-10 15:49 ` [PATCH] read inlining info in an NVIDIA extended line map (was: Extension ...) John Mellor-Crummey
2021-09-10 17:11 ` Mark Wielaard
2021-09-15 18:25 ` [PATCH] (revised) " John Mellor-Crummey
2021-11-04 21:41 ` [PATCH] (v2) read inlining info in an NVIDIA extended line map John Mellor-Crummey
2021-11-05 9:34 ` Mark Wielaard
2021-11-10 10:16 ` Mark Wielaard
2021-11-10 15:14 ` John Mellor-Crummey [this message]
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=E0D7E89E-0BDA-48AF-BF85-E3FAFDFBBBB6@rice.edu \
--to=johnmc@rice.edu \
--cc=elfutils-devel@sourceware.org \
--cc=janderson@rice.edu \
--cc=mark@klomp.org \
--cc=xm13@rice.edu \
/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).