https://github.com/koute/bytehound Skip to content Navigation Menu Toggle navigation Sign in * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code Explore + All features + Documentation + GitHub Skills + Blog * Solutions For + Enterprise + Teams + Startups + Education By Solution + CI/CD & Automation + DevOps + DevSecOps Resources + Learning Pathways + White papers, Ebooks, Webinars + Customer Stories + Partners * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles Repositories + Topics + Trending + Collections * Pricing Search or jump to... Search code, repositories, users, issues, pull requests... Search [ ] Clear Search syntax tips Provide feedback We read every piece of feedback, and take your input very seriously. [ ] [ ] Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches to filter your results more quickly Name [ ] Query [ ] To see all available qualifiers, see our documentation. Cancel Create saved search Sign in Sign up You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert {{ message }} koute / bytehound Public * Notifications * Fork 176 * Star 4k * A memory profiler for Linux. License Unknown and 2 other licenses found Licenses found Unknown LICENSE Apache-2.0 LICENSE-APACHE MIT LICENSE-MIT 4k stars 176 forks Branches Tags Activity Star Notifications * Code * Issues 35 * Pull requests 9 * Actions * Projects 0 * Security * Insights Additional navigation options * Code * Issues * Pull requests * Actions * Projects * Security * Insights koute/bytehound This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. master BranchesTags Go to file Code Folders and files Last Last Name Name commit commit message date Latest commit History 546 Commits ci ci cli-core cli-core cli cli common common docs docs fast_range_map fast_range_map gather gather integration-tests integration-tests jemallocator jemallocator lz4-compress lz4-compress mimalloc_rust mimalloc_rust preload preload replay replay server-core server-core simulation simulation webui webui .gitattributes .gitattributes .gitignore .gitignore Cargo.lock Cargo.lock Cargo.toml Cargo.toml LICENSE LICENSE LICENSE-APACHE LICENSE-APACHE LICENSE-MIT LICENSE-MIT README.md README.md rust-toolchain rust-toolchain screenshot_graph.png screenshot_graph.png screenshot_gui_group_by_backtrace.png screenshot_gui_group_by_backtrace.png screenshot_gui_memory_usage_graph.png screenshot_gui_memory_usage_graph.png screenshot_gui_scripting_console.png screenshot_gui_scripting_console.png View all files Repository files navigation * README * License * Apache-2.0 license * MIT license Bytehound - a memory profiler for Linux Features * Can be used to analyze memory leaks, see where exactly the memory is being consumed, identify temporary allocations and investigate excessive memory fragmentation * Gathers every allocation and deallocation, along with full stack traces * Can dynamically cull temporary allocations allowing you to profile over a long period of time * Uses a custom, tailor-made stack unwinding implementation which makes it a lot cheaper than other similar tools, potentially up to orders of magnitude faster in some cases * Can export the data it gathered into various different formats; it can export the data as JSON (so you can analyze it yourself if you want), as Heaptrack (so you can use the excellent Heaptrack GUI for analysis) and as a flamegraph * Has its own Web-based GUI which can be used for analysis * Can dynamically stream the profiling data to another machine instead of saving it locally, which is useful for profiling on memory-constrained systems * Supports AMD64, ARM, AArch64 and MIPS64 architectures (where MIPS64 requires a tiny out-of-tree kernel patch for perf_event_open) * Supports profiling of applications which use jemalloc as their allocator (only works on AMD64 with the jemallocator crate) * Supports an embedded DSL based on Rhai to allow for programmatic and/or automated data analysis Screenshots [screenshot] [screenshot] [screenshot] [screenshot] Building 1. Install GCC, Rust nightly (only 1.62 or newer is supported) and the Yarn package manager (for building the GUI) 2. Build it: $ cargo build --release -p bytehound-preload $ cargo build --release -p bytehound-cli 3. Grab the binaries from target/release/libbytehound.so and target/ release/bytehound Usage Basic usage $ export MEMORY_PROFILER_LOG=warn $ LD_PRELOAD=./libbytehound.so ./your_application $ ./bytehound server memory-profiling_*.dat Then open your Web browser and point it at http://localhost:8080 to access the GUI. Documentation You can find the full documentation for the profiler in our Memory profiling for fun and profit book. Enabling full debug logs By default the profiler is compiled with most of its debug logs disabled for performance reasons. To reenable them be sure to recompile it with the debug-logs feature, e.g. like this: $ cd preload $ cargo build --release --features debug-logs License Licensed under either of * Apache License, Version 2.0, (LICENSE-APACHE or http:// www.apache.org/licenses/LICENSE-2.0) * MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT) at your option. Contribution Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions. About A memory profiler for Linux. Topics profiler memory-profiler profiling memory-profiling Resources Readme License Unknown and 2 other licenses found Licenses found Unknown LICENSE Apache-2.0 LICENSE-APACHE MIT LICENSE-MIT Activity Stars 4k stars Watchers 56 watching Forks 176 forks Report repository Releases 12 0.11.0 Latest Nov 23, 2022 + 11 releases Packages 0 No packages published Contributors 8 * @koute * @cengiz-io * @CsatariGergely * @Kobzol * @v0y4g3r * @martynp * @0xflotus * @MangelWare Languages * C 56.2% * Rust 28.1% * Perl 4.5% * JavaScript 3.7% * C++ 3.1% * M4 2.2% * Other 2.2% Footer (c) 2024 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact * Manage cookies * Do not share my personal information You can't perform that action at this time.