Re: [PATCH 2/2] perf LoongArch: Simplify mksyscalltbl

From: Leo Yan
Date: Fri May 26 2023 - 21:56:01 EST


On Tue, May 23, 2023 at 06:22:07PM +0800, Tiezhu Yang wrote:
> In order to print the numerical entries of the syscall table,
> there is no need to call the host compiler to build and then
> run a program, this can be done directly by the shell script.
>
> This is similar with commit 9854e7ad35fe ("perf arm64: Simplify
> mksyscalltbl").
>
> Signed-off-by: Tiezhu Yang <yangtiezhu@xxxxxxxxxxx>
> ---
> .../arch/loongarch/entry/syscalls/mksyscalltbl | 32 ++++++----------------
> 1 file changed, 8 insertions(+), 24 deletions(-)
>
> diff --git a/tools/perf/arch/loongarch/entry/syscalls/mksyscalltbl b/tools/perf/arch/loongarch/entry/syscalls/mksyscalltbl
> index c52156f..d7d97d5 100755
> --- a/tools/perf/arch/loongarch/entry/syscalls/mksyscalltbl
> +++ b/tools/perf/arch/loongarch/entry/syscalls/mksyscalltbl
> @@ -22,40 +22,24 @@ create_table_from_c()

Nitpick: since this patch tries to remove the temporary C program and
simply use shell to generate syscall table, to avoid confusion, it's
good to update the function name from create_table_from_c() to
create_sc_table().

I know Arm64's mksyscalltbl has the same issue, we can use a separate
patch to address it.

Otherwise, this patch LGTM:

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