From: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
To: Charlie Jenkins <charlie@rivosinc.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
Ian Rogers <irogers@google.com>,
Hari Bathini <hbathini@linux.ibm.com>
Cc: "Arnaldo Carvalho de Melo" <acme@kernel.org>,
"Peter Zijlstra" <peterz@infradead.org>,
"Mark Rutland" <mark.rutland@arm.com>,
"Alexander Shishkin" <alexander.shishkin@linux.intel.com>,
"Jiri Olsa" <jolsa@kernel.org>,
"Adrian Hunter" <adrian.hunter@intel.com>,
"Paul Walmsley" <paul.walmsley@sifive.com>,
"Palmer Dabbelt" <palmer@dabbelt.com>,
"Mickaël Salaün" <mic@digikod.net>,
"Günther Noack" <gnoack@google.com>,
"Christian Brauner" <brauner@kernel.org>,
"Guo Ren" <guoren@kernel.org>,
"John Garry" <john.g.garry@oracle.com>,
"Will Deacon" <will@kernel.org>,
"James Clark" <james.clark@linaro.org>,
"Mike Leach" <mike.leach@linaro.org>,
"Leo Yan" <leo.yan@linux.dev>, "Jonathan Corbet" <corbet@lwn.net>,
"Arnd Bergmann" <arnd@arndb.de>,
linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
linux-riscv@lists.infradead.org,
linux-security-module@vger.kernel.org, bpf@vger.kernel.org,
linux-csky@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-doc@vger.kernel.org
Subject: Re: [PATCH v6 00/16] perf tools: Use generic syscall scripts for all archs
Date: Fri, 10 Jan 2025 12:34:46 +0530 [thread overview]
Message-ID: <8639C367-2669-4924-83D8-15EAFAC42699@linux.vnet.ibm.com> (raw)
In-Reply-To: <Z4A8NU02WVBDGrYZ@ghost>
> On 10 Jan 2025, at 2:44 AM, Charlie Jenkins <charlie@rivosinc.com> wrote:
>
> On Thu, Jan 09, 2025 at 05:49:39PM -0300, Arnaldo Carvalho de Melo wrote:
>> On Thu, Jan 09, 2025 at 11:48:36AM -0800, Charlie Jenkins wrote:
>>> On Thu, Jan 09, 2025 at 12:59:43PM -0300, Arnaldo Carvalho de Melo wrote:
>>>> ⬢ [acme@toolbox perf-tools-next]$ git log --oneline -1 ; time make -C tools/perf build-test
>>>> d06826160a982494 (HEAD -> perf-tools-next) perf tools: Remove dependency on libaudit
>>>> make: Entering directory '/home/acme/git/perf-tools-next/tools/perf'
>>>> - tarpkg: ./tests/perf-targz-src-pkg .
>>>> make_static: cd . && make LDFLAGS=-static NO_PERF_READ_VDSO32=1 NO_PERF_READ_VDSOX32=1 NO_JVMTI=1 NO_LIBTRACEEVENT=1 NO_LIBELF=1 -j28 DESTDIR=/tmp/tmp.JJT3tvN7bV
>>>> make_with_gtk2: cd . && make GTK2=1 -j28 DESTDIR=/tmp/tmp.BF53V2qpl3
>>>> - /home/acme/git/perf-tools-next/tools/perf/BUILD_TEST_FEATURE_DUMP: cd . && make FEATURE_DUMP_COPY=/home/acme/git/perf-tools-next/tools/perf/BUILD_TEST_FEATURE_DUMP feature-dump
>>>> cd . && make FEATURE_DUMP_COPY=/home/acme/git/perf-tools-next/tools/perf/BUILD_TEST_FEATURE_DUMP feature-dump
>>>> make_no_libbionic_O: cd . && make NO_LIBBIONIC=1 FEATURES_DUMP=/home/acme/git/perf-tools-next/tools/perf/BUILD_TEST_FEATURE_DUMP -j28 O=/tmp/tmp.KZuQ0q2Vs6 DESTDIR=/tmp/tmp.0sxMyH91gS
>>>> make_util_map_o_O: cd . && make util/map.o FEATURES_DUMP=/home/acme/git/perf-tools-next/tools/perf/BUILD_TEST_FEATURE_DUMP -j28 O=/tmp/tmp.Y0Mx3KLREI DESTDIR=/tmp/tmp.wg9HCVVLHE
>>>> make_install_O: cd . && make install FEATURES_DUMP=/home/acme/git/perf-tools-next/tools/perf/BUILD_TEST_FEATURE_DUMP -j28 O=/tmp/tmp.P0LEBAkW1X DESTDIR=/tmp/tmp.agTavZndFN
>>>> failed to find: etc/bash_completion.d/perf
>>>
>>> Is this something introduced by this patch?
>>
>> I don't think so.
>>
>> BTW this series is already pushed out to perf-tools-next:
>>
>> https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git/log/?h=perf-tools-next
>>
>> Thanks!
>>
>> - Arnaldo
>
> Thank you!
>
> - Charlie
Hi Charlie, Arnaldo
While testing the series, I hit compilation issue in powerpc
Snippet of logs:
CC util/syscalltbl.o
In file included from /home/athira/perf-tools-next/tools/perf/arch/powerpc/include/syscall_table.h:5,
from util/syscalltbl.c:16:
arch/powerpc/include/generated/asm/syscalls_64.h:16:16: error: initialized field overwritten [-Werror=override-init]
16 | [13] = "time",
| ^~~~~~
arch/powerpc/include/generated/asm/syscalls_64.h:16:16: note: (near initialization for ‘syscalltbl[13]’)
arch/powerpc/include/generated/asm/syscalls_64.h:22:16: error: initialized field overwritten [-Werror=override-init]
22 | [18] = "oldstat",
| ^~~~~~~~~
arch/powerpc/include/generated/asm/syscalls_64.h:22:16: note: (near initialization for ‘syscalltbl[18]’)
arch/powerpc/include/generated/asm/syscalls_64.h:27:16: error: initialized field overwritten [-Werror=override-init]
27 | [22] = "umount",
| ^~~~~~~~
And similar errors is there for few more entries. The reason is that, the generated syscalls file has two entries for each of these failing cases.
From arch/powerpc/include/generated/asm/syscalls_64.h created by scrips/syscalltbl.sh
1 static const char *const syscalltbl[] = {
2 [0] = "restart_syscall",
3 [1] = "exit",
4 [2] = "fork",
5 [3] = "read",
6 [4] = "write",
7 [5] = "open",
8 [6] = "close",
9 [7] = "waitpid",
10 [8] = "creat",
11 [9] = "link",
12 [10] = "unlink",
13 [11] = "execve",
14 [12] = "chdir",
15 [13] = "time”,
16 [13] = "time”,
17 [14] = "mknod",
18 [15] = "chmod",
19 [16] = "lchown",
20 [17] = "break",
21 [18] = "oldstat",
22 [18] = "oldstat”,
Line number 15 an 16 shows two entries for time. Similarly last two lines for oldstat. This is picked form https://github.com/torvalds/linux/blob/master/tools/perf/arch/powerpc/entry/syscalls/syscall.tbl
13 32 time sys_time32
13 64 time sys_time
18 32 oldstat sys_stat sys_ni_syscall
18 64 oldstat sys_ni_syscall
For same nr, two entries are there. In the arch specific version of the script that makes the syscall table, this was handled : https://github.com/torvalds/linux/blob/master/tools/perf/arch/powerpc/entry/syscalls/mksyscalltbl#L28
So we will need change in generic script also. Proposing below change :
diff --git a/tools/perf/scripts/syscalltbl.sh b/tools/perf/scripts/syscalltbl.sh
index 1ce0d5aa8b50..d66cec10cc2d 100755
--- a/tools/perf/scripts/syscalltbl.sh
+++ b/tools/perf/scripts/syscalltbl.sh
@@ -75,8 +75,10 @@ max_nr=0
# the params are: nr abi name entry compat
# use _ for intentionally unused variables according to SC2034
while read nr _ name _ _; do
- emit "$nr" "$name" >> $outfile
- max_nr=$nr
+ if [ "$max_nr" -lt "$nr" ]; then
+ emit "$nr" "$name" >> $outfile
+ max_nr=$nr
+ fi
done < $sorted_table
rm -f $sorted_table
Arnaldo,
I see we have this patch series in perf-tools-next. If we need above change as a separate patch, please let me know.
Thanks
Athira
>
>
next prev parent reply other threads:[~2025-01-10 7:05 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-09 2:36 [PATCH v6 00/16] perf tools: Use generic syscall scripts for all archs Charlie Jenkins
2025-01-09 2:36 ` [PATCH v6 01/16] perf tools: Create generic syscall table support Charlie Jenkins
2025-01-09 2:36 ` [PATCH v6 02/16] perf tools: arc: Support generic syscall headers Charlie Jenkins
2025-01-09 2:36 ` [PATCH v6 03/16] perf tools: csky: " Charlie Jenkins
2025-01-09 3:22 ` Guo Ren
2025-01-09 2:36 ` [PATCH v6 04/16] perf tools: arm: Support " Charlie Jenkins
2025-01-09 2:36 ` [PATCH v6 05/16] perf tools: sh: " Charlie Jenkins
2025-01-09 2:36 ` [PATCH v6 06/16] perf tools: sparc: " Charlie Jenkins
2025-01-09 2:36 ` [PATCH v6 07/16] perf tools: xtensa: Support syscall header Charlie Jenkins
2025-01-09 2:36 ` [PATCH v6 08/16] perf tools: x86: Use generic syscall scripts Charlie Jenkins
2025-01-09 2:36 ` [PATCH v6 09/16] perf tools: alpha: Support syscall header Charlie Jenkins
2025-01-09 2:36 ` [PATCH v6 10/16] perf tools: parisc: " Charlie Jenkins
2025-01-09 2:36 ` [PATCH v6 11/16] perf tools: arm64: Use syscall table Charlie Jenkins
2025-01-09 2:36 ` [PATCH v6 12/16] perf tools: loongarch: " Charlie Jenkins
2025-01-09 2:36 ` [PATCH v6 13/16] perf tools: mips: Use generic syscall scripts Charlie Jenkins
2025-01-09 2:36 ` [PATCH v6 14/16] perf tools: powerpc: Use generic syscall table scripts Charlie Jenkins
2025-01-09 2:36 ` [PATCH v6 15/16] perf tools: s390: " Charlie Jenkins
2025-01-09 2:36 ` [PATCH v6 16/16] perf tools: Remove dependency on libaudit Charlie Jenkins
2025-01-09 15:59 ` [PATCH v6 00/16] perf tools: Use generic syscall scripts for all archs Arnaldo Carvalho de Melo
2025-01-09 19:48 ` Charlie Jenkins
2025-01-09 20:49 ` Arnaldo Carvalho de Melo
2025-01-09 21:14 ` Charlie Jenkins
2025-01-10 7:04 ` Athira Rajeev [this message]
2025-01-10 14:43 ` Arnaldo Carvalho de Melo
2025-01-11 14:03 ` Athira Rajeev
2025-01-09 21:51 ` Arnaldo Carvalho de Melo
2025-01-09 23:00 ` Charlie Jenkins
2025-01-10 19:31 ` Charlie Jenkins
2025-01-13 14:55 ` Arnaldo Carvalho de Melo
2025-01-14 17:58 ` Arnaldo Carvalho de Melo
2025-01-14 19:27 ` Charlie Jenkins
2025-01-14 22:00 ` Charlie Jenkins
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=8639C367-2669-4924-83D8-15EAFAC42699@linux.vnet.ibm.com \
--to=atrajeev@linux.vnet.ibm.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=arnd@arndb.de \
--cc=bpf@vger.kernel.org \
--cc=brauner@kernel.org \
--cc=charlie@rivosinc.com \
--cc=corbet@lwn.net \
--cc=gnoack@google.com \
--cc=guoren@kernel.org \
--cc=hbathini@linux.ibm.com \
--cc=irogers@google.com \
--cc=james.clark@linaro.org \
--cc=john.g.garry@oracle.com \
--cc=jolsa@kernel.org \
--cc=leo.yan@linux.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-csky@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-security-module@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mic@digikod.net \
--cc=mike.leach@linaro.org \
--cc=namhyung@kernel.org \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=peterz@infradead.org \
--cc=will@kernel.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