From: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
To: Joe Talbott <joetalbott@gmail.com>, Girish Joshi <girish946@gmail.com>
Cc: Florian Weimer <fweimer@redhat.com>,
Girish Joshi via Libc-alpha <libc-alpha@sourceware.org>
Subject: Re: [PATCH] manual: scripts/documented.sh updated
Date: Thu, 11 Apr 2024 14:18:08 -0300 [thread overview]
Message-ID: <d0e3d163-157e-4e9e-beb0-176a01cb4fd7@linaro.org> (raw)
In-Reply-To: <CAL7gdfenYYyWZ-dF-48vLimPGAZTAL8ZUzO7MQWbkkLRqD4X2w@mail.gmail.com>
On 01/04/24 13:33, Joe Talbott wrote:
> On Sat, Mar 30, 2024 at 2:54 PM Girish Joshi <girish946@gmail.com> wrote:
>>
>> Thanks Joe, I've updated the script.
>> It's just that the output now does not contain the addresses and the
>> T/W info about the symbol is not present.
>> Do we need that info about each symbol in the output?
>
> I guess that information is useful. I'm attaching a patch that
> reverts to 'cut -b 12' and does the grep and diff with a copy of
> AVAILABLE that does not have the offsets and waits until it builds the
> HTML table to get the matching line with the offset.
>
> Thanks,
> Joe
>>
>> Thanks!
>> Girish Joshi
>> girishjoshi.io
>>
>> On Sat, Mar 11, 2023 at 8:18 PM Joe Simmons-Talbott
>> <joetalbott@gmail.com> wrote:
>>>
>>> On Sun, Mar 05, 2023 at 11:44:22AM +0530, Girish Joshi via Libc-alpha wrote:
>>>> Hi Florian,
>>>> Thanks for the review.
>>>> Turns out `diff` was not working with the given input files, this
>>>> patch fixes that.
>>>> I'm not sure if there is a list of people who volunteered to document
>>>> some specific functions.
>>>> So that comment from the output html is removed.
>>>>
>>>> Thanks!
>>>> Girish Joshi
>>>>
>>>> On Mon, Feb 27, 2023 at 11:26 PM Florian Weimer <fweimer@redhat.com> wrote:
>>>>>
>>>>> * Girish Joshi via Libc-alpha:
>>>>>
>>>>>> Hello,
>>>>>> As per the Missing Functions section of master Todo list[1],
>>>>>> scripts/documented.sh needs to be updated.
>>>>>>
>>>>>> Could someone please review this patch?
>>>>>> It removes the reference to linuxthreads/*.taxi files from the script
>>>>>> and removes the individual email address from the output.
>>>>>
>>>>> The script still doesn't seem to work, probably because the symbol names
>>>>> are not extract properly:
>>>>>
>>>>> 43120 T _dl_mcount_wrapper 43140 T _dl_mcount_wrapper_c 43320 W clogf 43320 W clogf32
>>>>> 435c0 T _dl_find_object 43740 T realpath 43770 T quick_exit 43790 T _IO_vfscanf
>>>>> 437c0 T _pthread_cleanup_pus 437d0 T _pthread_cleanup_pop 437d0 W cprojf 437d0 W cprojf32
>>>>>
>>>>> _dl_find_object is documented.
>>>>>
>>>>> _IO_vfscanf should be recognized as an alias of vfscanf, but this is
>>>>> more of an RFE than a bug fix.
>>>>>
>>>>> Thanks,
>>>>> Florian
>>>>>
>>>
>>>> From 5148c65ac07688dc5c3ee79a9b0f054232d64df3 Mon Sep 17 00:00:00 2001
>>>> From: Girish Joshi <girish946@gmail.com>
>>>> Date: Sun, 5 Mar 2023 11:15:00 +0530
>>>> Subject: [PATCH] manual: scripts/documented.sh updated
>>>>
>>>> References for linuxthreads are removed from scripts/documented.sh.
>>>> Also removed the individual email address from the html output.
>>>>
>>>> Fixed the steps to retrive undocumented functions
>>>> ---
>>>> scripts/documented.sh | 44 +++++++++++++++++++++++++++++++------------
>>>> 1 file changed, 32 insertions(+), 12 deletions(-)
>>>> mode change 100644 => 100755 scripts/documented.sh
>>>>
>>>> diff --git a/scripts/documented.sh b/scripts/documented.sh
>>>> old mode 100644
>>>> new mode 100755
>>>> index 7d1ffd4a92..dda6a32283
>>>> --- a/scripts/documented.sh
>>>> +++ b/scripts/documented.sh
>>>> @@ -1,9 +1,15 @@
>>>> #!/bin/sh
>>>> bindir=$1
>>>>
>>>> -VERSION=1.0
>>>> +# usage: scripts/documented.sh <path to glibc build directory>
>>>> +# for example:
>>>> +# scripts/documented.sh $HOME/build/glibc
>>>>
>>>> -grep -E -h @deftypefu?nx? *.texi ../linuxthreads/*.texi |
>>>> +VERSION=1.1
>>>> +
>>>> +# Collect the documented functions from manual/*.texi files.
>>>> +
>>>> +grep -E -h @deftypefu?nx? manual/*.texi |
>>>> sed -e 's/@deftypefunx*[[:space:]]*\({[^{]*}\|[[:alnum:]_]*\)[[:space:]]*\([[:alnum:]_]*\).*/\2/' -e 's/@deftypefn {[^}]*function}*[[:space:]]*\({[^{]*}\|[[:alnum:]_]*\)[[:space:]]*\([[:alnum:]_]*\).*/\2/' -e '/^@/d' |
>>>> sed -e '/^obstack_/d' -e '/^\([lf]\|\)stat\(\|64\)$/d' -e '/^mknod$/d' |
>>>> sed -e '/^signbit$/d' -e '/^sigsetjmp$/d' |
>>>> @@ -12,9 +18,12 @@ sed -e '/^__fwriting$/d' -e '/^__fwritable$/d' -e '/^__fsetlocking$/d' |
>>>> sed -e '/^__freading$/d' -e '/^__freadable$/d' -e '/^__fpurge$/d' |
>>>> sed -e '/^__fpending$/d' -e '/^__flbf$/d' -e '/^__fbufsize$/d' |
>>>> sed -e '/^alloca$/d' |
>>>> +sed -r '/^\s*$/d' |
>>>> sort -u > DOCUMENTED
>>>>
>>>> -nm --extern --define $bindir/libc.so $bindir/math/libm.so $bindir/rt/librt.so $bindir/linuxthreads/libpthread.so $bindir/dlfcn/libdl.so $bindir/crypt/libcrypt.so $bindir/login/libutil.so |
>>>> +
>>>> +# extract the exported symbols from the libraries.
>>>> +nm --extern --define $bindir/libc.so $bindir/math/libm.so $bindir/rt/librt.so $bindir/nptl/libpthread.so $bindir/dlfcn/libdl.so $bindir/crypt/libcrypt.so $bindir/login/libutil.so |
>>>> grep -E " [TW] ([[:alpha:]]|_[[:alpha:]])" |
>>>> sed 's/\(@.*\)//' |
>>>> cut -b 12- |
>>>
>>> You can change this to 'cut -v 20-' and avoid the extra
>>> AVAILABLE_WITHOUT_OFFSET part.
>>>
>>> Thanks,
>>> Joe
>>>> @@ -25,6 +34,9 @@ sed -e '/^_mcleanup$/d' -e '/^_rpc_dtablesize$/d' -e '/^_seterr_reply$/d' |
>>>> sed -e '/^_nss/d' -e '/^_setjmp$/d' |
>>>> sort -u > AVAILABLE
>>>>
>>>> +# remove offset details from nm output
>>>> +cat AVAILABLE | cut -b 9- | sort -u > AVAILABLE_WITHOUT_OFFSET
>>>> +
>>>> cat <<EOF
>>>> <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
>>>> <html>
>>>> @@ -39,9 +51,7 @@ cat <<EOF
>>>> which are not yet documented in the manual. This list is
>>>> automatically created and therefore might contain errors. Please
>>>> check the latest manual (available from the CVS archive) before
>>>> - starting to work. It might also be good to let me know in
>>>> - advanace on which functions you intend to work to avoid
>>>> - duplication.</p>
>>>> + starting to work.</p>
>>>>
>>>> <p>A few comments:</p>
>>>>
>>>> @@ -52,15 +62,23 @@ cat <<EOF
>>>> <li>Similarly for the LFS functions (those ending in 64).</li>
>>>> </ul>
>>>>
>>>> - <p>The function sombody already volunteered to document are marked
>>>> - with a reference to the person.</p>
>>>>
>>>> <center><table>
>>>> EOF
>>>>
>>>> n=0
>>>> -diff -y --width=60 --suppress-common-lines DOCUMENTED AVAILABLE |
>>>> -expand | cut -b 33- | sed '/^[[:space:]]*$/d' |
>>>> +
>>>> +# get the list of undocumented functions
>>>> +grep -Fvx -f DOCUMENTED AVAILABLE_WITHOUT_OFFSET > UNDOCUMENTED_WITHOUT_OFFSET
>>>> +
>>>> +# get undocumented functions with offset info
>>>> +for func in `cat UNDOCUMENTED_WITHOUT_OFFSET`
>>>> +do
>>>> + grep " $func$" AVAILABLE >> UNDOCUMENTED
>>>> +done
>>>> +
>>>> +diff -y --width=120 --suppress-common-lines DOCUMENTED UNDOCUMENTED |
>>>> +expand | cut -b 61- | sed '/^[[:space:]]*$/d' |
>>>> while read name; do
>>>> line="$line
>>>> <td><tt>$name</tt></td>"
>>>> @@ -95,8 +113,10 @@ cat <<EOF
>>>> </table></center>
>>>>
>>>> <hr>
>>>> - <address><a href="mailto:drepper@redhat.com">Ulrich Drepper</a></address>
>>>> -Generated on $(date) with documented.sh version $VERSION
>>>> + Generated on $(date) with documented.sh version $VERSION
>>>> </body>
>>>> </html>
>>>> EOF
>>>> +
>>>> +# cleanup the files
>>>> +rm -rf UNDOCUMENTED_WITHOUT_OFFSET AVAILABLE_WITHOUT_OFFSET AVAILABLE
>>>> --
>>>> 2.39.2
>>>>
>>>
The issues from previous reviews seems not to be present and the output is
an improvement over the current status. LGTM, thanks.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
PS: next time please send the patch as inline as well (it is easier to
comment). Also for newer version send a new message with a vX.
prev parent reply other threads:[~2024-04-11 17:18 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-24 14:34 Girish Joshi
2023-02-27 17:56 ` Florian Weimer
2023-03-05 6:14 ` Girish Joshi
2023-03-05 6:55 ` Girish Joshi
2023-03-11 14:48 ` Joe Simmons-Talbott
2024-03-30 18:54 ` Girish Joshi
2024-04-01 16:33 ` Joe Talbott
2024-04-02 4:01 ` Girish Joshi
2024-04-03 15:44 ` Girish Joshi
2024-04-03 17:10 ` Adhemerval Zanella Netto
2024-04-04 13:58 ` Girish Joshi
2024-04-07 8:13 ` Girish Joshi
2024-04-10 18:35 ` Girish Joshi
2024-04-11 17:18 ` Adhemerval Zanella Netto [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=d0e3d163-157e-4e9e-beb0-176a01cb4fd7@linaro.org \
--to=adhemerval.zanella@linaro.org \
--cc=fweimer@redhat.com \
--cc=girish946@gmail.com \
--cc=joetalbott@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).