{"id":13880544,"url":"https://github.com/javierhonduco/rbperf","last_synced_at":"2025-06-22T20:07:53.160Z","repository":{"id":41523018,"uuid":"510016042","full_name":"javierhonduco/rbperf","owner":"javierhonduco","description":"Low-overhead sampling profiler and tracer for Ruby implemented in BPF","archived":false,"fork":false,"pushed_at":"2024-04-21T14:15:13.000Z","size":1995,"stargazers_count":116,"open_issues_count":8,"forks_count":5,"subscribers_count":10,"default_branch":"main","last_synced_at":"2024-04-24T03:48:14.145Z","etag":null,"topics":["bpf","flamegraph","performance","profilers","ruby","tracer"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/javierhonduco.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-07-03T12:24:39.000Z","updated_at":"2024-05-05T02:36:47.638Z","dependencies_parsed_at":"2024-05-05T02:36:33.880Z","dependency_job_id":"b74404be-b3a0-481c-be6c-e90cd9b4c2c0","html_url":"https://github.com/javierhonduco/rbperf","commit_stats":{"total_commits":107,"total_committers":7,"mean_commits":"15.285714285714286","dds":"0.14018691588785048","last_synced_commit":"fc31fb4c0c0cf23b1c44047b666ac502c7c05e90"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/javierhonduco/rbperf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javierhonduco%2Frbperf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javierhonduco%2Frbperf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javierhonduco%2Frbperf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javierhonduco%2Frbperf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/javierhonduco","download_url":"https://codeload.github.com/javierhonduco/rbperf/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javierhonduco%2Frbperf/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261358639,"owners_count":23146671,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bpf","flamegraph","performance","profilers","ruby","tracer"],"created_at":"2024-08-06T08:03:09.141Z","updated_at":"2025-06-22T20:07:48.147Z","avatar_url":"https://github.com/javierhonduco.png","language":"Rust","funding_links":[],"categories":["Projects Related to eBPF","Rust","Ruby specific","eBPF 相关项目"],"sub_categories":["Observability","可观测性"],"readme":"rbperf\n======\n\n`rbperf` is a low-overhead sampling profiler and tracer for Ruby (CRuby) which runs in BPF\n\n## Features\n\nThe main goals for rbperf are\n\n- On-CPU profiling support\n- Low overhead\n- Profiled processes don't have to be restarted or modified in any way\n- Support for tracing low level events, such as system calls\n\n\n## Installation\n\nThe latest release of is available [here](https://github.com/javierhonduco/rbperf/releases/latest).\n\n\n## Usage\n\n### CPU sampling\n\n```\n$ sudo rbperf record --pid `pidof ruby` cpu\n```\n\n### System call tracing\n\nThe available system calls to trace can be found with:\n\n```\n$ sudo rbperf record --pid `pidof ruby` syscall --list\n```\n\n```\n$ sudo rbperf record --pid `pidof ruby` syscall enter_writev\n```\n\nSome debug information will be printed, and a flamegraph called `rbperf_flame_$date` will be written to disk 🎉\n\n## Supported Ruby versions\n\nThe currently supported Ruby versions:\n- **2.6**: 2.6.0, 2.6.3\n- **2.7**: 2.7.1, 2.7.4, 2.7.6\n- **3.x**: 3.0.0, 3.0.4, 3.1.2, 3.1.3, 3.2.0, 3.2.1\n\n## Supported kernels\n\nLinux kernel 4.18 is the minimum required version but 5.x and greater is recommended.\n\n## Building\n\nTo build `rbperf` you would need a modern Linux machine with:\n- The Rust toolchain\n- `clang` to compile the BPF code\n- `elfutils` and `zlib` installed\n- `make` and `pkg-config` to build libbpf\n\nOnce the dependencies are installed:\n```shell\n# As we are statically linking elfutils and zlib, we have to tell Rustc\n# where are they located. On my Ubuntu system they are under\n$ export RUSTFLAGS='-L /usr/lib/x86_64-linux-gnu'\n$ cargo build [--release]\n```\n\nThe built binary can be found under `target/(debug|release)/rbperf`.\n\n## Developing and troubleshooting\n\nDebug logs can be enabled with `RUST_LOG=debug`. The info subcommand, `rbperf info` shows the supported BPF features as well as other supported details.\n\n\n## Stability\n\n`rbperf` is in active development and the CLI and APIs might change any time\n\n## Bugs\n\nIf you encounter any bugs, feel free to open an issue on rbperf's [repo](https://github.com/javierhonduco/rbperf)\n\n## Acknowledgements\n\n`rbperf` wouldn't be possible without all the open source projects that we benefit from, such as Rust and all the superb crates we use in this project, Ruby and its [GDB file](https://github.com/ruby/ruby/blob/master/.gdbinit), the BPF ecosystem, and many others!\n\n## License\n\nLicensed under the MIT license\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjavierhonduco%2Frbperf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjavierhonduco%2Frbperf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjavierhonduco%2Frbperf/lists"}