From patchwork Thu Oct 17 00:25:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Rogers X-Patchwork-Id: 13839317 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8A302D2F7E0 for ; Thu, 17 Oct 2024 02:16:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:To:From:Subject :References:Mime-Version:Message-Id:In-Reply-To:Date:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=KNbBqi1saNqYXEAAo8guTprpDL0iavWB2aVE9Nn4lPM=; b=IOcIVwUJ6AeizIFkZnYOINV1Se w33DW1z5oZOdwm7B/3vxC7RBMAqw8/e5xKyfTs2SxR21Q5/VG/rPYaj71mqnpjVF45hIR4wmV25TY hWB3caa9bP0jiLAiMskNBhGsAud1JzNI1IDg5W0LtORx+n296t5tLPXQ8IS3QN2Ad1jlrrdb9xNoT KuQVJHJ7H5EiR0GFVhBc/sBFs0BF86xJnJPOVkadrc03CfgOCa5Qwzptji+xYiAwBwM6bIvEfhvAV dY3YiBi891JddNCOGLZrZmUlBgPGYG+gTS/oEnCUTinHAM21KmFK0Il/RFWpwZn9ewU5J8qSpYTfo cPCd+Qlw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t1G3V-0000000DWxg-0Ccl; Thu, 17 Oct 2024 02:16:01 +0000 Received: from mail-yb1-xb4a.google.com ([2607:f8b0:4864:20::b4a]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t1ELI-0000000DKSb-2vUy for linux-arm-kernel@lists.infradead.org; Thu, 17 Oct 2024 00:26:19 +0000 Received: by mail-yb1-xb4a.google.com with SMTP id 3f1490d57ef6-e290947f6f8so692231276.2 for ; Wed, 16 Oct 2024 17:26:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1729124775; x=1729729575; darn=lists.infradead.org; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=KNbBqi1saNqYXEAAo8guTprpDL0iavWB2aVE9Nn4lPM=; b=XJF9gVL1tAwnEK6e9Uo6LYeKEre/NgYh+AT1w2rcazGbLFSMHJ6HdPFpb6+05p1bWk XCknr16X+yhaKID0peTwMwnZIBDIfoKPmWcIR7Ea9Tez3O3f4gJzsnQBaHGTOlpo7PZ4 xlM6ihGRLOCII2x6J8oOuCGBRT4IM0ph11TH4aJeETTS1ECIUQMEU7+ZpY/jy4wjIvCN zxD45sBFaoJx7Rtm8Rrv0VzMDlCUPEgnRAXjHRiw0oDctb6NJp/pQvtLuf6KBLcHoQjg blRQBiEj6PQhk1O8hd7hv95jAhMqQEm+JNxW9MNSydVIPsG+PzjMZYW1yz/sWROxAyDE U5lA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729124775; x=1729729575; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=KNbBqi1saNqYXEAAo8guTprpDL0iavWB2aVE9Nn4lPM=; b=bo62LWYsJbSmo/MpS9H+rsW9y5+dS6G9Q1jqYOiA+iHQknizqa26sFy23+AI5LxeOi OGTO9t/5JFapheEUfhM/9Wj3nXlIHadNik6xIMDA37CIK9acrTQAk29sD1U8gPQbW4yu APglqU6On9P5sQZyjMh6mOMDzQB1bg4SEfzfFo5VqSO/IjQjxwdp83fNkYuLv6ZaP2i7 zIIDqB16qhicgfIWrB4uTJ5geIO3/9q2qzQ06m7cgWrVA9xcTCWD5d1HCOhMkyBmK6ha +o9DgUJRmWdziqem+fx/yoQidtkdCHbQjxZ4/Pf/rDU+l6xC8CbrfCHcjy2Az56Hl0x3 E+5Q== X-Forwarded-Encrypted: i=1; AJvYcCVmXTive01H/G/Ae0FAua+oK22oj8bMLqNR/2zrj2uH2EYcAWTjxYhZI6kUdKSl3IrPRINJVxhFDrXZTniqf0Ir@lists.infradead.org X-Gm-Message-State: AOJu0Yy7G+NUGGEjAHjSSMZ/nvYxX/R85yHr+OfCmx7CzK4VQnODN6dG oAbOUOLDKc6kdPG/2dhuvw7QxmmONugRDvW3e5lJCe++3hNkjyW+3UbwqfyY/LQExK+sJSWGslW VR+cNBA== X-Google-Smtp-Source: AGHT+IEbHtnjVfs/XyOXwRVtcImn7Ac6sTdT7J05MnwMea9QA/h1ss5WMT/c3lNVvH8+kCZUWXSdbtC8V8yG X-Received: from irogers.svl.corp.google.com ([2620:15c:2c5:11:a00a:f237:9bc0:79c]) (user=irogers job=sendgmr) by 2002:a25:dc02:0:b0:e1c:ed3d:7bb7 with SMTP id 3f1490d57ef6-e29782c757dmr2976276.1.1729124774808; Wed, 16 Oct 2024 17:26:14 -0700 (PDT) Date: Wed, 16 Oct 2024 17:25:19 -0700 In-Reply-To: <20241017002520.59124-1-irogers@google.com> Message-Id: <20241017002520.59124-20-irogers@google.com> Mime-Version: 1.0 References: <20241017002520.59124-1-irogers@google.com> X-Mailer: git-send-email 2.47.0.105.g07ac214952-goog Subject: [PATCH v3 19/20] perf dwarf-regs: Remove get_arch_regstr code From: Ian Rogers To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , Kan Liang , John Garry , Will Deacon , James Clark , Mike Leach , Leo Yan , Guo Ren , Paul Walmsley , Palmer Dabbelt , Albert Ou , Nick Terrell , "Masami Hiramatsu (Google)" , Changbin Du , Guilherme Amadio , Yang Jihong , Aditya Gupta , Athira Rajeev , Masahiro Yamada , Bibo Mao , Huacai Chen , Kajol Jain , Atish Patra , Shenlin Liang , Anup Patel , Oliver Upton , "Steinar H. Gunderson" , "Dr. David Alan Gilbert" , Chen Pei , Dima Kogan , Przemek Kitszel , "David S. Miller" , Alexander Lobakin , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, linux-riscv@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241016_172616_765156_85412B30 X-CRM114-Status: GOOD ( 11.58 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org get_arch_regstr no longer exists so remove declaration. Associated ifs and switches are made unconditional. Signed-off-by: Ian Rogers --- tools/perf/util/dwarf-regs.c | 12 ------------ tools/perf/util/include/dwarf-regs.h | 7 ------- 2 files changed, 19 deletions(-) diff --git a/tools/perf/util/dwarf-regs.c b/tools/perf/util/dwarf-regs.c index 05fff75a8f59..28a1cfdf26d4 100644 --- a/tools/perf/util/dwarf-regs.c +++ b/tools/perf/util/dwarf-regs.c @@ -32,23 +32,11 @@ /* Return architecture dependent register string (for kprobe-tracer) */ const char *get_dwarf_regstr(unsigned int n, unsigned int machine, unsigned int flags) { -#if EM_HOST == EM_X86_64 || EM_HOST == EM_386 || EM_HOST == EM_AARCH64 || EM_HOST == EM_ARM \ - || EM_HOST == EM_CSKY || EM_HOST == EM_LOONGARCH || EM_HOST == EM_MIPS || EM_HOST == EM_PPC \ - || EM_HOST == EM_PPC64 || EM_HOST == EM_RISCV || EM_HOST == EM_S390 || EM_HOST == EM_SH \ - || EM_HOST == EM_SPARC || EM_HOST == EM_SPARCV9 || EM_HOST == EM_XTENSA if (machine == EM_NONE) { /* Generic arch - use host arch */ machine = EM_HOST; } -#endif switch (machine) { -#if EM_HOST != EM_X86_64 && EM_HOST != EM_386 && EM_HOST != EM_AARCH64 && EM_HOST != EM_ARM \ - && EM_HOST != EM_CSKY && EM_HOST != EM_LOONGARCH && EM_HOST != EM_MIPS && EM_HOST != EM_PPC \ - && EM_HOST != EM_PPC64 && EM_HOST != EM_RISCV && EM_HOST != EM_S390 && EM_HOST != EM_SH \ - && EM_HOST != EM_SPARC && EM_HOST != EM_SPARCV9 && EM_HOST != EM_XTENSA - case EM_NONE: /* Generic arch - use host arch */ - return get_arch_regstr(n); -#endif case EM_386: return __get_dwarf_regstr(x86_32_regstr_tbl, n); case EM_X86_64: diff --git a/tools/perf/util/include/dwarf-regs.h b/tools/perf/util/include/dwarf-regs.h index 9dfc9abfdddd..6ee95cc69917 100644 --- a/tools/perf/util/include/dwarf-regs.h +++ b/tools/perf/util/include/dwarf-regs.h @@ -79,13 +79,6 @@ #define DWARF_REG_FB 0xd3affb /* random number */ #ifdef HAVE_LIBDW_SUPPORT -#if !defined(__x86_64__) && !defined(__i386__) && !defined(__aarch64__) && !defined(__arm__) \ - && !defined(__loongarch__) && !defined(__mips__) && !defined(__powerpc__) \ - && !defined(__powerpc64__) && !defined(__riscv__) && !defined(__s390x__) && !defined(__sh__) \ - && !defined(__sparc64__) && !defined(__sparc__) && !defined(__xtensa__) -const char *get_arch_regstr(unsigned int n); -#endif - const char *get_csky_regstr(unsigned int n, unsigned int flags); /**