Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp136070iob; Tue, 17 May 2022 21:28:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxkNMb7Nly/uM16tRx3590DlzO1OnznV7dmMo/p9KQuzaeGv0XnRmthURemCOb7k9Axsdvz X-Received: by 2002:a17:90a:6342:b0:1df:763d:4eca with SMTP id v2-20020a17090a634200b001df763d4ecamr10041012pjs.85.1652848095096; Tue, 17 May 2022 21:28:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652848095; cv=none; d=google.com; s=arc-20160816; b=PR6PwJzLR1w7b9IdNuoLtID4mjt3eBKNIfIEW7N8/+jsMO9kqUqec5C5JKhJl7w9yE 521um5o1BMOG0AhwxpyZ0lXtqbFqcfyyFDfAp0ep8c1VFGJRKcrAWNLmWYUprv6S0AGj HiAP80CHZMEo+clD4ClUW8yJ0pMYCR1IMX4hVPyYwxiNTTCrjs+wgK/Hsh1Y0mfR7yXm P3cUvpELb+3HKaEo7pTKRRujFAsaZkWjdvf11KPpI3BvuiSXoBoV62ocY9nZ/vj4Kscv WORKDAxB3klEcX1JKUQOVZnUhS55pse35YxHlb9ee31UY3NZ5QaDdcVGCzZ0tf4UGB2j 1vYg== 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=PHHKDOWr8Xyqg9P+vlWqloqf4MeFnPkLablqeeKPW5w=; b=i04Zq9AwU/aRtks8wM4+VY1WkQ2DMIoIgaBnUSY8O/91czAFtKGIo5ocI1B0gYNRVQ /WL7fuyVsXTpZDUlL+ZqBhXGzikDx22RhrVoA+5d6ABoChKv9oUL7ZfbK5PGxoYfXXVr REQ3X3x3uWebzdW0nPXo+TgjYux0Qzx7laoDfmERHmIwNrDmhlWHgEV+jrojvwkhVmME AS6qByMsq5H5w5sjuVJiVA2S/V8syTpVx8Z0BdyK939JVcKlWKnCky3QloT8wy8or6Xx MKj7wXcJ7ZnCZpVp2aeSEjsgf6wo7xpT3WkajG/vqD85yAUyVzg7Mg36qbD5zwV4sdLY bh9w== 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 bn10-20020a056a00324a00b004fa3a8e00adsi1325484pfb.356.2022.05.17.21.28.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 May 2022 21:28:15 -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 9845A8CCC2; Tue, 17 May 2022 20:50:35 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236003AbiEQKWg (ORCPT + 99 others); Tue, 17 May 2022 06:22:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41498 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344825AbiEQKV7 (ORCPT ); Tue, 17 May 2022 06:21:59 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 269AA4BFDA; Tue, 17 May 2022 03:20:23 -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 E270213D5; Tue, 17 May 2022 03:20:22 -0700 (PDT) Received: from e121896.warwick.arm.com (e121896.warwick.arm.com [10.32.33.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 6B5003F66F; Tue, 17 May 2022 03:20:20 -0700 (PDT) From: James Clark To: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, broonie@kernel.org, acme@kernel.org Cc: german.gomez@arm.com, leo.yan@linaro.org, mathieu.poirier@linaro.org, john.garry@huawei.com, James Clark , Will Deacon , Mike Leach , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 2/4] perf tools: Use dynamic register set for Dwarf unwind Date: Tue, 17 May 2022 11:20:03 +0100 Message-Id: <20220517102005.3022017-3-james.clark@arm.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20220517102005.3022017-1-james.clark@arm.com> References: <20220517102005.3022017-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 5fd7924f8eb3..787bbcbcd2ae 100644 --- a/tools/perf/util/evsel.c +++ b/tools/perf/util/evsel.c @@ -896,7 +896,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