GithubHelp home page GithubHelp logo

jdkschang / bytehound Goto Github PK

View Code? Open in Web Editor NEW

This project forked from koute/bytehound

0.0 0.0 0.0 16.2 MB

A memory profiler for Linux.

License: Other

Shell 0.70% JavaScript 3.70% C++ 3.08% Python 0.21% Perl 4.45% C 56.22% Rust 28.12% XSLT 0.01% CSS 0.19% Makefile 0.57% HTML 0.01% CMake 0.50% M4 2.19% WebAssembly 0.04%

bytehound's Introduction

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

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

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.

bytehound's People

Contributors

koute avatar csatarigergely avatar cengiz-io avatar 0xflotus avatar kobzol avatar martynp avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.