Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp868382rdh; Thu, 26 Oct 2023 19:43:59 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE00cC2bduzwVy1wRgbk35ZGtojLjCVbaV380jqkqS3g372ghI1EMF9r6O8bG+JvP+JiULC X-Received: by 2002:a25:cb05:0:b0:da0:6933:d8d with SMTP id b5-20020a25cb05000000b00da069330d8dmr1363612ybg.63.1698374639488; Thu, 26 Oct 2023 19:43:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698374639; cv=none; d=google.com; s=arc-20160816; b=Mqr1dKZKc9Rr1HmAvA+zp9Vu+P3C7+9qMuFwYpOYFRRtP/4qoR/zWPCe7ThCooVY5C VU2clL1wzGlVnWaKpitVJZlhOX2+WN5r0NGMfyTpQ54if2SNvKXYauzhNHL8scCukNQF OwCGRIX5QX5C02A5jEeRX0kDgp4jT/qXl8fiOgS+DPdSFHWopQwhqq1rSFAdVx79Zggh zaeG+EHSrzDTj5wP9We6sZzCgUdmaOXTIScghaA2VhafGZbBHzO3DGqUUGiOUVeEj0tX d1Qbtxq2UWd2tmo0dj/M3mIWx+8FjJ/bfqIKLFl0fsKqQxX34cpLKqnfzxbIiDr2yzPl zCWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=nM5OauJvBr4+qgesi4PdXkuJaiq6ZZT/gkoKlk0s1Uc=; fh=eaVsDaz9oq8fzyzcWo3jqsPX/P7nAgNy4K7QTGFAGA4=; b=aCXp60zCEuFyMeQOsHrAI8ntPjOGCNKr3pAw5gJ6FIjHjVS0Q/DA4e9gkPZ5INdgUh uwEIOYfIVVe1ux4uCtzbMOCJirZlKznXy48NqA/BeL1X2hImLB+RlsdUna3s//zlAzFX wIar/9TspeEGz5g9NQjrwgR52v4azdgxY9v5IirfrNnjduKyrzcbk7i+T1G3I5zMHFeY RyHAtjSr3ljs6SrgOt05XlIOzLitQlgWHsCBKBkbqeSUn8WlRh/eGG15kLZ2sCfiZCVc EcA2d6gz649pLFL89thDdWVq9rywQgH8bxTXw0XnsBi8y75BWt+ET9IXhA0Gyv3Hs426 N+Rg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id e65-20020a255044000000b00da054e1862esi1128216ybb.639.2023.10.26.19.43.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Oct 2023 19:43:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id DB83C82990E9; Thu, 26 Oct 2023 19:43:54 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229644AbjJ0Cnl (ORCPT + 99 others); Thu, 26 Oct 2023 22:43:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42586 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229437AbjJ0Cnk (ORCPT ); Thu, 26 Oct 2023 22:43:40 -0400 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 66E5CC4; Thu, 26 Oct 2023 19:43:37 -0700 (PDT) Received: from kwepemm000003.china.huawei.com (unknown [172.30.72.53]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4SGn2v387cz1L9K2; Fri, 27 Oct 2023 10:40:39 +0800 (CST) Received: from [10.67.111.205] (10.67.111.205) by kwepemm000003.china.huawei.com (7.193.23.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Fri, 27 Oct 2023 10:43:33 +0800 Subject: Re: [PATCH] perf evsel: Rename evsel__increase_rlimit to rlimit__increase_nofile To: Namhyung Kim , Arnaldo Carvalho de Melo CC: , , , , , , , , References: <20231023033144.1011896-1-yangjihong1@huawei.com> From: Yang Jihong Message-ID: <3458c302-8c43-51e5-f45b-c18657fa7015@huawei.com> Date: Fri, 27 Oct 2023 10:43:32 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.111.205] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To kwepemm000003.china.huawei.com (7.193.23.66) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.1 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Thu, 26 Oct 2023 19:43:55 -0700 (PDT) Hello, On 2023/10/27 6:08, Namhyung Kim wrote: > Hi Arnaldo, > > On Thu, Oct 26, 2023 at 12:47 PM Arnaldo Carvalho de Melo > wrote: >> >> Em Mon, Oct 23, 2023 at 03:31:44AM +0000, Yang Jihong escreveu: >>> evsel__increase_rlimit() helper does nothing with evsel, and description >>> of the functionality is inaccurate, rename it and move to util/rlimit.c. >> >>> By the way, fix a checkppatch warning about misplaced license tag: >> >>> WARNING: Misplaced SPDX-License-Identifier tag - use line 1 instead >>> #160: FILE: tools/perf/util/rlimit.h:3: >>> /* SPDX-License-Identifier: LGPL-2.1 */ >> >>> No functional change. >> >> Please run 'perf test' before sending patches upstream, I'm checking if >> what is in perf-tools-next/perf-tools-next is building and I noticed >> this: >> >> ⬢[acme@toolbox perf-tools-next]$ perf test -v python >> Couldn't bump rlimit(MEMLOCK), failures may take place when creating BPF maps, etc >> 14: 'import perf' in python : >> --- start --- >> test child forked, pid 2912462 >> python usage test: "echo "import sys ; sys.path.insert(0, '/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: rlimit__increase_nofile >> test child finished with -1 >> ---- end ---- >> 'import perf' in python: FAILED! >> ⬢[acme@toolbox perf-tools-next]$ >> >> The following patch cures it, Namhyung, can you please fold it and force >> push perf-tools-next/perf-tools-next or let me know if you prefer that I >> submit a patch fixing this separately. > > Thanks for fixing this. I prefer having a separate fix. > Please send it as a formal patch. > Sorry, only rename helper and no function change. I didn't consider the scenario that might affect test python. I've submitted a fix that can be used if needed: https://lore.kernel.org/lkml/20231027023028.1106441-1-yangjihong1@huawei.com/ Also, can we consider identifying this problem at the stage of compiling the perf tool? Thanks, Yang