Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp4280873rwd; Tue, 30 May 2023 03:11:39 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ40dJFDdT6p+Q7vWjJtKJ+2cPA+4VjP9t4u7oS/IgnImSBl7++85lF5yY22vzhw9OInTNdX X-Received: by 2002:a05:6a20:840c:b0:10f:f672:6e88 with SMTP id c12-20020a056a20840c00b0010ff6726e88mr2441645pzd.4.1685441499075; Tue, 30 May 2023 03:11:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685441499; cv=none; d=google.com; s=arc-20160816; b=xSVETJJM/gnkjJ78VRBQValhwwzOuQMndCgdft0p7AyumKplmiSdcGa1XrNOmWBM2J VtilQUomI/kYJpZ4if02D4nNiztjlArUqX37S3/BHVbN8Yop3vEd8+YyFOuwuekA3OsB vBZItv+xpHFtmTaDijspd5locKPWS39KDzcvxQzVzULaui8BJeN37ORVLvhyQaucM9O2 r3UvP3IVMAGubxHvDUwux07W2CH9m2/DJiH3kKDYGlHs0+/X9JNIAq2RTa3kknh03U6h nNvbbbobISWaP5ab7Gmue5J6Kxwlq7r7hUXQIgD1W87rnYkdeX2PocrpJCGZfxTVMOed JsAg== 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=GQSZK0dxm9oXJ8BBB+Np/iCCgnmIvGHu/PEoNCtAREU=; b=tSvT/vrHs8USnd7BMt2TJSeR19+t0NP5yYscGRVOXRnS6+HBrZObN2FQMjbZnLlb+B gMrqyY3v7oH7nONlTnuGu+KdYSKDDr661KthX9K612i+Hkt2dFCNuBaeJ+0bkHplaoaX AGLsio3IJQoch3+RD6W8Cj4xT37hVJ0pJpnfV0K94BXp02zBOWtSn6Leyfe+RWUa3zSJ erC9pWw5TA/jgKogKvVb8Ek8R6ZhJOgQlOz7UFbIZ3IGyhNmglO9fkIGLfqV/KlZ7bQW btwpjZaw9VFzJzNjWG617b9h9Jg6vd8znGu5e36pwIZ1U786DWVPhP3iiBYN8Jbsqfki 6KiQ== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d188-20020a6336c5000000b0053a3b0f8aa3si8959335pga.445.2023.05.30.03.11.24; Tue, 30 May 2023 03:11:39 -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 S231254AbjE3Jv0 (ORCPT + 99 others); Tue, 30 May 2023 05:51:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231177AbjE3JvO (ORCPT ); Tue, 30 May 2023 05:51:14 -0400 Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D01E493; Tue, 30 May 2023 02:51:10 -0700 (PDT) Received: from loongson.cn (unknown [113.200.148.30]) by gateway (Coremail) with SMTP id _____8Bx7OoNx3VkX4QCAA--.1286S3; Tue, 30 May 2023 17:51:09 +0800 (CST) Received: from linux.localdomain (unknown [113.200.148.30]) by localhost.localdomain (Coremail) with SMTP id AQAAf8BxWdIJx3VkkmSAAA--.12317S5; Tue, 30 May 2023 17:51:09 +0800 (CST) From: Tiezhu Yang To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Ian Rogers , Adrian Hunter Cc: Hans-Peter Nilsson , Alexander Kapshuk , Leo Yan , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, loongarch@lists.linux.dev, loongson-kernel@lists.loongnix.cn Subject: [PATCH v3 3/5] perf arm64: Handle __NR3264_ prefixed syscall number Date: Tue, 30 May 2023 17:51:03 +0800 Message-Id: <1685440265-7021-4-git-send-email-yangtiezhu@loongson.cn> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1685440265-7021-1-git-send-email-yangtiezhu@loongson.cn> References: <1685440265-7021-1-git-send-email-yangtiezhu@loongson.cn> X-CM-TRANSID: AQAAf8BxWdIJx3VkkmSAAA--.12317S5 X-CM-SenderInfo: p1dqw3xlh2x3gn0dqz5rrqw2lrqou0/ X-Coremail-Antispam: 1Uk129KBjvJXoW7trWxur1Dtw1xtw4ktF15CFg_yoW8JFW8pw s3C34UtFZ5GF10kw1xur4jqFZ5CF4kJF1UKryjyrW3Crn8J345tr1YqasYkFW7Xw1xK3y5 Zr1FqFy5XF18Xw7anT9S1TB71UUUUbJqnTZGkaVYY2UrUUUUj1kv1TuYvTs0mT0YCTnIWj qI5I8CrVACY4xI64kE6c02F40Ex7xfYxn0WfASr-VFAUDa7-sFnT9fnUUIcSsGvfJTRUUU bSkYFVCjjxCrM7AC8VAFwI0_Jr0_Gr1l1xkIjI8I6I8E6xAIw20EY4v20xvaj40_Wr0E3s 1l1IIY67AEw4v_Jrv_JF1l8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxSw2x7M28EF7xv wVC0I7IYx2IY67AKxVW7JVWDJwA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxVWxJVW8Jr1l84 ACjcxK6I8E87Iv67AKxVWxJr0_GcWl84ACjcxK6I8E87Iv6xkF7I0E14v26rxl6s0DM2kK e7AKxVWUtVW8ZwAS0I0E0xvYzxvE52x082IY62kv0487Mc804VCY07AIYIkI8VC2zVCFFI 0UMc02F40EFcxC0VAKzVAqx4xG6I80ewAv7VC0I7IYx2IY67AKxVWrXVW3AwAv7VC2z280 aVAFwI0_Cr0_Gr1UMcvjeVCFs4IE7xkEbVWUJVW8JwACjcxG0xvY0x0EwIxGrwCY1x0262 kKe7AKxVWUtVW8ZwCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwCFI7km 07C267AKxVWUtVW8ZwC20s026c02F40E14v26r1j6r18MI8I3I0E7480Y4vE14v26r106r 1rMI8E67AF67kF1VAFwI0_GFv_WrylIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVW7 JVWDJwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Cr0_Gr1UMIIF0xvE42xK8VAvwI8IcIk0rV WUJVWUCwCI42IY6I8E87Iv67AKxVWxJVW8Jr1lIxAIcVC2z280aVCY1x0267AKxVW8JVW8 JrUvcSsGvfC2KfnxnUUI43ZEXa7IUnbAw7UUUUU== 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: X-Mailing-List: linux-kernel@vger.kernel.org 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", Suggested-by: Alexander Kapshuk Signed-off-by: Tiezhu Yang Reviewed-by: Leo Yan --- tools/perf/arch/arm64/entry/syscalls/mksyscalltbl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/perf/arch/arm64/entry/syscalls/mksyscalltbl b/tools/perf/arch/arm64/entry/syscalls/mksyscalltbl index 84976dc..0bcd64a 100755 --- a/tools/perf/arch/arm64/entry/syscalls/mksyscalltbl +++ b/tools/perf/arch/arm64/entry/syscalls/mksyscalltbl @@ -40,6 +40,7 @@ create_table() } $gcc -E -dM -x c -I $incpath/include/uapi $input \ - |sed -ne 's/^#define __NR_//p' \ - |sort -t' ' -k2 -n \ + |awk '$2 ~ "__NR" && $3 !~ "__NR3264_" { + sub("^#define __NR(3264)?_", ""); + print | "sort -k2 -n"}' \ |create_table -- 2.1.0