Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp5053918iob; Mon, 9 May 2022 07:45:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwJanommEJa19tEt1w80FBb+sI6aHvwaVVJeZH1+RkKPMjTzDxTt1g4hCNZpFpBPdgWDbuk X-Received: by 2002:a05:6a02:18e:b0:3c6:5a5b:6b3d with SMTP id bj14-20020a056a02018e00b003c65a5b6b3dmr11572348pgb.276.1652107505857; Mon, 09 May 2022 07:45:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652107505; cv=none; d=google.com; s=arc-20160816; b=yNb6nafdPaq5LqruhGEASmvoV5xtZKGoci6LDv8e6pSyellhuRtG/hd9+P1PupCCCG dwQko8YRPV5Zy98LWvgkb9K7C3boAW5MTA0dcUjsH0t2/SwGFXsIfPre46mCdFrmSSLg nqn0tvqQ837ePk7+VsnAH6hdpg48kIpphv2OT1dmsMN1uezLoBkZ3WHltV1DzV6EhBNl oOQm2rFgI2Ct7zOM+02Io7FilJtJSUEQLdremPkCUOBAZ5tTfmJzV9xscU5KSw4UbZ0W vrv8F+2+LeS9CToLRwkKW/X2s/wnFOLAQLlj1seNSa8m6cn4U1wzdmnAHLmJExRASbSR 6Xmg== 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; bh=OuNMGXcYQh0rPx1N2V3jNB0nykfBozY2LBsRu/0AdYw=; b=rqhVy2SYPNRPfyrZzBg+bRZVUmK8EF+IgFq6H9bOQvDf479xjzukT44/JCHJ0GNPAF Y1/IIJbgsEIrg/7GPy8ZIXJlX2QaSWAlLLHR/UP0E6OmuSfBCYglMpTgJoAzO+QnPvpg 2qppXuU1EeLeQzBQhzSbmuTCEWbjQsSG1zk5GqcHdn5z3ZrmskiZ3GPEa/2sRLdckQzL gDAVI9TWdVBN9UKQyosk5zo1QXHRCqB18dXLEAlCejmH4D1r3OQ3AVhXiClOdjQcVG9X CTxgeNznaJzhuUmPXkvMFkPRpA9dlqwKynrFeQ/WQzG61jn9I5GVUMbR1ZrKxPh4mccZ vkYw== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id l16-20020a17090aaa9000b001d952d60f67si19299874pjq.45.2022.05.09.07.45.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 07:45:05 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7902F219C3A; Mon, 9 May 2022 07:44:01 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237552AbiEIOrt (ORCPT + 99 others); Mon, 9 May 2022 10:47:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36030 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237593AbiEIOrk (ORCPT ); Mon, 9 May 2022 10:47:40 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A9FE520B57E; Mon, 9 May 2022 07:43:45 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4D23C1570; Mon, 9 May 2022 07:43:45 -0700 (PDT) Received: from e121896.arm.com (unknown [10.57.4.213]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id E61353F73D; Mon, 9 May 2022 07:43:42 -0700 (PDT) From: James Clark To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, broonie@kernel.org Cc: german.gomez@arm.com, James Clark , John Garry , Will Deacon , Mathieu Poirier , Leo Yan , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , linux-doc@vger.kernel.org Subject: [PATCH v1 4/6] perf tools: Use dynamic register set for Dwarf unwind Date: Mon, 9 May 2022 15:42:52 +0100 Message-Id: <20220509144257.1623063-5-james.clark@arm.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20220509144257.1623063-1-james.clark@arm.com> References: <20220509144257.1623063-1-james.clark@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, 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 Architectures can detect availability of extra registers at runtime so use this more complete set for unwinding. This will include the VG register on arm64 in a later commit. If the function isn't implemented then PERF_REGS_MASK is returned and there is no change. Signed-off-by: James Clark --- tools/perf/util/evsel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c index d38722560e80..a881784da966 100644 --- a/tools/perf/util/evsel.c +++ b/tools/perf/util/evsel.c @@ -875,7 +875,7 @@ static void __evsel__config_callchain(struct evsel *evsel, struct record_opts *o "specifying a subset with --user-regs may render DWARF unwinding unreliable, " "so the minimal registers set (IP, SP) is explicitly forced.\n"); } else { - attr->sample_regs_user |= PERF_REGS_MASK; + attr->sample_regs_user |= arch__user_reg_mask(); } attr->sample_stack_user = param->dump_size; attr->exclude_callchain_user = 1; -- 2.28.0