Skip to content

Profiling Numpy with --native #815

@ryandeng1

Description

@ryandeng1

Hi,

I am trying to profile numpy with py-spy, and I am running into some issues where the flamegraph doesn't show any of the C functions being called. I compiled numpy with debug symbols, by following the instructions here: https://numpy.org/devdocs/dev/development_advanced_debugging.html, and I also tried exporting CFLAGS/CXXFLAGS as an environment variable when building.

I made sure that the symbols are global symbols (running nm -D on the relevant .so file and function that gets called shows a capital T, so the symbol should be global instead of local to the library).

However, on the flamegraph I only see something like this, where anything called by numpy shows only question marks. I made sure to install py-spy with libunwind, and even tried to change the visibility of the function being called, but nothing has seemed to work.

Image

I'm wondering if anyone here has been able to profile numpy functions using native to see what's going on in the C code that gets called by numpy.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions