From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B1D81C433F5 for ; Tue, 17 May 2022 11:04:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3F8qoWkdp2zSyecUvR3hq7vVq3rpMMVaGh2dhmJ/yAk=; b=oqckOZwJgXx066 xHNFg1WW5hcOvNJg+3ZlZTMEJ99XXedtn4Ab0hpq5GMh0t6VA2NBY9rcG8haQGOxk8cVJXo1r6Zpy hcANXV038ZiCAfBH/p62hkfG8moPfwZfByyTO5QtXru72SSCjD1Iy6eALNLeO0lxLaENmWYQv98sl 8gGxJ60P9FX76hnAAOYrxVVS5yYJYgzcc+n31+5H9OZ4S9MmH8Bc1JoZQEi/wlFRdT3KvDwyjr7wZ 6sUYaSNGEHkvaTqsZMYEKuqVVwwDiK7ghgy6PH7d2s1RGYSvNi1xFGpTJXippGaLMhFWpq9lB+Hzv mCarMaXbx7JQjizQyk8g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nquzL-00DGOQ-Li; Tue, 17 May 2022 11:03:39 +0000 Received: from mail-pg1-x529.google.com ([2607:f8b0:4864:20::529]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nquzI-00DGNc-0p for linux-arm-kernel@lists.infradead.org; Tue, 17 May 2022 11:03:37 +0000 Received: by mail-pg1-x529.google.com with SMTP id a191so16639985pge.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=yHmE7kfERZVgK1iiJC/keDRuatKialdadeIs6VreHTV7jFzXrUclH58r2jWVs+8nNm 6n4xK2cKyydJ1quO1GFl9hegnPrzRqV5Cv2sGUYV0P8cwE2JWpRH6y9xlzS3gRiN/BS2 pTqyl4ay39cDM5elUQH5OOAUqBbDPTQ+5W1v5t7722ftg59iq5oi32+M7PdxPz5uKx91 m8nuA1ecVZ4KNsGESqmYWD1Lkxl+QWB8xfUSoPMiuCYXIx7XJJM9s4GDP/zC3v45pfCG auzFKg8h7uiEOwcORQNn3KZsw1GZlhUD9uYRbJf6m2BqmFA3Dl3K4BfSp+/MvYEpzhqP +xlg== X-Gm-Message-State: AOAM533rdQVQ56YB9GVZwYZX2iy8YV+O5c4+zb32XwWDBBOMPl92aZgb RV4VtAPdkvN3hVIqO8eD0i0P+w== X-Google-Smtp-Source: ABdhPJzTOF6Tfl/amP70At7Vqtv/u46P4Fmt0pgzrECol0LhB40mtHBWn9tL4P2c6H6fAq5clNwhIQ== 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-Disposition: inline In-Reply-To: <20220517102005.3022017-3-james.clark@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220517_040336_069404_E8724762 X-CRM114-Status: GOOD ( 20.81 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel