javierhonduco / rbperf

Low-overhead sampling profiler and tracer for Ruby for Linux

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Roadmap of potential features and fixes

javierhonduco opened this issue · comments

Some of the things I have planned:

  • UX
    • Better error handling (e.g. when providing a wrong syscall tracepoint name, we don't handle that nicely and the UX is bad) (2abb8c0)
    • Allow running tests and whatnot with cargo (7c14cd0)
    • Add info subcommand to show environmental details that might affect rbperf to aid debugging (e81748a)
  • Quality
  • BPF
    • Logging is enabled by default in the BPF program. This has high overhead and it is not needed most of the time (422c5ca)
    • Evaluate using ring buffers
      • Add it as opt-in (8a1e048)
      • Run some tests to see how it behaviour compares to perf buffers
  • Docs
    • Add a document on architecture, as well as in-depth comments in the BPF code
    • How to debug issues
    • How to add support for Ruby versions

  • New features
    • Binary disk format
    • More output formats (folded stacks, chrome tracing, raw?)
    • Ensure it works in arm64
    • C function tracing, both from cruby or the libraries it dynamically links to (uprobes)

  • Experimental ideas
    • Allocation tracing (w/ mem leak detection)
    • Request-specific data

  • Other
    • Ensure we work with YJIT (asked in https://github.com/Shopify/yjit/. It works so far, but this might change)
    • Add git revision to the future info subcommand and in the BPF's metadata section

  • Release
    • Publish x86_64 binaries

Simplify execution context fetching:

(gdb) p/x ruby_current_vm_ptr->ractor->main_thread->ec
$1 = 0x20729b0
(gdb) p/x ruby_current_ec
$2 = 0x20729b0