Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp2031076ioo; Sat, 28 May 2022 02:48:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzC0Rts7C8tn3Kfs46fSUjZ8JtrGe7qamUhMJVxE6jhszzesGspNT4Fry7mOo7qMVT+CsGM X-Received: by 2002:a17:907:968b:b0:6ff:3a8d:ca85 with SMTP id hd11-20020a170907968b00b006ff3a8dca85mr5472330ejc.12.1653731324104; Sat, 28 May 2022 02:48:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653731324; cv=none; d=google.com; s=arc-20160816; b=ZlH+Wylv5df8B6s7sC+PT6SHS1n0K4I1g8Bkp8UfZYV97mpGNie6yiy0ExN+y/7DFX PoAL6dh0PvBZ3TE099L2d4xPIJucSpbJUeQMztAes5fxGiwikXJRDs7T64QmbWuZiGHm tpULcn6oFnjBK6uLseNFpkYK2URCTCiP4IxliJDcTAf8WjlCxB7FEe0/V3vFZBDGFLe/ 2Cl31ZDdSrOaayEpdk4Y0cOgm0FEXOObd6nSpGpADBT61n2Fu2z6s6Di5K502Z3jb/ZR lniiYwfi2JBCfiGCnsOr0asV3jILgMya9PnMqcBqzuYyxXR4mal0YAcK/u7HkxkD0wPs 2Qnw== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=HG9jLVtcgcUC1WK6oIvFYmqrrmYZlwgWXouq/LV6pmE=; b=bU86Nv1cqhLhtz+MMEhPPD1FMH/f0jzghE97qc7gsGPzqJJpXPAPJLY7xNzpBTO1M0 rQg/TP3j47s+/8Ko/0GIq1xRGnJS8hz4S7DcagV5d8zC6FgpcnnqZWLlLcusv10pLwNt h0pBo9sMzRjFpFWeCBrr6TMNBju2oL8XpmPtYo7nIIyyH+NQdrwH72wQDJRk/gRomFWF 7+tQDq/HBMt0aCwDBRZ4aUvGy6zk2CkT1oDu0yuqwyYRYjSD6MdtU5CVHFi9ZJb1p1Or JoSK87PLCn99M6hbkOLTB1DYDYc3QdFSnBxQtMTZKTyfTqyC3YJTw4f55ocUXzpuFDHo bSPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=iBVjaBWP; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h12-20020a1709066d8c00b006efb71530d8si5653818ejt.859.2022.05.28.02.48.18; Sat, 28 May 2022 02:48:44 -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=@kernel.org header.s=k20201202 header.b=iBVjaBWP; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241803AbiEZSU2 (ORCPT + 99 others); Thu, 26 May 2022 14:20:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40848 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349222AbiEZSUB (ORCPT ); Thu, 26 May 2022 14:20:01 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 651E8C03BA; Thu, 26 May 2022 11:20:00 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id C5D87B821AA; Thu, 26 May 2022 18:19:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4B857C34114; Thu, 26 May 2022 18:19:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1653589198; bh=AV4sY7+ADpxJuDw9fhgadxalbn8NdBDUPKkU22h8dpc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=iBVjaBWPP4FxfPd7GkRuTMDBV97IYTJ5n80HP2s5dFhMIGt6JTf6Pu7cn0BvAokB+ 9Qg0Gj+LURkGJRn+bxSRWRd5SqMx0Y2EzihGgs2VGxnFNS8DGfKbctxsU0XgAGmKEO U47chmUOStAD7VJfP50KagsW24iOYLfghC4sLI0Izh0Bj/2LMjdMbe0DQhzo3ZorDg +rMGscAxcLeDnHp434izJcP2EefRi7gIHYSHEsa8Fcis1E+HjrQ/15otCnmmwUv3x0 bkAZu/JioqqAHRPCPt6Ddw392y176gYkiBLybLEBxdiba8VTkjXqsGW3cjPEfUX49v 14LjZJkmwiOeg== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id BED1F4036D; Thu, 26 May 2022 15:19:54 -0300 (-03) Date: Thu, 26 May 2022 15:19:54 -0300 From: Arnaldo Carvalho de Melo To: James Clark Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, broonie@kernel.org, german.gomez@arm.com, John Garry , Will Deacon , Mathieu Poirier , Leo Yan , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , linux-doc@vger.kernel.org Subject: Re: [PATCH v1 4/6] perf tools: Use dynamic register set for Dwarf unwind Message-ID: References: <20220509144257.1623063-1-james.clark@arm.com> <20220509144257.1623063-5-james.clark@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Url: http://acmel.wordpress.com X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Em Thu, May 26, 2022 at 12:44:33PM -0300, Arnaldo Carvalho de Melo escreveu: > Em Mon, May 09, 2022 at 03:42:52PM +0100, James Clark escreveu: > > 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. > > Committer notes: > > Added util/perf_regs.c to tools/perf/util/python-ext-sources so that > 'perf test python' passes, i.e. the perf python binding has all the > symbols it needs, addressing: > > $ perf test -v python > 19: 'import perf' in python : > --- start --- > test child forked, pid 2037817 > python usage test: "echo "import sys ; sys.path.append('/tmp/build/perf/python'); import perf" | '/usr/bin/python3' " > Traceback (most recent call last): > File "", line 1, in > ImportError: /tmp/build/perf/python/perf.cpython-310-x86_64-linux-gnu.so: undefined symbol: arch__user_reg_mask > test child finished with -1 > ---- end ---- > 'import perf' in python: FAILED! > $ Too old to support? 69 7.19 ubuntu:16.04-x-arm64 : FAIL gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9) arch/arm64/util/perf_regs.c: In function 'arch__user_reg_mask': arch/arm64/util/perf_regs.c:151:28: error: 'HWCAP_SVE' undeclared (first use in this function) if (getauxval(AT_HWCAP) & HWCAP_SVE) ^ arch/arm64/util/perf_regs.c:151:28: note: each undeclared identifier is reported only once for each function it appears in /git/perf-5.18.0/tools/build/Makefile.build:139: recipe for target 'util' failed make[5]: *** [util] Error 2 /git/perf-5.18.0/tools/build/Makefile.build:139: recipe for target 'arm64' failed make[4]: *** [arm64] Error 2 /git/perf-5.18.0/tools/build/Makefile.build:139: recipe for target 'arch' failed make[3]: *** [arch] Error 2 ⬢[acme@toolbox perf]$ find . -name "*.h" | xargs grep -w HWCAP_SVE ./arch/arm64/include/uapi/asm/hwcap.h:#define HWCAP_SVE (1 << 22) ⬢[acme@toolbox perf]$ > > 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 > > -- > > - Arnaldo -- - Arnaldo