Message ID | 1684837327-18203-2-git-send-email-yangtiezhu@loongson.cn |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2033298vqo; Tue, 23 May 2023 03:28:13 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ77va9H+2DiwNGXjAMgCCDx2bjVSM/oNVSYLnl4wU8l+3EKQGs8kDXNLc94oRHAVRsy1PbO X-Received: by 2002:a17:90a:7482:b0:253:5605:ddd9 with SMTP id p2-20020a17090a748200b002535605ddd9mr11295503pjk.35.1684837692857; Tue, 23 May 2023 03:28:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684837692; cv=none; d=google.com; s=arc-20160816; b=WFbCGMseje2RQI6uRdGRaWvh+DwQI3ZOBZuk7nbF5NPXXuQury9wV97obNswQ0PZ2A HDAhGWSdWMhTtYOGB3Wvz0bpZRCQbzsIu+YsdjeFGys1yhzGU6H1iAqtm4D06ChfyTkq Sc5i4yamSTz+te+8m37Qnbdt3OsvN43td0Zrsq3alZixHFTs8MVJmCE589SaTloVP5YP 2D6Q8MkcZyTGC+tdpsqNWJHtBSrkz8c72tvSHkCwgLTu2n4J8VPh4SvqDGXQMWYc4yi5 03v2ctOOqJYetEWzNTODsiQoEZKR+fYMzWVOWgXI//3zBhDfRoDnh46NeL7R/V+/oF82 5Lxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=YqBKdcQLaAS2ofDYxyDsKQ+mNH1qxU6m2VVNPf2AbGM=; b=aoiXo6xnROJoqm7+A0joyEn7WD/ZgmI9vRDiCAfidGceL4JMF32CNPZwj9TX8GZdZE XTKCneCUoOJIJsIvunFjPFwQmxb6GNJgOoIDB+dG1Pxh8wUGZjCt5rnkoV/HQveHbHsj T3TlCgXtThQjBc7N1JYFuNsJvr965K3K6IBDR/rXcDpB9LqxuRjvV3oOfjegOifb4Pql Ume22OOCiG8yhtVgApy0tmd4Do+VGJ/HaDXx+Ll9ljQ1Fe2sVATm8W+Y+sc/IF1WXBzv 9T7o7Vu+xFSMoVLtrH1KefV2UEibEFBz7b+OH5cD8LVh9849rL44RDm+U43kr3GbbzhY TFfA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cu15-20020a17090afa8f00b00233e301c780si8369025pjb.31.2023.05.23.03.27.58; Tue, 23 May 2023 03:28:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236530AbjEWKWW (ORCPT <rfc822;ahmedalshaiji.dev@gmail.com> + 99 others); Tue, 23 May 2023 06:22:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232621AbjEWKWU (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 23 May 2023 06:22:20 -0400 Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6E5B4FD; Tue, 23 May 2023 03:22:17 -0700 (PDT) Received: from loongson.cn (unknown [113.200.148.30]) by gateway (Coremail) with SMTP id _____8Bx2fHYk2xkoAgAAA--.124S3; Tue, 23 May 2023 18:22:16 +0800 (CST) Received: from linux.localdomain (unknown [113.200.148.30]) by localhost.localdomain (Coremail) with SMTP id AQAAf8BxkrDWk2xk3CNwAA--.57318S3; Tue, 23 May 2023 18:22:15 +0800 (CST) From: Tiezhu Yang <yangtiezhu@loongson.cn> To: Peter Zijlstra <peterz@infradead.org>, Ingo Molnar <mingo@redhat.com>, Arnaldo Carvalho de Melo <acme@kernel.org>, Mark Rutland <mark.rutland@arm.com>, Alexander Shishkin <alexander.shishkin@linux.intel.com>, Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>, Ian Rogers <irogers@google.com>, Adrian Hunter <adrian.hunter@intel.com> Cc: Hans-Peter Nilsson <hp@axis.com>, Leo Yan <leo.yan@linaro.org>, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, loongarch@lists.linux.dev, loongson-kernel@lists.loongnix.cn Subject: [PATCH 1/2] perf arm64: Handle __NR3264_ prefixed syscall number Date: Tue, 23 May 2023 18:22:06 +0800 Message-Id: <1684837327-18203-2-git-send-email-yangtiezhu@loongson.cn> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1684837327-18203-1-git-send-email-yangtiezhu@loongson.cn> References: <1684837327-18203-1-git-send-email-yangtiezhu@loongson.cn> X-CM-TRANSID: AQAAf8BxkrDWk2xk3CNwAA--.57318S3 X-CM-SenderInfo: p1dqw3xlh2x3gn0dqz5rrqw2lrqou0/ X-Coremail-Antispam: 1Uk129KBjvJXoW7trWxur1DKr43Xr1kCr1UGFg_yoW8JF4kpr s5C34DtayrWF1Iyw1xursIqFZ3Ca1kJF1Ygry0yrZakrnxJ3WrKryFq3Z0kFWxX34xK3yj vFyrtFy5XF48XrJanT9S1TB71UUUUbJqnTZGkaVYY2UrUUUUj1kv1TuYvTs0mT0YCTnIWj qI5I8CrVACY4xI64kE6c02F40Ex7xfYxn0WfASr-VFAUDa7-sFnT9fnUUIcSsGvfJTRUUU bSxYFVCjjxCrM7AC8VAFwI0_Jr0_Gr1l1xkIjI8I6I8E6xAIw20EY4v20xvaj40_Wr0E3s 1l1IIY67AEw4v_Jrv_JF1l8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxSw2x7M28EF7xv wVC0I7IYx2IY67AKxVW5JVW7JwA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxVW8JVWxJwA2z4 x0Y4vEx4A2jsIE14v26r4UJVWxJr1l84ACjcxK6I8E87Iv6xkF7I0E14v26r4UJVWxJr1l n4kS14v26r1q6r43M2AIxVAIcxkEcVAq07x20xvEncxIr21l57IF6xkI12xvs2x26I8E6x ACxx1l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r1q6rW5McIj6I8E 87Iv67AKxVW8JVWxJwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41lc7CjxV Aaw2AFwI0_Jw0_GFyl42xK82IYc2Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1l4IxY O2xFxVAFwI0_Jw0_GFylx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8GjcxK67AKxVWUGV WUWwC2zVAF1VAY17CE14v26r1q6r43MIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_ Xr0_Ar1lIxAIcVC0I7IYx2IY6xkF7I0E14v26r4j6F4UMIIF0xvE42xK8VAvwI8IcIk0rV WUJVWUCwCI42IY6I8E87Iv67AKxVW8JVWxJwCI42IY6I8E87Iv6xkF7I0E14v26r4j6r4U JbIYCTnIWIevJa73UjIFyTuYvjxUstxhDUUUU X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766680368584919714?= X-GMAIL-MSGID: =?utf-8?q?1766680368584919714?= |
Series |
perf tools: Modify mksyscalltbl
|
|
Commit Message
Tiezhu Yang
May 23, 2023, 10:22 a.m. UTC
After commit 9854e7ad35fe ("perf arm64: Simplify mksyscalltbl"),
in the generated syscall table file syscalls.c, there exist some
__NR3264_ prefixed syscall numbers such as [__NR3264_ftruncate],
it looks like not so good, just do some small filter operations
to handle __NR3264_ prefixed syscall number as a digital number.
Without this patch:
[__NR3264_ftruncate] = "ftruncate",
With this patch:
[46] = "ftruncate",
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
---
tools/perf/arch/arm64/entry/syscalls/mksyscalltbl | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
Comments
On Tue, May 23, 2023 at 1:22 PM Tiezhu Yang <yangtiezhu@loongson.cn> wrote: > > After commit 9854e7ad35fe ("perf arm64: Simplify mksyscalltbl"), > in the generated syscall table file syscalls.c, there exist some > __NR3264_ prefixed syscall numbers such as [__NR3264_ftruncate], > it looks like not so good, just do some small filter operations > to handle __NR3264_ prefixed syscall number as a digital number. > > Without this patch: > > [__NR3264_ftruncate] = "ftruncate", > > With this patch: > > [46] = "ftruncate", > > Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn> > --- > tools/perf/arch/arm64/entry/syscalls/mksyscalltbl | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/tools/perf/arch/arm64/entry/syscalls/mksyscalltbl b/tools/perf/arch/arm64/entry/syscalls/mksyscalltbl > index 22cdf91..59ab7939 100755 > --- a/tools/perf/arch/arm64/entry/syscalls/mksyscalltbl > +++ b/tools/perf/arch/arm64/entry/syscalls/mksyscalltbl > @@ -39,7 +39,8 @@ create_table() > echo "};" > } > > -$gcc -E -dM -x c -I $incpath/include/uapi $input \ > - |sed -ne 's/^#define __NR_//p' \ > - |sort -t' ' -k2 -n \ > +$gcc -E -dM -x c -I $incpath/include/uapi $input \ > + |awk '{if ($2~"__NR" && $3 !~"__NR3264_") {print}}' \ > + |sed -ne 's/^#define __NR_//p;s/^#define __NR3264_//p' \ > + |sort -t' ' -k2 -n \ > |create_table > -- > 2.1.0 > As an aside, the awk + sed + sort parts of the command line may be reduced to the following awk script, if desired: awk '$2 ~ "__NR" && $3 !~ "__NR3264_" { sub("^#define __NR_", "") sub("^#define __NR3264_", "") print | "sort -k2 -n" }'
On 05/23/2023 08:31 PM, Alexander Kapshuk wrote: > On Tue, May 23, 2023 at 1:22 PM Tiezhu Yang <yangtiezhu@loongson.cn> wrote: >> >> After commit 9854e7ad35fe ("perf arm64: Simplify mksyscalltbl"), >> in the generated syscall table file syscalls.c, there exist some >> __NR3264_ prefixed syscall numbers such as [__NR3264_ftruncate], >> it looks like not so good, just do some small filter operations >> to handle __NR3264_ prefixed syscall number as a digital number. >> >> Without this patch: >> >> [__NR3264_ftruncate] = "ftruncate", >> >> With this patch: >> >> [46] = "ftruncate", >> >> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn> >> --- >> tools/perf/arch/arm64/entry/syscalls/mksyscalltbl | 7 ++++--- >> 1 file changed, 4 insertions(+), 3 deletions(-) >> >> diff --git a/tools/perf/arch/arm64/entry/syscalls/mksyscalltbl b/tools/perf/arch/arm64/entry/syscalls/mksyscalltbl >> index 22cdf91..59ab7939 100755 >> --- a/tools/perf/arch/arm64/entry/syscalls/mksyscalltbl >> +++ b/tools/perf/arch/arm64/entry/syscalls/mksyscalltbl >> @@ -39,7 +39,8 @@ create_table() >> echo "};" >> } >> >> -$gcc -E -dM -x c -I $incpath/include/uapi $input \ >> - |sed -ne 's/^#define __NR_//p' \ >> - |sort -t' ' -k2 -n \ >> +$gcc -E -dM -x c -I $incpath/include/uapi $input \ >> + |awk '{if ($2~"__NR" && $3 !~"__NR3264_") {print}}' \ >> + |sed -ne 's/^#define __NR_//p;s/^#define __NR3264_//p' \ >> + |sort -t' ' -k2 -n \ >> |create_table >> -- >> 2.1.0 >> > > As an aside, the awk + sed + sort parts of the command line may be > reduced to the following awk script, if desired: > awk '$2 ~ "__NR" && $3 !~ "__NR3264_" { > sub("^#define __NR_", "") > sub("^#define __NR3264_", "") > print | "sort -k2 -n" > }' > Hi Alexander, Thanks, it seems more simple and works well as expected. Let us wait for more review comments before respin. If no any objections, I will send v2 with the following changes based on the current patch in the next week. -$gcc -E -dM -x c -I $incpath/include/uapi $input \ - |awk '{if ($2~"__NR" && $3 !~"__NR3264_") {print}}' \ - |sed -ne 's/^#define __NR_//p;s/^#define __NR3264_//p' \ - |sort -t' ' -k2 -n \ +$gcc -E -dM -x c -I $incpath/include/uapi $input \ + |awk '$2 ~ "__NR" && $3 !~ "__NR3264_" { + sub("^#define __NR_", "") + sub("^#define __NR3264_", "") + print | "sort -k2 -n"}' \ |create_table Thanks, Tiezhu
On Wed, May 24, 2023 at 6:19 AM Tiezhu Yang <yangtiezhu@loongson.cn> wrote: > > > > On 05/23/2023 08:31 PM, Alexander Kapshuk wrote: > > On Tue, May 23, 2023 at 1:22 PM Tiezhu Yang <yangtiezhu@loongson.cn> wrote: > >> > >> After commit 9854e7ad35fe ("perf arm64: Simplify mksyscalltbl"), > >> in the generated syscall table file syscalls.c, there exist some > >> __NR3264_ prefixed syscall numbers such as [__NR3264_ftruncate], > >> it looks like not so good, just do some small filter operations > >> to handle __NR3264_ prefixed syscall number as a digital number. > >> > >> Without this patch: > >> > >> [__NR3264_ftruncate] = "ftruncate", > >> > >> With this patch: > >> > >> [46] = "ftruncate", > >> > >> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn> > >> --- > >> tools/perf/arch/arm64/entry/syscalls/mksyscalltbl | 7 ++++--- > >> 1 file changed, 4 insertions(+), 3 deletions(-) > >> > >> diff --git a/tools/perf/arch/arm64/entry/syscalls/mksyscalltbl b/tools/perf/arch/arm64/entry/syscalls/mksyscalltbl > >> index 22cdf91..59ab7939 100755 > >> --- a/tools/perf/arch/arm64/entry/syscalls/mksyscalltbl > >> +++ b/tools/perf/arch/arm64/entry/syscalls/mksyscalltbl > >> @@ -39,7 +39,8 @@ create_table() > >> echo "};" > >> } > >> > >> -$gcc -E -dM -x c -I $incpath/include/uapi $input \ > >> - |sed -ne 's/^#define __NR_//p' \ > >> - |sort -t' ' -k2 -n \ > >> +$gcc -E -dM -x c -I $incpath/include/uapi $input \ > >> + |awk '{if ($2~"__NR" && $3 !~"__NR3264_") {print}}' \ > >> + |sed -ne 's/^#define __NR_//p;s/^#define __NR3264_//p' \ > >> + |sort -t' ' -k2 -n \ > >> |create_table > >> -- > >> 2.1.0 > >> > > > > As an aside, the awk + sed + sort parts of the command line may be > > reduced to the following awk script, if desired: > > awk '$2 ~ "__NR" && $3 !~ "__NR3264_" { > > sub("^#define __NR_", "") > > sub("^#define __NR3264_", "") > > print | "sort -k2 -n" > > }' > > > > Hi Alexander, > > Thanks, it seems more simple and works well as expected. > Let us wait for more review comments before respin. > > If no any objections, I will send v2 with the following > changes based on the current patch in the next week. > > -$gcc -E -dM -x c -I $incpath/include/uapi $input \ > - |awk '{if ($2~"__NR" && $3 !~"__NR3264_") {print}}' \ > - |sed -ne 's/^#define __NR_//p;s/^#define __NR3264_//p' \ > - |sort -t' ' -k2 -n \ > +$gcc -E -dM -x c -I $incpath/include/uapi $input \ > + |awk '$2 ~ "__NR" && $3 !~ "__NR3264_" { > + sub("^#define __NR_", "") > + sub("^#define __NR3264_", "") > + print | "sort -k2 -n"}' \ > |create_table > > Thanks, > Tiezhu > Hi Tiezhu, Thanks for your prompt feedback. It was merely a suggestion entirely subject to your discretion. If no other patterns are anticipated to be processed by the sub 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" }'
On 05/24/2023 02:43 PM, Alexander Kapshuk wrote: > On Wed, May 24, 2023 at 6:19 AM Tiezhu Yang <yangtiezhu@loongson.cn> wrote: >> >> >> >> On 05/23/2023 08:31 PM, Alexander Kapshuk wrote: >>> On Tue, May 23, 2023 at 1:22 PM Tiezhu Yang <yangtiezhu@loongson.cn> wrote: >>>> >>>> After commit 9854e7ad35fe ("perf arm64: Simplify mksyscalltbl"), >>>> in the generated syscall table file syscalls.c, there exist some >>>> __NR3264_ prefixed syscall numbers such as [__NR3264_ftruncate], >>>> it looks like not so good, just do some small filter operations >>>> to handle __NR3264_ prefixed syscall number as a digital number. >>>> >>>> Without this patch: >>>> >>>> [__NR3264_ftruncate] = "ftruncate", >>>> >>>> With this patch: >>>> >>>> [46] = "ftruncate", >>>> >>>> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn> >>>> --- >>>> tools/perf/arch/arm64/entry/syscalls/mksyscalltbl | 7 ++++--- >>>> 1 file changed, 4 insertions(+), 3 deletions(-) >>>> >>>> diff --git a/tools/perf/arch/arm64/entry/syscalls/mksyscalltbl b/tools/perf/arch/arm64/entry/syscalls/mksyscalltbl >>>> index 22cdf91..59ab7939 100755 >>>> --- a/tools/perf/arch/arm64/entry/syscalls/mksyscalltbl >>>> +++ b/tools/perf/arch/arm64/entry/syscalls/mksyscalltbl >>>> @@ -39,7 +39,8 @@ create_table() >>>> echo "};" >>>> } >>>> >>>> -$gcc -E -dM -x c -I $incpath/include/uapi $input \ >>>> - |sed -ne 's/^#define __NR_//p' \ >>>> - |sort -t' ' -k2 -n \ >>>> +$gcc -E -dM -x c -I $incpath/include/uapi $input \ >>>> + |awk '{if ($2~"__NR" && $3 !~"__NR3264_") {print}}' \ >>>> + |sed -ne 's/^#define __NR_//p;s/^#define __NR3264_//p' \ >>>> + |sort -t' ' -k2 -n \ >>>> |create_table >>>> -- >>>> 2.1.0 >>>> >>> >>> As an aside, the awk + sed + sort parts of the command line may be >>> reduced to the following awk script, if desired: >>> awk '$2 ~ "__NR" && $3 !~ "__NR3264_" { >>> sub("^#define __NR_", "") >>> sub("^#define __NR3264_", "") >>> print | "sort -k2 -n" >>> }' >>> >> >> Hi Alexander, >> >> Thanks, it seems more simple and works well as expected. >> Let us wait for more review comments before respin. >> >> If no any objections, I will send v2 with the following >> changes based on the current patch in the next week. >> >> -$gcc -E -dM -x c -I $incpath/include/uapi $input \ >> - |awk '{if ($2~"__NR" && $3 !~"__NR3264_") {print}}' \ >> - |sed -ne 's/^#define __NR_//p;s/^#define __NR3264_//p' \ >> - |sort -t' ' -k2 -n \ >> +$gcc -E -dM -x c -I $incpath/include/uapi $input \ >> + |awk '$2 ~ "__NR" && $3 !~ "__NR3264_" { >> + sub("^#define __NR_", "") >> + sub("^#define __NR3264_", "") >> + print | "sort -k2 -n"}' \ >> |create_table >> >> Thanks, >> Tiezhu >> > > Hi Tiezhu, > > Thanks for your prompt feedback. > It was merely a suggestion entirely subject to your discretion. > > If no other patterns are anticipated to be processed by the sub 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 again, I tested the above code, it also works well and looks better, I will modify the code as you suggested in v2. Thanks, Tiezhu
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@linaro.org>
diff --git a/tools/perf/arch/arm64/entry/syscalls/mksyscalltbl b/tools/perf/arch/arm64/entry/syscalls/mksyscalltbl index 22cdf91..59ab7939 100755 --- a/tools/perf/arch/arm64/entry/syscalls/mksyscalltbl +++ b/tools/perf/arch/arm64/entry/syscalls/mksyscalltbl @@ -39,7 +39,8 @@ create_table() echo "};" } -$gcc -E -dM -x c -I $incpath/include/uapi $input \ - |sed -ne 's/^#define __NR_//p' \ - |sort -t' ' -k2 -n \ +$gcc -E -dM -x c -I $incpath/include/uapi $input \ + |awk '{if ($2~"__NR" && $3 !~"__NR3264_") {print}}' \ + |sed -ne 's/^#define __NR_//p;s/^#define __NR3264_//p' \ + |sort -t' ' -k2 -n \ |create_table