linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] perf python: Add missing util/rlimit.c file to the python binding linkage list
@ 2023-10-27  2:30 Yang Jihong
  2023-10-27 13:39 ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 2+ messages in thread
From: Yang Jihong @ 2023-10-27  2:30 UTC (permalink / raw)
  To: peterz, mingo, acme, mark.rutland, alexander.shishkin, jolsa,
	namhyung, irogers, adrian.hunter, linux-perf-users, linux-kernel
  Cc: yangjihong1

In commit c4a852635edd ("perf data: Increase RLIMIT_NOFILE limit when open
too many files in perf_data__create_dir()") we started using the
evsel__increase_rlimit() function from util/rlimit.c used
in the python binding, which caused this entry in 'perf test' to fail:

  $ ./perf test python
   19: 'import perf' in python                                         : FAILED!

After:

  $ ./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 1100249
  python usage test: "echo "import sys ; sys.path.insert(0, 'python'); import perf" | '/usr/bin/python3' "
  test child finished with 0
  ---- end ----
  'import perf' in python: Ok

Fixes: c4a852635edd ("perf data: Increase RLIMIT_NOFILE limit when open too many files in perf_data__create_dir()")
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Yang Jihong <yangjihong1@huawei.com>
---
 tools/perf/util/python-ext-sources | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/perf/util/python-ext-sources b/tools/perf/util/python-ext-sources
index 26e1c8d973ea..593b660ec75e 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
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] perf python: Add missing util/rlimit.c file to the python binding linkage list
  2023-10-27  2:30 [PATCH] perf python: Add missing util/rlimit.c file to the python binding linkage list Yang Jihong
@ 2023-10-27 13:39 ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 2+ messages in thread
From: Arnaldo Carvalho de Melo @ 2023-10-27 13:39 UTC (permalink / raw)
  To: Yang Jihong
  Cc: peterz, mingo, mark.rutland, alexander.shishkin, jolsa, namhyung,
	irogers, adrian.hunter, linux-perf-users, linux-kernel

Em Fri, Oct 27, 2023 at 02:30:28AM +0000, Yang Jihong escreveu:
> Fixes: c4a852635edd ("perf data: Increase RLIMIT_NOFILE limit when open too many files in perf_data__create_dir()")

This is not the cset that introduced the problem, I added it to the
patch I submitted for this:

Fixes: e093a222d7cba1eb ("perf evsel: Rename evsel__increase_rlimit to rlimit__increase_nofile")

Since the patch in your messgage basically has what is in the patch I
submitted, I added an:

Acked-by: Yang Jihong <yangjihong1@huawei.com>

to it.

In the future, the right thing would be for you to use:

Reported-by: Arnaldo Carvalho de Melo <acme@redhat.com>

As I didn't provide a Signed-off-by for the patch, I just mentioned that
the patch cured things for me, sometimes a patch like this may not be
the ultimate fix.

Thanks,

- Arnaldo

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-10-27 13:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-27  2:30 [PATCH] perf python: Add missing util/rlimit.c file to the python binding linkage list Yang Jihong
2023-10-27 13:39 ` Arnaldo Carvalho de Melo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).