[PATCH] perf python: Add missing util/rlimit.c file to the python binding linkage list

Yang Jihong posted 1 patch 2 years, 1 month ago
tools/perf/util/python-ext-sources | 1 +
1 file changed, 1 insertion(+)
[PATCH] perf python: Add missing util/rlimit.c file to the python binding linkage list
Posted by Yang Jihong 2 years, 1 month ago
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