Re: [PATCH 1/2] perf arm64: Handle __NR3264_ prefixed syscall number

From: Leo Yan
Date: Fri May 26 2023 - 21:45:46 EST


On Wed, May 24, 2023 at 03:18:28PM +0800, Tiezhu Yang wrote:
> On 05/24/2023 02:43 PM, Alexander Kapshuk wrote:

[...]

> Yes, there are only 2 patterns such as "__NR_" and "__NR3264_",
> I confirmed that in include/uapi/asm-generic/unistd.h.
>
> > routines, they may be combined into a single sub routine like so:
> > awk '$2 ~ "__NR" && $3 !~ "__NR3264_" {
> > sub("^#define __NR(3264)?_", "")
> > print | "sort -k2 -n"
> > }'

Thanks for improving this, Tiezhu and Alexander.

The format between '[46]' and '[__NR3264_ftruncate]' has changed back
and forth for several times due to various reasons ;)

Above change is a good improvement for me and I tested at my side
with below commands:

$ aarch64-linux-gnu-gcc -E -dM -x c -I tools/include/uapi/ \
tools/include/uapi/asm-generic/unistd.h \
| awk '$2 ~ "__NR" && $3 !~ "__NR3264_" { sub("^#define
__NR(3264)?_", ""); print | "sort -k2 -n"}'

The result looks good to me. You are welcome to add my review tag:

Reviewed-by: Leo Yan <leo.yan@xxxxxxxxxx>