Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp756638rdh; Thu, 26 Oct 2023 15:09:18 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGpgGrx3TdkioXX3okIYbWEPIUJMbHLozC3qa0Wh3y6EonpHmm0R0DlNx56vOCxT0WBj508 X-Received: by 2002:a25:bfc8:0:b0:d9b:417:139c with SMTP id q8-20020a25bfc8000000b00d9b0417139cmr658157ybm.60.1698358158537; Thu, 26 Oct 2023 15:09:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698358158; cv=none; d=google.com; s=arc-20160816; b=SBV5+nc2CGKzNZtwXhyM0r/MHBmOEKlv7sCrWFz+MbYoGcdnUl03CdnhsYnoyh8c9A XqzZjVhZAHLPr3j/9m7LCmgEtul1IPQzjw3vob3SkReZuDVB3O/6B7heH9mYqJP4MC1k rEog7xSkJ3iMvIP/tw1/DwFNUUGHYzRx95Cp7r4SppDHRYS2q228zKey+ciCjhk5Uwbn j9N1DYsp8nws5JIXA/nPUv5gLPzptsG/7J1Mf+XiqqkEyyF59sSZIq1MdxfiNkTZT+IJ Fm/a1rlVQtt+P5KMqiCoIBZfxTEjNE7lLRRUjQ9g9XClXtcv7pxkw1fXkIHLkoOTnAlq aopA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=TmnMq3YTEb3qV6GzTm5t4axci4RvXsfhwZMukHjTzR8=; fh=JvbWgK/3hlBp+HifbNa5lfxappheatMPzED59irhhkc=; b=HX1/ILshZyc0mEmGhw4DYhbLx9OEu7VuYNkzz6L9GKeWmWGJmd3PXD0a77po4IzpPI B8LS1z/J4k3Sfm2e5tpTCmhSaJ8m0Yy3JHdxWjmdNxFBQf9Ko4Tv/5WW3wNH3Qbax9ju tVk5qSuq5YIMJTKESP5bQO2cJSKxK0vN9aH0d7ajNgk89lBx8PJAlZfRD1JYnFGb9h4G r+tvF3nXyeDBQcqaF4GdMwvcbeHu8sPbFiTW09FJygbdweS18J4dMJifUWD695ytZeGb hr2+ftmTgKDH2Y17y/X1B+PxozxSY71BYHve52HWIuPPdiN+jN7ElsmMixNd5I3rL201 D9Kw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id m63-20020a255842000000b00d9a3f9bf7dcsi526350ybb.39.2023.10.26.15.09.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Oct 2023 15:09:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 59230801BF41; Thu, 26 Oct 2023 15:09:15 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232148AbjJZWJJ convert rfc822-to-8bit (ORCPT + 99 others); Thu, 26 Oct 2023 18:09:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57210 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230089AbjJZWJI (ORCPT ); Thu, 26 Oct 2023 18:09:08 -0400 Received: from mail-pj1-f50.google.com (mail-pj1-f50.google.com [209.85.216.50]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD81E91; Thu, 26 Oct 2023 15:09:06 -0700 (PDT) Received: by mail-pj1-f50.google.com with SMTP id 98e67ed59e1d1-27d18475ed4so1241224a91.0; Thu, 26 Oct 2023 15:09:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698358146; x=1698962946; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=aVUcrbGUMw0ppD1wYsBtYUJw806ZaiQ+vq+hatkWY30=; b=j2Hw3NrQhTVzD2LQ52cNRHCHI08u8dN1XGY1eOjAKZga2Ew5hkkP3pSkzKXVV9g9EN cjNjY6KBcNl7rL+lYI4/zjzO0y1v26X5tpa1wXQ0a0ptSi/ITXRcu6rPPewAC9RQIdf0 +r+hhnWcPKHoXu5cqJ5UFUOLeQ6/TDVb10j9Ch0RMPBBFglvIqM162xGuK8O6An5uePz Tg02R7koXtgzeA4ZzUBDfRhJVNfiUEeFIYnLwrA5/q8nPQrSaVMRo7NNKFs0CQWxEHhB GP4W63vnoCJcvKz/lcIc8hMZTBO+/JguWlO4+wAkGgxy5EnIgBcKov0taBQvUf50DdgM Z6EA== X-Gm-Message-State: AOJu0YzjeM3A+6NNtuAxCvvV9wLX6ePZHKKqF3mowv3sI6+8u/Lwusfz MVpGtc5JotVe/AA25vVccHWtzO3xg5tJK4TRnDI= X-Received: by 2002:a17:90b:111:b0:27d:c95:b0ad with SMTP id p17-20020a17090b011100b0027d0c95b0admr857862pjz.21.1698358146005; Thu, 26 Oct 2023 15:09:06 -0700 (PDT) MIME-Version: 1.0 References: <20231023033144.1011896-1-yangjihong1@huawei.com> In-Reply-To: From: Namhyung Kim Date: Thu, 26 Oct 2023 15:08:54 -0700 Message-ID: Subject: Re: [PATCH] perf evsel: Rename evsel__increase_rlimit to rlimit__increase_nofile To: Arnaldo Carvalho de Melo Cc: Yang Jihong , peterz@infradead.org, mingo@redhat.com, mark.rutland@arm.com, alexander.shishkin@linux.intel.com, jolsa@kernel.org, irogers@google.com, adrian.hunter@intel.com, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, 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 howler.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 (howler.vger.email [0.0.0.0]); Thu, 26 Oct 2023 15:09:15 -0700 (PDT) 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. Thanks, Namhyung > > - Arnaldo > > diff --git a/tools/perf/util/python-ext-sources b/tools/perf/util/python-ext-sources > index 26e1c8d973ea0b95..593b660ec75e24e1 100644 > --- a/tools/perf/util/python-ext-sources > +++ b/tools/perf/util/python-ext-sources > @@ -40,6 +40,7 @@ util/rwsem.c > util/hashmap.c > util/perf_regs.c > util/fncache.c > +util/rlimit.c > util/perf-regs-arch/perf_regs_aarch64.c > util/perf-regs-arch/perf_regs_arm.c > util/perf-regs-arch/perf_regs_csky.c