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 43282C6FD18 for ; Tue, 25 Apr 2023 11:04:46 +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:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ejZxnWYJ9LczrvWtoZ/80Roj635eVl1CM2qc8u+I5/w=; b=lyH/fuzdOAmDYk BjLqUe7hVY4RepmoSgbTveCTP6erDWLEsdPo0PxE2jVboVPwbJ5bKupRH9KEyYp85fb7+4tmfqxQi TAj3SXRlWJyLkZgnZdf3+UYakhWyKO/uDF65NdxFWNhRZ0affYbVIw6Xc4Ixuo7XTaqUHvSN1myWR ZNaS8od4UHVgrYtmU3S4r7dV7lBJg8p2ZBVosCpUkA2abgwBMmhNlR8ANZ+PI96Ir4hAyEu/rh1vR 2uFnaltTEkKjOwFePeBOgv/SUn+bjf+YdEoQ9m0HdBVDp6/QugtiBnAZq8OaBy1LYY07o5WaX+ovB ug9bKrJBED5idTjUMpog==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1prGSe-000v4F-15; Tue, 25 Apr 2023 11:03:52 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1prGSZ-000v3C-2U for linux-arm-kernel@lists.infradead.org; Tue, 25 Apr 2023 11:03:49 +0000 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 58A124B3; Tue, 25 Apr 2023 04:04:27 -0700 (PDT) Received: from [192.168.1.3] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E1E233F5A1; Tue, 25 Apr 2023 04:03:40 -0700 (PDT) Message-ID: <6a55956e-4218-4e11-4d7b-841761430a42@arm.com> Date: Tue, 25 Apr 2023 12:03:28 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [PATCH 2/7] perf tools: Add util function for overriding user set config values Content-Language: en-US To: Arnaldo Carvalho de Melo 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 References: <20230424134748.228137-1-james.clark@arm.com> <20230424134748.228137-3-james.clark@arm.com> From: James Clark In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230425_040347_900867_3C028BEA X-CRM114-Status: GOOD ( 23.98 ) 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 24/04/2023 18:45, Arnaldo Carvalho de Melo wrote: > 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. > Ah sorry! I ran it from an in source build and got the python import error so I ignored that test. I see the new error if I run it from tools/perf instead. Interestingly with an out of source build it doesn't matter which cwd you run the Python test from because $OUTPUT is an absolute path. Normally I do an out of source build, but the Coresight tests don't currently work with that. Which I will submit another fix for... I don't know if it's worth getting rid of that edge by making sure PYTHONPATH is always absolute even for in source builds or if it will break something else like a make install? It's because of this line: -DPYTHONPATH="BUILD_STR($(OUTPUT)python)" Will make sure that they all pass next time. I also sent a fix for the build-test target on my platform. > - Arnaldo > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel