iovisor / iovisor/bcc

PyPerf requires libpython.so (does not work with a "normal" python invocation).

Open
#4,009 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
22.7k
Forks
4.1k
Avg merge
5d 13h
Merged PRs (30d)
3

Description

It appears that `examples/cpp/pyperf/PyPerf` requires that a python program be "embedded" into a C program such that when it is running, it maps in libpython.so [1]. (Perhaps there is another way to have a Python program map in libpython?) Can it be made to work both with libpython and "just" python.

[1] Looking at the following line of code, `PyPerfUtil.cc:94`:
```
const static std::string kPy36LibName = "libpython3.6";
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with examples/cpp/pyperf/PyPerf and PyPerfUtil.cc:94, then reproduce the issue using a normal Python invocation and an embedded interpreter. Trace how PyPerf detects or loads Python, and verify that the example works in both modes without requiring libpython.so.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, python
Domain
performance, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.