From nobody Thu Nov 28 03:41:33 2024 Received: from mail-yw1-f201.google.com (mail-yw1-f201.google.com [209.85.128.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8973B18C93D for ; Sat, 5 Oct 2024 19:57:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728158228; cv=none; b=aav7kDOrLnm0mlLIQQN35BK7OW3AssCZk03EiSyZ1asgZ5kRRuIPcpplegZ4YD1NuMCuLuhhdgCOR8Sy1V1glV4r0QhDI8MXKL98xvqOk+9e6nJj3rOwRrmagpFI/au8ryPHuqhBa01CB1ABgG+TIjjWu0SPogx+dswLH4vSE9Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728158228; c=relaxed/simple; bh=1/eilS3aKIVw4rN484yjxzHSBP1TB/2GhMWJ1EUyEi4=; h=Date:In-Reply-To:Message-Id:Mime-Version:References:Subject:From: To:Content-Type; b=oQw+xRQXnHMXZ/VI6D7b3jQLeJpjWg+P/V0+GWTr97z+eNh5H+kGG+A5RUNNQCQPFHBj087oHFXdtebVf1P9qT3BHC8q8bW8Xzdbdib/4JMpQJ3OafRChStE4zvYZqcFDFwXsud394qm3GfzTcBk+MGpJKf4rNXbLyrCVRF/IWs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=TbQqB8Hk; arc=none smtp.client-ip=209.85.128.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="TbQqB8Hk" Received: by mail-yw1-f201.google.com with SMTP id 00721157ae682-6e2e5e376fcso4443097b3.2 for ; Sat, 05 Oct 2024 12:57:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1728158226; x=1728763026; darn=vger.kernel.org; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=LSNh7O2trPUtVrtwxznrhYE09HyCzuCy8rukfDtx/KY=; b=TbQqB8Hk7SUNrHD3kla2nJh/36C8hN+xsB36nd+CY/RYznXT4XgCK44qovrRmLtP00 +1KIh7wYwbD82Ty6fE0mK5G86DOoEW+saiyVr8KketUAflMaeJo/99TbcAs68zL3g6/F oxB2n5T/e+E3TrGmtkxfYq4A7UZ16cLcEocgjSpvXpQTFPc0NsVQW7meQJ3zIGpoAqqr D8LAxQGAW1Ja7wOuIXVnxHWkvLaJy9gb4rlSc0WclhBURWXSMXao5hnwn8pD6TnkGWeV K1DZahNHZB2nMIjB3tPRC6sEnzvihSPUpTq9VrTCTsFFW9Hi92Db/0xtmqksf1MJZHYQ 9fhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728158226; x=1728763026; 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=LSNh7O2trPUtVrtwxznrhYE09HyCzuCy8rukfDtx/KY=; b=lEhKeELodc7Fo0DzdOr7ziTQqPt0rbm8beomDZBUWyEX7DLzUxlqiXaAxbrUDdCXcl KkjkFOD/TAukRCLcwW81IU8AEYjFiB4ZtgIum+pwJpOGfHi+mUmBdbuaS9kdSehLdtTx 7ZjWWHFm6gYVYsyoz5VBkYKv69I1KX1N2HIpkollMXQLwgYOH1WWzRskIMBhVeOYQaFw uQIm2UgQnZ8YVstcjPkgPvskEfO9PHCYf2iFlJ8X/ZguQn/xhNKqP8TtuNv0IQaiYosi +Gp3cdOc30Ggl7f97JPJgSW8LrnYieuNJL+90dG5GlWegFidt58r51rKkE5TLMsDPPM6 VPmg== X-Forwarded-Encrypted: i=1; AJvYcCVnAu24FMBd3tkJjs1xxHn9pnnS1XS9cxlFaXpaLSEqlWzWcwHpKZUJ1WhZ2UHSHwchEoHa++cks1gQoyw=@vger.kernel.org X-Gm-Message-State: AOJu0Yy5IU9jM3yrr2O1P07/H7qMR7+0b2yd8EQrPdg9fgypmYhAyPAE kRubqVPwpajiXsQZQw/WgW6XVjoCbwTJZ4VtAIun/uDZsDJUz6YDYpLwznd84E6/fBoleXXcT+d krAd3mA== X-Google-Smtp-Source: AGHT+IHa7tzQlt8ZfJU9HM6CpUwYm+2RPIugXPlK83fzJL4/DRA+kOB4v30bsPjrBffyPaLJb/8aQ0jYC2TM X-Received: from irogers.svl.corp.google.com ([2620:15c:2a3:200:4c2:5b4d:8797:7249]) (user=irogers job=sendgmr) by 2002:a05:690c:2b8e:b0:6dd:d138:d823 with SMTP id 00721157ae682-6e2c72adbdamr920947b3.8.1728158225532; Sat, 05 Oct 2024 12:57:05 -0700 (PDT) Date: Sat, 5 Oct 2024 12:55:40 -0700 In-Reply-To: <20241005195541.380070-1-irogers@google.com> Message-Id: <20241005195541.380070-31-irogers@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20241005195541.380070-1-irogers@google.com> X-Mailer: git-send-email 2.47.0.rc0.187.ge670bccf7e-goog Subject: [PATCH v2 30/31] 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 , "Steven Rostedt (Google)" , "Masami Hiramatsu (Google)" , Guilherme Amadio , Changbin Du , Daniel Bristot de Oliveira , Daniel Wagner , Aditya Gupta , Athira Rajeev , Masahiro Yamada , Kajol Jain , Huacai Chen , Bibo Mao , Anup Patel , Atish Patra , Shenlin Liang , Oliver Upton , "Steinar H. Gunderson" , "Dr. David Alan Gilbert" , Chen Pei , Dima Kogan , Yury Norov , 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 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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, unsigne= d int flags) { -#if EM_HOST =3D=3D EM_X86_64 || EM_HOST =3D=3D EM_386 || EM_HOST =3D=3D EM= _AARCH64 || EM_HOST =3D=3D EM_ARM \ - || EM_HOST =3D=3D EM_CSKY || EM_HOST =3D=3D EM_LOONGARCH || EM_HOST = =3D=3D EM_MIPS || EM_HOST =3D=3D EM_PPC \ - || EM_HOST =3D=3D EM_PPC64 || EM_HOST =3D=3D EM_RISCV || EM_HOST =3D= =3D EM_S390 || EM_HOST =3D=3D EM_SH \ - || EM_HOST =3D=3D EM_SPARC || EM_HOST =3D=3D EM_SPARCV9 || EM_HOST =3D= =3D EM_XTENSA if (machine =3D=3D EM_NONE) { /* Generic arch - use host arch */ machine =3D EM_HOST; } -#endif switch (machine) { -#if EM_HOST !=3D EM_X86_64 && EM_HOST !=3D EM_386 && EM_HOST !=3D EM_AARCH= 64 && EM_HOST !=3D EM_ARM \ - && EM_HOST !=3D EM_CSKY && EM_HOST !=3D EM_LOONGARCH && EM_HOST !=3D E= M_MIPS && EM_HOST !=3D EM_PPC \ - && EM_HOST !=3D EM_PPC64 && EM_HOST !=3D EM_RISCV && EM_HOST !=3D EM_S= 390 && EM_HOST !=3D EM_SH \ - && EM_HOST !=3D EM_SPARC && EM_HOST !=3D EM_SPARCV9 && EM_HOST !=3D 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 */ =20 #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); =20 /** --=20 2.47.0.rc0.187.ge670bccf7e-goog