Skip to content

Embedded Python seems not possible to resolve "native" functions #236

@kayhayen

Description

@kayhayen

Hello,

this is Linux with Python2 and Python3 both.

git clone --branch factory https://github.com/Nuitka/Nuitka.git
python2 ./bin/nuitka-run --profile tests/benchmarks/pystone.py 500000 && python -m vmprof.show nuitka-performance.dat
#or if you prefer:
python3 ./bin/nuitka-run --profile tests/benchmarks/pystone3.py 500000 && python3 -m vmprof.show nuitka-performance.dat

I am getting purely native symbols with plausible time distribution. Nuitka is embedding Python here. I am doing this on Debian Linux with both installed Python2 and Python3 with same results. This used to work years ago. When you look at pystone.bin you will find it's not stripped, has debug symbols, and objdump disassambles it just fine with symbols. It writes "nuitka-performance.dat" hard coded.

The way I am implementing it is here: https://github.com/Nuitka/Nuitka/blob/factory/nuitka/build/static_src/HelpersProfiling.c

Basically I am just calling enable with a file number and default arguments. My checking of vmprof code says that on Linux "native" resolution is automatically enabled by default.

Can you tell me what I am doing wrong, or give me a pointer, to where it's attempted to resolve, so I might debug this? My current best guess is that it might be using sys.exectable, which would not be the binary, something like this. Is embedding of Python supported at all anymore? Was it ever, maybe I always used extension modules, not sure now.

Yours,
Kay

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions