Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp3857271iob; Tue, 17 May 2022 08:34:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxkUrkBTRgG52CPRB/3fyEWf3UdlTz4JOUMwLM5kdiGS4nUQZO0TjOz0XPmMTP4X8UQ9FRn X-Received: by 2002:a17:90b:4c4a:b0:1df:9cbf:879f with SMTP id np10-20020a17090b4c4a00b001df9cbf879fmr1521665pjb.84.1652801666194; Tue, 17 May 2022 08:34:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652801666; cv=none; d=google.com; s=arc-20160816; b=kZp452sUZcUCQX0fQXRExKMEsyTa8+L3PszyvQbvKIzcL0M8sCrxppxQWHg7VUi7U9 Evdb4N6b0MkRuE+u9GWxC5uADJ135qJMskoGjLr3stHSnMHlZn0luq2oaIiqkuN6IVq5 J6vQ/cqCKRv/i1fQAOqHuRWnyLt5pjpQDj43JS67srsF3zbeaF0Ha/4o4E/WnH1M/0vk rXvH7F+8+U32gWpqx0es2GVy2HHhdQ8oLApCszqN7uBbm+ProdFmJqxTJMSTSkeuwDDj Jy1D+jgAdln79YU19OSUeUxioJZmJOkfsgYI9SN+5WhBYQFocwQQPgBnrNTzjdOLJhLW IF2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=PjHTBfrAvfYwUJ31KQJIFgiibplD85RYkwP/rJccONE=; b=oWshvIDInv/4pVzUfj8Xhqnwz4rKsV5sQwQAmWly1Diu+LzECurnQD1Hg8b31DeBp5 +l+IbPsRlXqt5SV5J0jPmpG4owpRFVjP7NfDY8ay/IvUalR03gfrijLRhDmtqpJax2Sq KIo1eG6iquwQA/V/9t4bqHU0KThsKj7SinIg9gBcT/S64RebCHqC3kmOuOV6bBvLTrhN rCmANKNJnwL8s9V4AEQVvDoWmsIcP1rXsvhKU29xHpqvVVC8mPrxCt9EGj8XXDw+Qu+U ThZgAEqnuSgfF5OtkWJLg0lLRzUz+oYKB23xPZbhAtwPxuKFRnB5sObgTKh3iXVvjHkL 41qQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HdRX54HJ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x3-20020a170902b40300b0015cb564e4d5si15213757plr.242.2022.05.17.08.34.13; Tue, 17 May 2022 08:34:26 -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=@linaro.org header.s=google header.b=HdRX54HJ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343688AbiEQLDi (ORCPT + 99 others); Tue, 17 May 2022 07:03:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231463AbiEQLDd (ORCPT ); Tue, 17 May 2022 07:03:33 -0400 Received: from mail-pf1-x434.google.com (mail-pf1-x434.google.com [IPv6:2607:f8b0:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DEE201A39F for ; Tue, 17 May 2022 04:03:31 -0700 (PDT) Received: by mail-pf1-x434.google.com with SMTP id c14so16579840pfn.2 for ; Tue, 17 May 2022 04:03:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=PjHTBfrAvfYwUJ31KQJIFgiibplD85RYkwP/rJccONE=; b=HdRX54HJiXnCxR1xsL8soi2Ob1QbMm+BEwNXSWrF/bBRQLDYy+tBIkEDTwQfrgn2+K sfApkdKQvdUqQC+89PadTZ3z8ExzT3fFQiGrCE4qZTc3tUIYk6LeNUuNoXPcAPaBEMr7 8eeu0ZIIlwnwwg709xOh6EdcEqrmaIrNtcfiVZrOf1JLK3oH8j50ipb26Gd4UNgMWwCP MqnqHFA+9PNNbWqfLdpGBodbuW3oxe2obNj94sAtZFeCqCnqfkUByUBtZe7jOBQ0TDjF sfVGlfBiZA0V+DKOBaYiA+feepDzDGhRwVPYpQCeda1XY+fdSl96+YBhV6FmHXvoVH+8 oRhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=PjHTBfrAvfYwUJ31KQJIFgiibplD85RYkwP/rJccONE=; b=RJaBTUOTdit705HsIVzQpUoDyNTxa0IIXqZDCEmgdJ3ByCGr5zjiMplnoRoEasFB1g jiErac7R+RR4CKLJLnFV1NNpJJrwLOzC3IRwgLcs9l4hHBRkDxzq8zmWEOt7X4IDtg6W M5vZqaCmXBU6xXENR3pDPfdNlpew06io8Y4BZDeMgo9KTdlGgcTaG3mwnhHgv3Gi/V8q sk22oZzbgWP25n1QiUypgYDWa5KOOuh656cdUMSPmcW1MkHkjRwB+exR7r9DxL946Qtf AYSgayUTEbyQnsLK4+K/mROsdVXe/ddKdl6QXGnymzWHLJjanHoatEO4STKpcSPAlTBj 0rzA== X-Gm-Message-State: AOAM5335nF3b08PH3rMiLxlra/MrO8VaOHLLJs/aPfnsVjpUBkuLiu41 1GTJKXdSOyj4OMjfwoi/G8/p3I0e5fMyCKj5200= X-Received: by 2002:a65:6e88:0:b0:382:3851:50c8 with SMTP id bm8-20020a656e88000000b00382385150c8mr19442523pgb.270.1652785411251; Tue, 17 May 2022 04:03:31 -0700 (PDT) Received: from leoy-ThinkPad-X240s ([46.249.98.195]) by smtp.gmail.com with ESMTPSA id 21-20020aa79155000000b0050dc76281e3sm8473071pfi.189.2022.05.17.04.03.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 May 2022 04:03:30 -0700 (PDT) Date: Tue, 17 May 2022 19:03:22 +0800 From: Leo Yan To: James Clark Cc: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, broonie@kernel.org, acme@kernel.org, german.gomez@arm.com, mathieu.poirier@linaro.org, john.garry@huawei.com, Will Deacon , Mike Leach , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v2 2/4] perf tools: Use dynamic register set for Dwarf unwind Message-ID: <20220517110322.GC153558@leoy-ThinkPad-X240s> References: <20220517102005.3022017-1-james.clark@arm.com> <20220517102005.3022017-3-james.clark@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220517102005.3022017-3-james.clark@arm.com> X-Spam-Status: No, score=1.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: * 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, May 17, 2022 at 11:20:03AM +0100, James Clark wrote: > 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 This patch looks good to me: Reviewed-by: Leo Yan Just curious, do you think should update the test (e.g. arch/arm64/tests/dwarf-unwind.c) to use arch__user_reg_mask()? Thanks, Leo > --- > 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 >