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 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 566BDC77B61 for ; Mon, 24 Apr 2023 17:46:53 +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=W0DTF1m2Cgeopbx/hWBINmMNhmdEMqhZdmJqkLPBUjI=; b=UXLKHvBRhsbEzM qzps0u5xPE/udZ00XKJd7Ud2ol2xDfxAhETtJM5fMn05ev8iGUVD8JVOcST2JLmVsayMk6O00t/eY Nfz+CSxLgkzXEtS/dLx7E4Ebd85nZLfZKXbX0IPbpskxHc4JlD3XFUzqHHD211t3rfm0vzF1/j+t9 luddzakDFw2LdOMKqyN2SlJ2wCm+BO01kYnSHJ3vIVhY57gBh+NifciGEQrxCP1SI6Fz0f5pjqXa0 rx0GfdKIyMjsT8EhruqS1bL+4voMRUtzVkTaSJJacOm3VmYtHoOzX5sQqYICUkWqQ9aXuxLrswxI3 +1sUQUZyW/Fic7Zfxi5Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pr0GC-00Gw6d-1z; Mon, 24 Apr 2023 17:45:56 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pr0GA-00Gw6B-1A for linux-arm-kernel@bombadil.infradead.org; Mon, 24 Apr 2023 17:45:54 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=rpakZnIlqifHpF2qJrkcO2xFJURRU5/2ZcZ+KgOvZa4=; b=Omn+TrhueiGPx1bsCivXV1C91x Byl1WlXHBV9APyy3v01TkstkuLOooH9VpS5T65gcuxNBoXXjNalrGF8vglKOu96Sl97jWTGWAThya /q1zNB+yUK/0dpk0+4SdjrfgyV3ghEQzJqj+N94+ITzAPMs2pvg02erEHapWEEc/NSswwJ3ZCAVNI VE+68WS8DJyqCNWHSpsBPA1etBsL1dChTm1ktjPG0rxH6FtT5wE/Yy6bS7Ctms8TOlpZDSfmLg0o+ UoJ0gxSioVfwgDo+WS07xI38U74JyAAKfM7M4jfqsri85xdl4sjIgVo4OWjW30Bkmll46JD+xdX8X m+2Pd2mg==; Received: from [179.97.37.151] (helo=quaco.ghostprotocols.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1pr0G8-000fe8-Lo; Mon, 24 Apr 2023 17:45:52 +0000 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-Disposition: inline In-Reply-To: X-Url: http://acmel.wordpress.com 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 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel