8000 Add native traces to `RubySpy::get_stack_trace` · Issue #372 · rbspy/rbspy · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Add native traces to RubySpy::get_stack_trace #372
Open
@Maaarcocr

Description

@Maaarcocr

I've been needing to profile a ruby application that uses a variety of ruby extensions (written in C & rust) and also knowing how time is spent in the native extension a lot of the logic resides there.

I've taken inspiration from https://www.benfrederickson.com/profiling-native-python-extensions-with-py-spy/ and their source code to figure out how I could do it with rbspy. I have a prototype that works, and I have 2 questions:

When I get a StackTrace from ruby I also get a thread id, but it does not seem to match any thread id from remoteprocess::Process::threads in RubySpy. Is that expected? Is there a way to get a current thread ID that matches one from remoteprocess?

Would there be any interest in merging this into main here? Right now my changes live in my fork. I've made it such this capability is only turned on if a feature flag is set to true.

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

      0