Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1162984pxb; Wed, 6 Apr 2022 10:11:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxXvAbkRyXBDbzRka+HHEs9fVVcptyg1KQWaEXqtdpwHAxlXbYHUFn4Ceb+1dh2Fo2eJAKk X-Received: by 2002:a63:714e:0:b0:398:9bdc:e11a with SMTP id b14-20020a63714e000000b003989bdce11amr7702402pgn.572.1649265096619; Wed, 06 Apr 2022 10:11:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649265096; cv=none; d=google.com; s=arc-20160816; b=OQ7RUwzIJU+4BS+3Btuf6keT6NGGodn/aBt5UtjvzTtn56q8irx/e+TR2Y1CPzJaWl QZJf1eNwjaaMtoyiYil/ZRgEJ5Ho2xn1wgKLIbU0kFUpBxRJkbagACNXz+mFn6CdjoDp dQDPJd2H/OuN3//9kcMWJT8yDxs5BS2cL0SzpIun9BBFA8xOCli6h4dmYLraXHmdNY+a C5AVB9UW5AA1a1zkZNYAY5K5urPRo+RWJmdFD+d6m/nRedFbAfNwB9Lk9xTLr7dUqg9h 9Y6/CoNFw2Vft45rgwboonV2tFqblVXOKbM4RfzfZbBc/0Y3VJ77s8w2I7/YBluw9mIk I+zA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=BlaHLYunH8lWogXwwfxKssKzGVm1nfRpO2uSQYLbmK4=; b=yw0VTOxP03Z5/OXNttm8mybxI3ApeQcVyh6Km3itWX3LvTgTI0fW8GD79z/wgCsV+d D5gDoplc2IxzbPHcgIxVTRsib2UhSvMCbFDdmTka9Jp34CnblYq6m4gI5/zmBR70vvkN 6ZGglJ1sz+Ef0FFpa2P1Ys2mEr6N1jQsg4mRgiHevgohYldHjQkz01ahAv57YXGDZqqr Sk86duhoiLgfbBsj0Q/A2pUeoIQ5vD3J9aCgZD9RfUeQT3K48p9w7MF4PqxnKjS7B5Cr 7QbNioiY1SbMRlFnOygLLT+ArryspyAo+APNc7oB5wyBB3Ov1NWyfU/MbSIbYS5/Wefw Zk9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=AycY1YVx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id u2-20020a17090a400200b001c6aad7b786si4948852pjc.172.2022.04.06.10.11.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 10:11:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=AycY1YVx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 55E8E12C264; Wed, 6 Apr 2022 10:01:59 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238199AbiDFRDy (ORCPT + 99 others); Wed, 6 Apr 2022 13:03:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238132AbiDFRDo (ORCPT ); Wed, 6 Apr 2022 13:03:44 -0400 Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 06FD247F000 for ; Wed, 6 Apr 2022 07:26:59 -0700 (PDT) Received: by mail-pf1-x42f.google.com with SMTP id b15so2610726pfm.5 for ; Wed, 06 Apr 2022 07:26:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=BlaHLYunH8lWogXwwfxKssKzGVm1nfRpO2uSQYLbmK4=; b=AycY1YVxDa54nJpBch0AKnr4fQqh/ofZJHis8/uZ7wWJOSQexNGu/TkhQXKuTapuXC Oe0RTNTVoKpp9diugvrz243dFZbkcxw/T8tMGwStdU+fCK+j2Ng2TYLu1+PiyS/gV1Wv pPHe7/3wW0TWlMBi2i4VpHd/+8ByOIIEpavuN48UycUL5rHNxoliDoxgMBz0j5xkeUby u/USPSXfwuWum/duFYlfBDvSJTNM8tLjjX+o3LNlFaLkBgY9VeFNWY5BslVxu2rjmiln 9DUlBRuW4kl95PYl2NIQkQk0dmE9KaAMyNbVThROAJEVvAq7eOeUYsRJFkfyJywlASMs oN7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=BlaHLYunH8lWogXwwfxKssKzGVm1nfRpO2uSQYLbmK4=; b=2OW4m6xPnDyZLy2CB4K24r66wf1lC4H6R+bRrrxCNP6KccTvka6ZVrsfAcWF9vgvhu nXnZ598FHFcFEsGylg8rM5qzCxOMTbX6fLDyLB/LpzknGwgRFkIPoE5em5JjBXsXpctc MJymjrOGHPUZQ5f6kf2nSFMPt1JfpIf2o+LB1Fpa+jLapEmTwyc2WxBHxDbLDLQxKqlN r7n8GMZ4eQ/PTVALaLUyyHRWDRYLnK6VFuU+LncUXdt5W5hT11gDg80I+HsPGF6yexuR t/ntDcMMa9iXD5y7rVnLoXsmSmjhr5DZjwdT2HwCEaWi1XG41mo9h1W5JEumF5KfWSOo k6yg== X-Gm-Message-State: AOAM5322ei7SAKX8hiOaxcAubz/9DueDQmeMaamxm8mQcOD6+nAXK20T 1JfTphjIkOS+xLeuBrIIOJMIxQ== X-Received: by 2002:a63:f10c:0:b0:382:623b:3bb9 with SMTP id f12-20020a63f10c000000b00382623b3bb9mr7287904pgi.97.1649255218336; Wed, 06 Apr 2022 07:26:58 -0700 (PDT) Received: from hsinchu16.internal.sifive.com (59-124-168-89.hinet-ip.hinet.net. [59.124.168.89]) by smtp.gmail.com with ESMTPSA id k137-20020a633d8f000000b0039800918b00sm16424151pga.77.2022.04.06.07.26.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 07:26:57 -0700 (PDT) From: Eric Lin To: peterz@infradead.org, mingo@redhat.com, acme@kernel.org, mark.rutland@arm.com, alexander.shishkin@linux.intel.com, jolsa@kernel.org, namhyung@kernel.org, palmer@dabbelt.com, aou@eecs.berkeley.edu, iii@linux.ibm.com, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Cc: paul.walmsley@sifive.com, greentime.hu@sifive.com, Eric Lin Subject: [PATCH 1/1] perf jitdump: Add riscv64 support. Date: Wed, 6 Apr 2022 22:26:06 +0800 Message-Id: <20220406142606.18464-2-eric.lin@sifive.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220406142606.18464-1-eric.lin@sifive.com> References: <20220406142606.18464-1-eric.lin@sifive.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Signed-off-by: Eric Lin --- 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