{"id":28092531,"url":"https://github.com/emin017/gperf2flamegraph","last_synced_at":"2025-05-13T13:19:24.377Z","repository":{"id":284685927,"uuid":"955735471","full_name":"Emin017/gperf2flamegraph","owner":"Emin017","description":"A tool for converting Google gperftools profiler output to FlameGraph visualization format","archived":false,"fork":false,"pushed_at":"2025-05-13T02:16:45.000Z","size":80,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-13T13:19:22.248Z","etag":null,"topics":["flamegraph","flamegraphs","gperf","gperftools","rust","rust-lang"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mulanpsl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Emin017.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"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,"zenodo":null}},"created_at":"2025-03-27T05:39:15.000Z","updated_at":"2025-05-13T02:16:42.000Z","dependencies_parsed_at":"2025-05-01T09:33:23.620Z","dependency_job_id":null,"html_url":"https://github.com/Emin017/gperf2flamegraph","commit_stats":null,"previous_names":["emin017/gperf2flamegraph"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Emin017%2Fgperf2flamegraph","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Emin017%2Fgperf2flamegraph/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Emin017%2Fgperf2flamegraph/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Emin017%2Fgperf2flamegraph/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Emin017","download_url":"https://codeload.github.com/Emin017/gperf2flamegraph/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253948510,"owners_count":21988962,"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":["flamegraph","flamegraphs","gperf","gperftools","rust","rust-lang"],"created_at":"2025-05-13T13:19:23.479Z","updated_at":"2025-05-13T13:19:24.369Z","avatar_url":"https://github.com/Emin017.png","language":"Rust","readme":"# ✨ gperf2flamegraph (g2f) ✨\n\n\u003cdiv align=\"center\"\u003e\n\u003cimg alt=\"GitHub\" src=\"https://img.shields.io/badge/github-%23121011.svg?style=for-the-badge\u0026amp;logo=github\u0026amp;logoColor=white\"\u003e\n\u003cimg alt=\"Rust\" src=\"https://img.shields.io/badge/rust-%23000000.svg?style=for-the-badge\u0026amp;logo=rust\u0026amp;logoColor=white\"\u003e\n\u003cimg alt=\"Flamegraph\" src=\"https://img.shields.io/badge/flamegraph-%23FF6F61.svg?style=for-the-badge\u0026amp;logo=flamegraph\u0026amp;logoColor=white\"\u003e\n\u003cimg alt=\"Gprof\" src=\"https://img.shields.io/badge/gprof-%23FF6F61.svg?style=for-the-badge\u0026amp;logo=gprof\u0026amp;logoColor=white\"\u003e\n\n![GitHub](https://img.shields.io/github/license/Emin017/gperf2flamegraph)\n![GitHub workflows](https://img.shields.io/github/actions/workflow/status/Emin017/gperf2flamegraph/build.yml)\n![GitHub issues](https://img.shields.io/github/issues/Emin017/gperf2flamegraph)\n![GitHub pull requests](https://img.shields.io/github/issues-pr/Emin017/gperf2flamegraph)\n![GitHub release (latest by date)](https://img.shields.io/github/v/release/Emin017/gperf2flamegraph)\n\n![GitHub stars](https://img.shields.io/github/stars/Emin017/gperf2flamegraph?style=social)\n![GitHub forks](https://img.shields.io/github/forks/Emin017/gperf2flamegraph?style=social)\n\n[![English](https://img.shields.io/badge/English-README-2ea44f?style=for-the-badge)](README.md)\n\u003c!-- [![中文](https://img.shields.io/badge/中文-介绍-FF6F61?style=for-the-badge)](README_CN.md) --\u003e\n\u003c/div\u003e\n\nA Rust tool for converting Google [gperftools](https://github.com/gperftools/gperftools) CPU profiler output to [FlameGraph](https://www.brendangregg.com/flamegraphs.html) visualization format.\n\n## 🔥 Features\n\n* 📊 Parse binary output from gperftools CPU profiler\n* 🔍 Resolve symbols with demangling support\n* 🧰 Customizable output options for visualization\n* 📝 Generate text format for debugging or further processing\n* 🚀 Performance optimized with Rust\n\n## 🛠️ Installation\n\nbuild from source:\n```shell\ncargo build --release\n```\n\n## 📖 Usage\nBasic syntax:\n```shell\ng2f \u003cEXECUTABLE\u003e \u003cPROFILE_FILE\u003e [OPTIONS]\n```\n\nParameters\n* `\u003cEXECUTABLE\u003e`: Path to the executable binary that was profiled\n* `\u003cPROFILE_FILE\u003e`: Path to gperftools CPU profiler result file\n\nOptions\n| Option | Description |\n|--------|-------------|\n| `--help` | Show help message |\n| `--svg-output \u003cPATH\u003e`  | Path for SVG flamegraph output |\n| `--text-output \u003cPATH\u003e` | Path for text format output |\n| `--simplify-symbol`\t | Simplify symbol names (remove template/function args) |\n| `--executable-only`\t | Only resolve symbols from the executable (ignore libraries) |\n| `--annotate-libname` | Add library name annotations like `[libname.so]` |\n| `--to-microsecond` | Use microseconds as time unit (default is sample count) |\n| `--flamegraph-path \u003cPATH\u003e` | Path to flamegraph.pl script (default: \"flamegraph.pl\") |\n\n## 🧪 Example\n\n### Basic Usage\n```shell\ng2f \u003cgprof_output_file\u003e \u003coutput_file\u003e\n```\n\n### With Options\n```shell\ng2f \u003cEXECUTABLE\u003e gprof.prof --svg-output gprof.svg --text-output gprof.txt\n```\n\n---\n\n***Note: The generated SVG files are best viewed in a modern browser. For large profiles, consider using the `--simplify-symbol` option to improve readability.***\n## 🔧 Troubleshooting\n### Missing flamegraph.pl\nIf you encounter \"Failed to start flamegraph.pl\" error:\n```shell\n# Option 1: Install FlameGraph and specify path\ngit clone https://github.com/brendangregg/FlameGraph.git\n./g2f myapp cpu.prof --svg-output out.svg --flamegraph-path ./FlameGraph/flamegraph.pl\n\n# Option 2: Add FlameGraph to your PATH\nexport PATH=$PATH:$(pwd)/FlameGraph\n```\n\n### Symbol Resolution Issues\n\nIf you see too many \"???\" unknown symbols:\n\n1. Ensure your binary was compiled with debug information (-g flag)\n2. Check that you're providing the correct executable path\n\n## 🤝 Contributing\nContributions are welcome! Please feel free to submit a [Pull Request](https://github.com/Emin017/gperf2flamegraph/pulls).\n\n## 📄 License\nThis project is licensed under the Mulan PSL v2 License - see the [LICENSE](LICENSE) file for details.\n\n## 🙏 Acknowledgements\nThis project is inspired by [gperftools_flamegraph_profiler](https://github.com/dwangxxx/gperftools_flamegraph_profiler).","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femin017%2Fgperf2flamegraph","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femin017%2Fgperf2flamegraph","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femin017%2Fgperf2flamegraph/lists"}