Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2585543rwd; Sun, 28 May 2023 19:40:24 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4lPiJDaKI8RqlXO2KZyerh6OxCOynOybYsJ5EIesubEz+GK3XWl6b1OtIQ4/6+kLk98Qci X-Received: by 2002:a05:6a00:2d83:b0:641:39cb:1716 with SMTP id fb3-20020a056a002d8300b0064139cb1716mr13414038pfb.20.1685328024285; Sun, 28 May 2023 19:40:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685328024; cv=none; d=google.com; s=arc-20160816; b=oG/QLGR/GvrosZZTBFYJIUjjbnjIOBdsivE9P6NbdwRCaPe3tPKwYa0Y2QWpfla5RU iOIvBJ8sZr2ILmyjH+rXqZ8yjWeRqHzNKWgF4J4t/gKbufNMAiXq+ktOXKt1dxaqW/hg fEFW4LCqdbGDheDEiyWlHq7+RNabYAKLVxXuH992pd508S8BdeDJHgAYPPfqlNEM4dzC Lh09Q/bDk7u0frXdlYb/kHKvcP7eYYNxqMQJIgCF5Q2s5zZgcf1dnGIob7hPfT9yRqYE xpHaRFGJY7KAClBHAVKiEK0WLxlLINhZB+KmOj5gQr2KUabj3tM54Jya/Aoxmwq9DOzd bktQ== 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=244/ZlYCiJhxgU7zyXXll0sTp+yruwt8e6f4yDAMMjI=; b=jIjAjIbcn+GCpR4q4K4uxX+uTACIMYBtCshfk520KiFPpRsl8rQg2PX6HNkkVPKSYl S7F7bjTxdPQwLIm5HNHclwrKZ4mkizL3ZnqRlyvMYFQalfvqHSqPDw7AdVwImqmlySK4 +zheAJ3jKyibDxU8GA9IbiNLBSb/h1IrMFP/kwP8T0X03O5STd37YPfzkP44auemMvev W52uLGkrrgO8g6CfAy5mYiAqtVhtbvcsYELt6JZ+t23XWT1hJZsWmFCoGaGlgPZ0UzUv kcMc1rrWDuPVhGPOa37q9ZXz+3cY6Qxz6lsxeQYGd0qXxe6KA9nZwUlstgBSAblf//h0 BEWA== 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 h28-20020aa79f5c000000b0064cecf7b981si8930891pfr.311.2023.05.28.19.40.12; Sun, 28 May 2023 19:40:24 -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 S230318AbjE2CXf (ORCPT + 99 others); Sun, 28 May 2023 22:23:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50738 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230210AbjE2CXb (ORCPT ); Sun, 28 May 2023 22:23:31 -0400 Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A6EFCA9; Sun, 28 May 2023 19:23:28 -0700 (PDT) Received: from loongson.cn (unknown [113.200.148.30]) by gateway (Coremail) with SMTP id _____8AxiPGXDHRkVRkCAA--.5076S3; Mon, 29 May 2023 10:23:19 +0800 (CST) Received: from linux.localdomain (unknown [113.200.148.30]) by localhost.localdomain (Coremail) with SMTP id AQAAf8BxRrWSDHRkNzh+AA--.9081S4; Mon, 29 May 2023 10:23:18 +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 v2 2/3] perf arm64: Handle __NR3264_ prefixed syscall number Date: Mon, 29 May 2023 10:23:13 +0800 Message-Id: <1685326994-11987-3-git-send-email-yangtiezhu@loongson.cn> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1685326994-11987-1-git-send-email-yangtiezhu@loongson.cn> References: <1685326994-11987-1-git-send-email-yangtiezhu@loongson.cn> X-CM-TRANSID: AQAAf8BxRrWSDHRkNzh+AA--.9081S4 X-CM-SenderInfo: p1dqw3xlh2x3gn0dqz5rrqw2lrqou0/ X-Coremail-Antispam: 1Uk129KBjvJXoW7trWxur1Dtw1xtw4ktF15CFg_yoW8JFW8pw s3C34UtayrGFy0kw1xur4jqFWrCF4kJ3W5KryjyrW3Crn8Jw15tr1YqasYkFW7Xw1xK3y5 Zr10qFy5XF18Xw7anT9S1TB71UUUUbJqnTZGkaVYY2UrUUUUj1kv1TuYvTs0mT0YCTnIWj qI5I8CrVACY4xI64kE6c02F40Ex7xfYxn0WfASr-VFAUDa7-sFnT9fnUUIcSsGvfJTRUUU bSkYFVCjjxCrM7AC8VAFwI0_Jr0_Gr1l1xkIjI8I6I8E6xAIw20EY4v20xvaj40_Wr0E3s 1l1IIY67AEw4v_Jrv_JF1l8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxSw2x7M28EF7xv wVC0I7IYx2IY67AKxVW7JVWDJwA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxVWxJVW8Jr1l84 ACjcxK6I8E87Iv67AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVCY1x0267AKxVW8Jr0_Cr1U M2kKe7AKxVWUtVW8ZwAS0I0E0xvYzxvE52x082IY62kv0487Mc804VCY07AIYIkI8VC2zV CFFI0UMc02F40EFcxC0VAKzVAqx4xG6I80ewAv7VC0I7IYx2IY67AKxVWrXVW3AwAv7VC2 z280aVAFwI0_Gr0_Cr1lOx8S6xCaFVCjc4AY6r1j6r4UM4x0Y48IcxkI7VAKI48JMxkF7I 0En4kS14v26r1q6r43MxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r4UMxCI bckI1I0E14v26r1q6r43MI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_Jr I_JrWlx4CE17CEb7AF67AKxVW8ZVWrXwCIc40Y0x0EwIxGrwCI42IY6xIIjxv20xvE14v2 6ryj6F1UMIIF0xvE2Ix0cI8IcVCY1x0267AKxVW8JVWxJwCI42IY6xAIw20EY4v20xvaj4 0_Jr0_JF4lIxAIcVC2z280aVAFwI0_Gr0_Cr1lIxAIcVC2z280aVCY1x0267AKxVW8JVW8 JrUvcSsGvfC2KfnxnUUI43ZEXa7IUnLID5UUUUU== 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 e530587..1628731 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