Received: by 2002:a05:6a10:87d6:0:0:0:0 with SMTP id g22csp761277pxr; Mon, 11 Apr 2022 06:38:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwa1HNCbG1ToIBcRn1VoLTB/9W9Xe+miqTteMpOFm4QKyB8XUkL+eqzOAv8fn87oBHoFCD5 X-Received: by 2002:a17:90b:4f8d:b0:1c6:408b:6b0d with SMTP id qe13-20020a17090b4f8d00b001c6408b6b0dmr36396390pjb.90.1649684309937; Mon, 11 Apr 2022 06:38:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649684309; cv=none; d=google.com; s=arc-20160816; b=aqeH3mwhgBBO4WF1xUIbj2j1DShf8cXAfugalhxgl2png7OjumAlOyzC0G3KfumdRm kLiQFRADbqQ7QDo27hzitcvudOBmg+EfExlEiLYVdIsqDJgYKLjeVpxhsbmggjfo9XxZ l9MDObdPJy13iTWJTx43xMD/stUuB5LaxbeVFh/zzx00zTiQlj81sUMXmbkffC0gKtG2 WPKGJGwkQd4gyYhqLefzHzryGhnppJQhP5UTj/d1/Eq2glU/YzG7/FRAToH+tRjzBSuA 1TPeNea2OKZNHLpHQD0ySrSAGw5ZawKsyWjUaYCmU/eY08F7lebe94Nwq2UPkQe+Cn5E tTpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=AykdxVkfek06fjXsLB9I2IRHzCOJ6nIrMbEtU2HTEq0=; b=Vt6G5xlkYcEBPHelHdB8Z+hVzVW3CsIwf/Lnyp9hkRlOW5iAUoDN0tlXsUopUq3OV8 gD3rpoU0oIPfJ+k/uqZTUe5mLs9NOaxPXbC+eCXvYgbV+epRumyBfRUCjlFnbhuJb64z Z3PqFceILFH5RCS88sZui+Iw5VKhKghj5AX0CgUziVscwySdUj4mf9u/NPQwPfIbehe8 f+s6gv3oRMltIyDWBVvS1LXvqboRoYD+RZOh2OdD23NItM1w+KCbXcOUszgqrZnZ0CsR xPapRRK8bXjjRCzWY4KbxNOzqNvK01PSq8/nwsDhb5AtDD2OjM1LmwzmvPVBA2tuue5O dn5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b="A/nT1N5m"; 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 f9-20020a056a00238900b00505911788d7si9650333pfc.326.2022.04.11.06.38.14; Mon, 11 Apr 2022 06:38:29 -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=@sifive.com header.s=google header.b="A/nT1N5m"; 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 S240116AbiDJPR0 (ORCPT + 99 others); Sun, 10 Apr 2022 11:17:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232464AbiDJPRY (ORCPT ); Sun, 10 Apr 2022 11:17:24 -0400 Received: from mail-oa1-x2d.google.com (mail-oa1-x2d.google.com [IPv6:2001:4860:4864:20::2d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C4A9F29806 for ; Sun, 10 Apr 2022 08:15:13 -0700 (PDT) Received: by mail-oa1-x2d.google.com with SMTP id 586e51a60fabf-d6ca46da48so14675118fac.12 for ; Sun, 10 Apr 2022 08:15:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=AykdxVkfek06fjXsLB9I2IRHzCOJ6nIrMbEtU2HTEq0=; b=A/nT1N5myhjcL/iH9Bw8eSo2yqIZp8xF1pBJy3wtyHqPNG0WBG5cVpRDBWUYwMadtc b6qXuao0UknR6L+QodumzaDlSmugfdvmQP65aTADnopUAQXHTAOPV0n5bGv3V96CxbbR V7P3W3C0wdGHBaxOMjM5uS1J1SN5DIw0YcSgR7XqrtddyoBNzZgcTQBQvdE/DQxMLYn/ up01o53v/D+e1NyNX24m3Ff3TVZxISLbThUtbw7CnWvIPL36ujBBVMqKm9CwPuNnMJbN SzW9907FEjhnSyXOfFmBNbSiD1OxjakTAJsNxqr6cE6JXGrwYQdSRcegbFqdhUXYJdyE YGJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=AykdxVkfek06fjXsLB9I2IRHzCOJ6nIrMbEtU2HTEq0=; b=MxS283RVvLmLrxZxzfpcnIvRbHSI2+QKw8wY7BlIxwT2xQ//v+ikpwaaU8Wz3MZuVI LMb9IfRWO8Ng6zUCYfz7l3pl11julgZcMgf+WB3muhrBD9/gdQm9yJ3nxPNMNFGbLEyg 6RhpjsbLo6QUQtHvt/bVy4pTXgowDK6mecKdsIAskhQML//2Yv2h8lWUgI2uqWod3GOm YeGJYZmEfIvbgbbRESsiI9Rm87C1ggHIbB236qvsy1rLeQ5wzkrdvmxXMvOGidiQS5ig FKICh5xD02vS6ZlWBzAFanFGIzJgncCNP88FPPIjU6Hdzp6LS5NDYqiqg4D64xeOP5sD xLSw== X-Gm-Message-State: AOAM532ztaSvOEVM4/S5I6XUIELPxeRAW6t746h/wCCHBb5TVrfgTy9Y oi6MN6NDgu2nE0C979Kul9J/3+vJvBhL2Sq1pwfgqA== X-Received: by 2002:a05:6870:b021:b0:e1:dc43:9000 with SMTP id y33-20020a056870b02100b000e1dc439000mr12076705oae.172.1649603713127; Sun, 10 Apr 2022 08:15:13 -0700 (PDT) MIME-Version: 1.0 References: <20220406142606.18464-1-eric.lin@sifive.com> <20220406142606.18464-2-eric.lin@sifive.com> In-Reply-To: From: Eric Lin Date: Sun, 10 Apr 2022 23:15:01 +0800 Message-ID: Subject: Re: [PATCH 1/1] perf jitdump: Add riscv64 support. To: Arnaldo Carvalho de Melo Cc: Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , jolsa@kernel.org, Namhyung Kim , Palmer Dabbelt , aou@eecs.berkeley.edu, iii@linux.ibm.com, linux-perf-users@vger.kernel.org, linux-kernel , linux-riscv , Paul Walmsley , Greentime Hu Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, 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 Hi Arnaldo, On Sat, Apr 9, 2022 at 11:05 PM Arnaldo Carvalho de Melo wrote: > > Em Wed, Apr 06, 2022 at 10:26:06PM +0800, Eric Lin escreveu: > > Signed-off-by: Eric Lin > > Can you plese provide some series of commands demonstrating the usage of > this functionality on riscv? > > A dump, for instance. > > - Arnaldo > OK, I got it. I'll show the series of commands in the commit message in v2 patch. Thanks. > > --- > > tools/perf/arch/riscv/Makefile | 1 + > > tools/perf/util/genelf.h | 3 +++ > > 2 files changed, 4 insertions(+) > > > > diff --git a/tools/perf/arch/riscv/Makefile b/tools/perf/arch/riscv/Makefile > > index 1aa9dd772489..a8d25d005207 100644 > > --- a/tools/perf/arch/riscv/Makefile > > +++ b/tools/perf/arch/riscv/Makefile > > @@ -2,3 +2,4 @@ ifndef NO_DWARF > > PERF_HAVE_DWARF_REGS := 1 > > endif > > PERF_HAVE_ARCH_REGS_QUERY_REGISTER_OFFSET := 1 > > +PERF_HAVE_JITDUMP := 1 > > diff --git a/tools/perf/util/genelf.h b/tools/perf/util/genelf.h > > index 3db3293213a9..ae138afe6c56 100644 > > --- a/tools/perf/util/genelf.h > > +++ b/tools/perf/util/genelf.h > > @@ -38,6 +38,9 @@ int jit_add_debug_info(Elf *e, uint64_t code_addr, void *debug, int nr_debug_ent > > #elif defined(__s390x__) > > #define GEN_ELF_ARCH EM_S390 > > #define GEN_ELF_CLASS ELFCLASS64 > > +#elif defined(__riscv) && __riscv_xlen == 64 > > +#define GEN_ELF_ARCH EM_RISCV > > +#define GEN_ELF_CLASS ELFCLASS64 > > #else > > #error "unsupported architecture" > > #endif > > -- > > 2.35.1 > > -- > > - Arnaldo