[PATCH v1] perf script python: Fix python execution

Ian Rogers posted 1 patch 2 years, 6 months ago
tools/perf/util/python.c | 5 +++++
1 file changed, 5 insertions(+)
[PATCH v1] perf script python: Fix python execution
Posted by Ian Rogers 2 years, 6 months ago
Fix missing symbol seen in:
```
 19: 'import perf' in python                                         :
--- start ---
test child forked, pid 2640936
python usage test: "echo "import sys ; sys.path.insert(0, 'python'); import perf" | '/usr/bin/python3' "
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: tools/perf/python/perf.cpython-311-x86_64-linux-gnu.so: undefined symbol: perf_pmus__supports_extended_type
test child finished with -1
---- end ----
'import perf' in python: FAILED!
```

Signed-off-by: Ian Rogers <irogers@google.com>
---
 tools/perf/util/python.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tools/perf/util/python.c b/tools/perf/util/python.c
index 4eed8ec23994..c29f5f0bb552 100644
--- a/tools/perf/util/python.c
+++ b/tools/perf/util/python.c
@@ -113,6 +113,11 @@ bool evsel__is_aux_event(const struct evsel *evsel __maybe_unused)
 	return false;
 }
 
+bool perf_pmus__supports_extended_type(void)
+{
+	return false;
+}
+
 /*
  * Add this one here not to drag util/metricgroup.c
  */
-- 
2.41.0.640.ga95def55d0-goog