Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp207333rwe; Tue, 18 Apr 2023 20:46:36 -0700 (PDT) X-Google-Smtp-Source: AKy350bCNNwo4zOWGlDQehUOkpn6TpfQvlTJ0B3jZYZKUGrhobuhNaImljHtawVX46+J/HjaH1ap X-Received: by 2002:a05:6a21:99a0:b0:da:c7e:6ec0 with SMTP id ve32-20020a056a2199a000b000da0c7e6ec0mr2088395pzb.25.1681875996236; Tue, 18 Apr 2023 20:46:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681875996; cv=none; d=google.com; s=arc-20160816; b=oNDYvfi08A8fkSdZT/ltftRvwrECOcL1Dqhk8p1alqH4Ehg8opxYJv+Y4WRDLyiMlh BYstsklhSupboiY/FyJDGsjyFXj8LDZ/uQ9DaWI6Ms7G33yd7246PTHKoGmAXzwdToTr bODQCVVXh3h2Ngz0xZjYUQGgg0RjoUK45sERnyTfRCAua3BjG28i6rICE2z3i5RjNT3d we3EBtfP9L9k8ryWv2r97CErmGi2Y6wXfl/cryw0xryQ6bhEW+nQvZmslu8twx3BCgw1 Gr9DHwDthZfJuDhP1/7JW28bPSSNvgx5pdFLqt97ZsmiBN7RFoJhKeFMnQLVDYcVCgFg Paqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:to:from:cc:in-reply-to:subject:date:dkim-signature; bh=H6mgm3Di7gHIXRR1b3Pr408Mz+NLzzONCXm1uh+AKO4=; b=C3t24Lnk3x7hTMqU6i8aj4rpahGSPEDnTq5FufzZ2uFbX/9P/0MlGk62F/9Sdl4Nlm jCDK0fqEpmN1JuGZbXINf4g7U9KCiusL/FRK9GRNklN61FiX39Q4QnkIcAVlJacTciu9 5Wup4KtSZl8UPmu/gEmsRY5xHCIGXWl9ZkyI3jv9fOUEVBVTv+l1bVzi27O7O9PP2AB9 GwZGjwSxtGeTlFhLuLiMlkTAOStMS3swtbkJqapfaU/ZEz9/mSeUch1+rG4f3c9fjySa 1K53/mOFCiVas0PvtGekwqSiuLxBeNOTwiRQT+Tn9L/cb0+jblD1iy2u22dPS0dDgQVp C6VQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dabbelt-com.20221208.gappssmtp.com header.s=20221208 header.b=clblKm9O; 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 x20-20020a631714000000b00519ffeb6d43si15312595pgl.188.2023.04.18.20.46.24; Tue, 18 Apr 2023 20:46:36 -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; dkim=pass header.i=@dabbelt-com.20221208.gappssmtp.com header.s=20221208 header.b=clblKm9O; 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 S231875AbjDSDlg (ORCPT + 99 others); Tue, 18 Apr 2023 23:41:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58180 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231815AbjDSDlY (ORCPT ); Tue, 18 Apr 2023 23:41:24 -0400 Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3714C6A44 for ; Tue, 18 Apr 2023 20:41:23 -0700 (PDT) Received: by mail-pj1-x1033.google.com with SMTP id s23-20020a17090aba1700b00247a8f0dd50so309172pjr.1 for ; Tue, 18 Apr 2023 20:41:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dabbelt-com.20221208.gappssmtp.com; s=20221208; t=1681875682; x=1684467682; h=content-transfer-encoding:mime-version:message-id:to:from:cc :in-reply-to:subject:date:from:to:cc:subject:date:message-id :reply-to; bh=H6mgm3Di7gHIXRR1b3Pr408Mz+NLzzONCXm1uh+AKO4=; b=clblKm9O1VpWESzYzftaKLkgtzkFRl4IoswnIWWfM+vYZDxcGdGxNSGPSXXSgLim4o aqoJ7QSFVUk4be0sAXrzdjnOqF12e3GdDl+d27cg/ulipwcj0KMuHVTKPXHzxqSpbL+3 d7+BG/6ZumIdlKEk57i3uJOxyTlSEtHjynHkqukj7yTrpJT1CxWM2zuZlp3n4WSbYjMm TpXt/MG267ECLIyBg/y1RfRmCClASzhpwZQ/V7L8GJsmAc2+Ytm+rCNXFsI4qQoCxr5A EvYYZWU8hjsztoWKvpNdXTFvmqgbARYHPrkXll9nxVDJluJ1nl3cVfCL1G0HXUvo3t41 kNfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681875682; x=1684467682; h=content-transfer-encoding:mime-version:message-id:to:from:cc :in-reply-to:subject:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=H6mgm3Di7gHIXRR1b3Pr408Mz+NLzzONCXm1uh+AKO4=; b=H+y7q3JwEvNWatQAHunddua6/u0gTl9M2cGXgsxkn3FVP5bqenIwQuS9mUeRp5Tjr0 55cjfI61CcRFBBr59aUD9ssK/c98xaGvrZ2r4XcqB6OqBwEcl1kzBxt3bueaA5XKteSQ cn7pWFDR3wXlt9OCZCG/BCEuZbz1d+m1btKLn0a6K3/MFRvLGub1oXHx9XJ6gfixXNM3 8NX/L+JgQww8zhdbgGQiH469EWbF9A5xQydW1zJ66MBlSYHZZ+D1JZPFzAmcBc5qJNVM ItGqpdY+HPe+ZEt5KoLi1MsHcGyEQI0MfY+9vHmE5/bYHT5rY9vk48qpfGFfXFSZShd7 wDAQ== X-Gm-Message-State: AAQBX9fYmoU6JwQ8lyi76xE/GtXrQxauuD+0z7K5ajm58z0m/eQZuo82 1lhSwZXotwkevJ8j5wPjJPxy3Q== X-Received: by 2002:a05:6a20:4423:b0:ee:e922:6747 with SMTP id ce35-20020a056a20442300b000eee9226747mr1933679pzb.56.1681875682524; Tue, 18 Apr 2023 20:41:22 -0700 (PDT) Received: from localhost ([135.180.227.0]) by smtp.gmail.com with ESMTPSA id 190-20020a6308c7000000b00513cc8c9597sm9278189pgi.10.2023.04.18.20.41.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Apr 2023 20:41:21 -0700 (PDT) Date: Tue, 18 Apr 2023 20:41:21 -0700 (PDT) X-Google-Original-Date: Tue, 18 Apr 2023 20:40:54 PDT (-0700) Subject: Re: [PATCH v2] perf tools riscv: Add support for riscv lookup_binutils_path In-Reply-To: <20230315051500.13064-1-p4ranlee@gmail.com> CC: jolsa@kernel.org, namhyung@kernel.org, irogers@google.com, Paul Walmsley , aou@eecs.berkeley.edu, acme@redhat.com, anton@ozlabs.org, dja@axtens.net, mpe@ellerman.id.au, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, p4ranlee@gmail.com From: Palmer Dabbelt To: p4ranlee@gmail.com Message-ID: Mime-Version: 1.0 (MHng) Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 On Tue, 14 Mar 2023 22:15:01 PDT (-0700), p4ranlee@gmail.com wrote: > Add RISC-V binutils path on lookup triplets. > > Signed-off-by: Paran Lee > --- > tools/perf/arch/common.c | 18 ++++++++++++++++++ > 1 file changed, 18 insertions(+) > > diff --git a/tools/perf/arch/common.c b/tools/perf/arch/common.c > index 59dd875fd5e4..e80d4d22cabf 100644 > --- a/tools/perf/arch/common.c > +++ b/tools/perf/arch/common.c > @@ -43,6 +43,20 @@ const char *const powerpc_triplets[] = { > NULL > }; > > +const char *const riscv32_triplets[] = { > + "riscv32-unknown-linux-gnu-", > + "riscv32-linux-android-", > + "riscv32-linux-gnu-", > + NULL > +}; > + > +const char *const riscv64_triplets[] = { > + "riscv64-unknown-linux-gnu-", > + "riscv64-linux-android-", > + "riscv64-linux-gnu-", > + NULL > +}; > + > const char *const s390_triplets[] = { > "s390-ibm-linux-", > "s390x-linux-gnu-", > @@ -166,6 +180,10 @@ static int perf_env__lookup_binutils_path(struct perf_env *env, > path_list = arm64_triplets; > else if (!strcmp(arch, "powerpc")) > path_list = powerpc_triplets; > + else if (!strcmp(arch, "riscv32")) > + path_list = riscv32_triplets; > + else if (!strcmp(arch, "riscv64")) > + path_list = riscv64_triplets; > else if (!strcmp(arch, "sh")) > path_list = sh_triplets; > else if (!strcmp(arch, "s390")) Reviewed-by: Palmer Dabbelt Acked-by: Palmer Dabbelt