From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by sourceware.org (Postfix) with ESMTPS id 88C3D3858D20 for ; Thu, 11 Apr 2024 17:18:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 88C3D3858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 88C3D3858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::62e ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712855897; cv=none; b=akUUnFP7eHNo4BA4s0iZM7e3QWzuZcUGfaR9QULNy1cS6NylYDXQe2KFSIuOtMtn/Wfmhk7hHQbIG/ssUclmtR9zhcgkWll+WWUttlvuFUwTgzDGo/JFnHYjHrtspp2eB9RMPR4xIKQtIuCgCt+ktZo1pOcS3Vty5W2SA3oX8/Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712855897; c=relaxed/simple; bh=8E+lg/3ZHo/6OEArd8WBptetOfqJcKLVARdqpe0BqWg=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=RnQXj5jVuRIfPtUL/gYVVXPzatJMvzOK+iwlxkUA0FWx5GNZWBx06+/IlMlCPrWJPiJdDl9yS3LyRixvY+CELaJ4DC9FkH+rMnpxN0p2e6CY/2jXHtsbGoHFZOIkSubLe9YCTpHSpOeevB4Yw0h2LPML7OcbSUML2wodFzyzHCc= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-1e4f341330fso969795ad.0 for ; Thu, 11 Apr 2024 10:18:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1712855892; x=1713460692; darn=sourceware.org; h=content-transfer-encoding:in-reply-to:organization:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to; bh=elP/asjpiPRfkPbTVGK1ueW+YMEWnQkqjuJXGVBzB5Q=; b=jl53DxjbHaJECtZeKtHbWAY7npIWfKQpBARNltNGS0b4AQnE9bIlmXuZzgI1tg3al2 793FtqPBeszM1rD0dkpshmPIQYlAw8HTjQ0PJCg+JxDWMc7kCbpU94D44WdzVAuSQiUY 3d6ylom+qGMtNrMUkh48qDUoroMgEC2Jif08HZe0CB2VTLr0hBYBMY27rWqP77tC1OHF qkHKGbZ9W116mPcv0jALyEdyjmRY1ZulUwz+SjGehhd64sdK9fQhQvvS9gUpQya5dEy3 HrjbgrnzWQSvC0yDiJfnwITEEmmRh6QyKET1ZvTYni1rbj1TkfMe257cBVZkFqV2wIce eEuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712855892; x=1713460692; h=content-transfer-encoding:in-reply-to:organization:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=elP/asjpiPRfkPbTVGK1ueW+YMEWnQkqjuJXGVBzB5Q=; b=YUOlpfiG5h/8uL0TokhyT+AoO+nNUTlOiZh6TylOCiQL2Tu6qCdKe08Yig3U1qBCFW XCl4FEzb8jmAruh6RfPyd6ks4JlEDCyBIngEISBtzV0vqkhdlKPTVcNsge2fyFsMllta TjWwGW9CWNjy+Rdu6jUg/uNAfVQ4d1mZQFAM3uyG7MsB6ghbNzi8oZW/FFGY539CY7PX t6je7XwAiD6Xn6efWOrEyU7bZXxidM1vAXODdDfKSNc3CnIqrntG8aoBBV9eZTBG7TEN Zn7+4tPl0VZ+hT4QMrTPL7uc3WASzmKBmNOIdp46G39TTZfq0FDhX5qYUecfOG5WQzO/ GIOA== X-Forwarded-Encrypted: i=1; AJvYcCXl46P1dkAgrfhLpulI/TMoGG3CsyKiqUvRoqFVHt3FhFFVDCXxkvI2TZk5yLZxGqVu9ksgN9f3T9rbZWB4vFbJThOejfmKWL/5 X-Gm-Message-State: AOJu0YwnOmQ4niiLERQQ5PQmTM76P48zPJHxdwcWDa8ICv7G0u/FLOZp py1y9lbkGNRRM8AqWxOsZHgMBFaAdDJZgy7oP5ZpWKlZjEQmvjVAQdjQhjYA2Sg= X-Google-Smtp-Source: AGHT+IGIaHKWJl+uasf1ktLW1EPZGdIeZNOCNHZ1+Q9Ie6nrSCXFmj9+sndnrBZ1CAfGKU2Ks7twxg== X-Received: by 2002:a17:903:2290:b0:1e2:9ddc:f72d with SMTP id b16-20020a170903229000b001e29ddcf72dmr139973plh.26.1712855892108; Thu, 11 Apr 2024 10:18:12 -0700 (PDT) Received: from ?IPV6:2804:1b3:a7c0:3e7e:2de7:f567:37e3:3edd? ([2804:1b3:a7c0:3e7e:2de7:f567:37e3:3edd]) by smtp.gmail.com with ESMTPSA id u10-20020a170903124a00b001e3e081e9e6sm1413378plh.62.2024.04.11.10.18.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 11 Apr 2024 10:18:11 -0700 (PDT) Message-ID: Date: Thu, 11 Apr 2024 14:18:08 -0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] manual: scripts/documented.sh updated To: Joe Talbott , Girish Joshi Cc: Florian Weimer , Girish Joshi via Libc-alpha References: <877cw3kn65.fsf@oldenburg.str.redhat.com> Content-Language: en-US From: Adhemerval Zanella Netto Organization: Linaro In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 01/04/24 13:33, Joe Talbott wrote: > On Sat, Mar 30, 2024 at 2:54 PM Girish Joshi 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 >> 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 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 >>>> 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 >>>> +# 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 <>>> >>>> >>>> @@ -39,9 +51,7 @@ cat <>>> 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.

>>>> + starting to work.

>>>> >>>>

A few comments:

>>>> >>>> @@ -52,15 +62,23 @@ cat <>>>
  • Similarly for the LFS functions (those ending in 64).
  • >>>> >>>> >>>> -

    The function sombody already volunteered to document are marked >>>> - with a reference to the person.

    >>>> >>>>
    >>>> 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 >>>> " >>>> @@ -95,8 +113,10 @@ cat <>>>
    $name
    >>>> >>>>
    >>>> -
    Ulrich Drepper
    >>>> -Generated on $(date) with documented.sh version $VERSION >>>> + Generated on $(date) with documented.sh version $VERSION >>>> >>>> >>>> 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 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.