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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B5566C77B61 for ; Mon, 24 Apr 2023 17:45:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230434AbjDXRpx (ORCPT ); Mon, 24 Apr 2023 13:45:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37454 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229929AbjDXRpw (ORCPT ); Mon, 24 Apr 2023 13:45:52 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26A12E9; Mon, 24 Apr 2023 10:45:51 -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 dfw.source.kernel.org (Postfix) with ESMTPS id B77A960EDE; Mon, 24 Apr 2023 17:45:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EC165C433D2; Mon, 24 Apr 2023 17:45:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1682358350; bh=808DQgGPAc1pXUH4EhUIf4sYh1ZGvIS8hF1msuy+Dlc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=FkyQPcDyY6n9DkPX6QFR0hKxuEJXcIeXfroyhmpUY76ONRKMVlX2MwjpXZ+8pAa7H 2bJJN+MGtO05MirZQDbkqImenMB5dvcDw+zOw4TRnCKqPUV57KDEZCxle55/evBK6C VrAMhtH1JyW5upI4ha/qAk/riiq5QyuAe1LtxqWw+TQt/zmi6ARblMQa3Ewls5QO0X yAS7VZYdl5DDFkEdSq5+0ot8QhRSNEtL3xZhBmWe6eks52i1mh7m31vfIjQdOB1B36 trYpKzoXXkbwtKO1aPknzPBJDjT0kGEX+bDAmQnMFZuniwoaYdRqi93ISq7iXo5Kna extIWAtGxTSgg== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 440F3403C5; Mon, 24 Apr 2023 14:45:47 -0300 (-03) Date: Mon, 24 Apr 2023 14:45:47 -0300 From: Arnaldo Carvalho de Melo To: James Clark Cc: Adrian Hunter , linux-perf-users@vger.kernel.org, coresight@lists.linaro.org, shy828301@gmail.com, denik@google.com, Mathieu Poirier , Suzuki K Poulose , Mike Leach , Leo Yan , John Garry , Will Deacon , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Ian Rogers , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/7] perf tools: Add util function for overriding user set config values Message-ID: References: <20230424134748.228137-1-james.clark@arm.com> <20230424134748.228137-3-james.clark@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Url: http://acmel.wordpress.com Precedence: bulk List-ID: X-Mailing-List: linux-perf-users@vger.kernel.org Em Mon, Apr 24, 2023 at 06:36:14PM +0300, Adrian Hunter escreveu: > On 24/04/23 16:47, James Clark wrote: > > There is some duplicated code to only override config values if they > > haven't already been set by the user so make a util function for this. > > > > Signed-off-by: James Clark > > One minor comment, nevertheless: > > Acked-by: Adrian Hunter I just moved to evsel__set_config_if_unset() to util/pmu.c, next to some other evsel__ functions to not break the python.so binding, before I was getting: [acme@quaco perf-tools-next]$ perf test -v python Couldn't bump rlimit(MEMLOCK), failures may take place when creating BPF maps, etc 19: 'import perf' in python : --- start --- test child forked, pid 500086 python usage test: "echo "import sys ; sys.path.append('/tmp/build/perf-tools-next/python'); import perf" | '/usr/bin/python3' " Traceback (most recent call last): File "", line 1, in ImportError: /tmp/build/perf-tools-next/python/perf.cpython-311-x86_64-linux-gnu.so: undefined symbol: perf_pmu__format_bits test child finished with -1 ---- end ---- 'import perf' in python: FAILED! [acme@quaco perf-tools-next]$ Please run 'perf test' and 'make -C tools/perf build-test' prior to sending pull requests, Thanks, applied. - Arnaldo