{"id":13441326,"url":"https://github.com/bpftrace/bpftrace","last_synced_at":"2025-05-16T00:00:31.899Z","repository":{"id":37396810,"uuid":"146842101","full_name":"bpftrace/bpftrace","owner":"bpftrace","description":"High-level tracing language for Linux","archived":false,"fork":false,"pushed_at":"2025-05-08T20:06:06.000Z","size":13045,"stargazers_count":9175,"open_issues_count":227,"forks_count":1375,"subscribers_count":161,"default_branch":"master","last_synced_at":"2025-05-08T22:14:51.631Z","etag":null,"topics":["bcc","bpf","ebpf","kprobes","tracepoints","tracing","uprobes","usdt"],"latest_commit_sha":null,"homepage":"https://bpftrace.org/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bpftrace.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING-TOOLS.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"open_collective":"bpftrace"}},"created_at":"2018-08-31T04:34:44.000Z","updated_at":"2025-05-08T21:14:54.000Z","dependencies_parsed_at":"2023-10-02T07:01:56.516Z","dependency_job_id":"76cfe246-a405-4804-b708-52e0e2a384fb","html_url":"https://github.com/bpftrace/bpftrace","commit_stats":{"total_commits":3402,"total_committers":263,"mean_commits":"12.935361216730039","dds":0.7948265726043504,"last_synced_commit":"4207c8203b95619bf3d76fcd52765fa381abdd95"},"previous_names":["bpftrace/bpftrace","iovisor/bpftrace"],"tags_count":40,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bpftrace%2Fbpftrace","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bpftrace%2Fbpftrace/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bpftrace%2Fbpftrace/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bpftrace%2Fbpftrace/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bpftrace","download_url":"https://codeload.github.com/bpftrace/bpftrace/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253154977,"owners_count":21862623,"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":["bcc","bpf","ebpf","kprobes","tracepoints","tracing","uprobes","usdt"],"created_at":"2024-07-31T03:01:32.598Z","updated_at":"2025-05-08T22:14:55.361Z","avatar_url":"https://github.com/bpftrace.png","language":"C++","funding_links":["https://opencollective.com/bpftrace"],"categories":["C++","Observability","HarmonyOS","\u003ca name=\"cpp\"\u003e\u003c/a\u003eC++"],"sub_categories":["Profiling \u0026 Continuous Performance Analysis","Windows Manager"],"readme":"\u003cp align=\"center\"\u003e\n  \u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"images/bpftrace_Full_Logo-White.svg\"/\u003e\n    \u003cimg alt=\"bpftrace\" src=\"images/bpftrace_Full_Logo-Black.svg\" width=\"60%\"/\u003e\n  \u003c/picture\u003e\n\u003c/p\u003e\n\n[![Build Status](https://github.com/bpftrace/bpftrace/actions/workflows/ci.yml/badge.svg)](https://github.com/bpftrace/bpftrace/actions/workflows/ci.yml)\n[![IRC#bpftrace](https://img.shields.io/badge/IRC-bpftrace-blue.svg)](https://webchat.oftc.net/?channels=bpftrace)\n[![CodeQL](https://github.com/bpftrace/bpftrace/actions/workflows/codeql.yml/badge.svg)](https://github.com/bpftrace/bpftrace/actions/workflows/codeql.yml)\n\nbpftrace is a high-level tracing language for Linux. bpftrace uses LLVM as a backend to compile scripts to [eBPF](https://ebpf.io/what-is-ebpf/)-bytecode and makes use of [libbpf](https://github.com/libbpf/libbpf) and [bcc](https://github.com/iovisor/bcc) for interacting with the Linux BPF subsystem, as well as existing Linux tracing capabilities: kernel dynamic tracing (kprobes), user-level dynamic tracing (uprobes), tracepoints, etc. The bpftrace language is inspired by awk, C, and predecessor tracers such as DTrace and SystemTap. bpftrace was created by [Alastair Robertson](https://github.com/ajor).\n\n- [How to Install and Build](INSTALL.md)\n- [Manual / Reference Guide](man/adoc/bpftrace.adoc)\n- [Tutorial](docs/tutorial_one_liners.md)\n- [Example One-Liners](#example-one-liners)\n- [Videos](https://bpftrace.org/videos)\n- [Tools](tools/README.md)\n- [Release Schedule and Process](docs/release_process.md)\n- [Contribute](CONTRIBUTING.md)\n- [Development](CONTRIBUTING.md#development)\n- [Support](#support)\n- [Migration guide](docs/migration_guide.md)\n- [Probe types](#probe-types)\n- [Plugins](#plugins)\n- [License](#license)\n\n## Example One-Liners\n\nThe following one-liners demonstrate different capabilities:\n\n```\n# Files opened by thread name\nbpftrace -e 'tracepoint:syscalls:sys_enter_open { printf(\"%s %s\\n\", comm, str(args.filename)); }'\n\n# Syscall count by thread name\nbpftrace -e 'tracepoint:raw_syscalls:sys_enter { @[comm] = count(); }'\n\n# Read bytes by thread name:\nbpftrace -e 'tracepoint:syscalls:sys_exit_read /args.ret/ { @[comm] = sum(args.ret); }'\n\n# Read size distribution by thread name:\nbpftrace -e 'tracepoint:syscalls:sys_exit_read { @[comm] = hist(args.ret); }'\n\n# Show per-second syscall rates:\nbpftrace -e 'tracepoint:raw_syscalls:sys_enter { @ = count(); } interval:s:1 { print(@); clear(@); }'\n\n# Trace disk size by PID and thread name\nbpftrace -e 'tracepoint:block:block_rq_issue { printf(\"%d %s %d\\n\", pid, comm, args.bytes); }'\n\n# Count page faults by thread name\nbpftrace -e 'software:faults:1 { @[comm] = count(); }'\n\n# Count LLC cache misses by thread name and PID (uses PMCs):\nbpftrace -e 'hardware:cache-misses:1000000 { @[comm, pid] = count(); }'\n\n# Profile user-level stacks at 99 Hertz for PID 189:\nbpftrace -e 'profile:hz:99 /pid == 189/ { @[ustack] = count(); }'\n\n# Files opened in the root cgroup-v2\nbpftrace -e 'tracepoint:syscalls:sys_enter_openat /cgroup == cgroupid(\"/sys/fs/cgroup/unified/mycg\")/ { printf(\"%s\\n\", str(args.filename)); }'\n```\n\nMore powerful scripts can easily be constructed. See [Tools](tools/README.md) for examples.\n\n\n## Support\n\nFor additional help / discussion, please use our [discussions](https://github.com/bpftrace/bpftrace/discussions) page.\n\nWe are also holding regular [office hours](https://docs.google.com/document/d/1nt010RfL4s4gydhCPSJ-Z5mnFMFuD4NrcpVmUcyvu2E/edit?usp=sharing) open to the public.\n\n## Probe types\n\u003ccenter\u003e\u003ca href=\"images/bpftrace_probes_2018.png\"\u003e\u003cimg src=\"images/bpftrace_probes_2018.png\" border=0 width=700\u003e\u003c/a\u003e\u003c/center\u003e\n\nSee the [Manual](man/adoc/bpftrace.adoc) for more details.\n\n## Plugins\n\nbpftrace has several plugins/definitions, integrating the syntax into your editor.\n\u003c!--- Feel free to add your own plugins below, in alphabetical order --\u003e\n\n- [Emacs](https://gitlab.com/jgkamat/bpftrace-mode)\n- [Vim](https://github.com/mmarchini/bpftrace.vim)\n- [VS Code](https://github.com/bolinfest/bpftrace-vscode)\n- [Bash Completion](https://github.com/scop/bash-completion)\n\n## License\n\nbpftrace is a registered trademark of Alastair Robertson\n\nThe code is licensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbpftrace%2Fbpftrace","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbpftrace%2Fbpftrace","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbpftrace%2Fbpftrace/lists"}