inline

Alejandro Colomar alx.manpages at gmail.com
Thu Jun 2 15:25:07 UTC 2022


On 6/2/22 17:12, Alejandro Colomar wrote:
> find src \
>    | grep '\.[ch]$' \
>    | xargs pcregrep -M '(?s)nxt(_always)?_inline[\s\w\*]*\s\*?\w+\(' \
>    | grep -o '\w\+(' \
>    | sed 's/(//' \
>    | while read f; do
>      find src \
>      | grep '\.[ch]$' \
>      | xargs pcregrep -Mn 
> '(?s)^(\s+)[^\n]*nxt_slow_path(?:(?!^\1?}).)*?\b'"$f"'\b(?:(?!\1}).)*?^\1}' 
> \
>      | sed -E 's/^[^:]+:[0-9]+:/\n\n&\n/' \
>      | grep -o "\b$f\b";
>      # You can filter with the following instead of `grep -o ...`
>      # to view the code (remember to remove |sort|uniq):
>      # | perl -pe 's/('"$f"')/\033[32m\1\033[0m/';
>    done \
>    | sort \
>    | uniq;

There were a few typos in that regex.  The list is slightly smaller, but 
still too big:

$ find src \
   | grep '\.[ch]$' \
   | xargs pcregrep -M '(?s)nxt(_always)?_inline[\s\w\*]*\s\*?\w+\(' \
   | grep -o '\w\+(' \
   | sed 's/(//' \
   | while read f; do
     find src \
     | grep '\.[ch]$' \
     | xargs pcregrep -Mn '(?s)^( 
+)[^\s][^\n]*nxt_slow_path(?:(?!^\1?}).)*?\b'"$f"'\b(?:(?!\1}).)*?^\1}' \
     | sed -E 's/^[^:]+:[0-9]+:/\n\n&\n/' \
     | grep -o "\b$f\b";
     # You can filter with the following instead of `grep -o ...`
     # to view the code (remember to remove |sort|uniq):
     # | perl -pe 's/('"$f"')/\033[32m\1\033[0m/';
   done \
   | sort \
   | uniq;
nxt_array_remove_last
nxt_cpymem
nxt_h1p_request_error
nxt_perl_psgi_add_sptr
nxt_perl_psgi_add_str
nxt_perl_psgi_add_value
nxt_perl_psgi_cb_request_done
nxt_pivot_root
nxt_port_close_fds
nxt_port_socket_write
nxt_thread_get_tid
nxt_unit_close
nxt_unit_process_release


-- 
Alejandro Colomar
<http://www.alejandro-colomar.es/>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://mailman.nginx.org/pipermail/unit/attachments/20220602/86c76c6f/attachment.bin>


More information about the unit mailing list