production heap profiling for the JVM. compatible with google-perftools.

Related tags

Profilers heapster
Overview

Build Status

Heapster

Heapster provides an agent library to do heap profiling for JVM processes with output compatible with Google perftools. The goal of Heapster is to be able to do meaningful (sampled) heap profiling in a production setting.

Currently it allows for profiling similar to the TCMalloc library, e.g.:

$ HEAPSTER_PROFILE=/tmp/OUT java -agentlib:heapster Test
$ pprof /tmp/OUT
Welcome to pprof!  For help, type 'help'.
(pprof) top
Total: 2001520 samples
 2000024  99.9%  99.9%  2000048  99.9% LTest;main
    1056   0.1% 100.0%     1056   0.1% Ljava/lang/Object;
     296   0.0% 100.0%      296   0.0% Ljava/lang/String;toCharArray
     104   0.0% 100.0%      136   0.0% Ljava/lang/Shutdown;

By default, Heapster samples every 512 kB, this can be changed with the environment variable HEAPSTER_SAMPLE_PERIOD (in bytes).

This is still work in progress.

Installation (Example)

$ make
$ cp libheapster.dylib /usr/local/lib/

Twitter Server Integration

If you use Twitter Server, and run your program with heapster, you can generate runtime heap profiles like so:

$ curl 'localhost:9990/admin/pprof/heap?pause=10&sample_period=1024' > /tmp/prof

This will collect heap growth for 10 seconds, with a sampling period of 1kB.

Comments
  • Remove agent's dependency on Heapster.class

    Remove agent's dependency on Heapster.class

    Add support to build Heapster (using the flag USE_DEFINECLASS) to not depend on an external helper class. This simplifies redistribution. In such a build specifying a boot class path (-Xbootclasspath/a) is not necessary.

    opened by kaushiks 5
  • Fixed deadlock.

    Fixed deadlock.

    Don't call JVMTI method when holding monitor_. This prevents a deadlock where a jvmti method is blocked on a safepoint and the VM thread calls ObjectFree deadlocking when trying to acquire monitor_.

    opened by varming 1
  • Deadlock between gc safepoint and DumpProfile

    Deadlock between gc safepoint and DumpProfile

    DumpProfile acquire monitor_ and make calls to JVMTI. Those calls block when a safepoint happens. The VM thread calls ObjectFree inside the safepoint and it deadlocks when trying to acquire monitor_.

    opened by varming 1
  • Update Readme Build, Links, Installation, and Usage

    Update Readme Build, Links, Installation, and Usage

    I'm currently updating the Twitter Server docs, and considering we have a heapster example in them I though I would make sure that things were up to date if possible.

    opened by ryanoneill 1
  • Fix the build on Linux

    Fix the build on Linux

    • Linux requires unistd.h for the write(2) and close(2) syscalls.
    • The proper shared object suffix on Linux is "so"; even for JNI bindings.
    • Ignore all *.so files.
    • Remove -mimpure-text; this is irrelevant on non-SPARC targets... check for SPARC, if this is necessary.
    opened by bitbckt 0
Owner
marius a. eriksen
marius a. eriksen
Sampling CPU and HEAP profiler for Java featuring AsyncGetCallTrace + perf_events

async-profiler This project is a low overhead sampling profiler for Java that does not suffer from Safepoint bias problem. It features HotSpot-specifi

null 5.8k Jan 3, 2023
Turn -XX:+TraceBytecodes output into a FlameGraph compatible stack format

A tool to turn the output of -XX:+TraceBytecodes (a JDK debug-only feature to print every bytecode executed by the interpreter) into a simple stack fo

Claes Redestad 34 Dec 11, 2022
Get Method Sampling from Java Flight Recorder Dump and convert to FlameGraph compatible format.

Note: Travis has removed the support for Oracle JDK 8. Therefore the build status is removed temporarily. Converting JFR Method Profiling Samples to F

M. Isuru Tharanga Chrishantha Perera 248 Dec 16, 2022
Tools for tracking down memory / JVM problems & generating predictable-as-possible VM behaviour

Hawkshaw Tools for tracking down memory / JVM problems & generating predictable-as-possible VM behaviour You can Use Hawkshaw to mimic application obj

Martijn Verburg 40 Jan 9, 2021
JVM Profiler Sending Metrics to Kafka, Console Output or Custom Reporter

Uber JVM Profiler Uber JVM Profiler provides a Java Agent to collect various metrics and stacktraces for Hadoop/Spark JVM processes in a distributed w

Uber Common 1.7k Dec 22, 2022
Sends stacktrace-level performance data from a JVM process to Riemann.

Riemann JVM Profiler riemann-jvm-profiler is a JVM agent that you can inject into any JVM process--one written in Clojure, Java, Scala, Groovy, etc.--

Riemann 288 Sep 21, 2022
Simple JVM Profiler Using StatsD and Other Metrics Backends

statsd-jvm-profiler statsd-jvm-profiler is a JVM agent profiler that sends profiling data to StatsD. Inspired by riemann-jvm-profiler, it was primaril

Etsy, Inc. 330 Oct 30, 2022
A driver to allow deep interaction with the JVM without any restrictions

ToolFactory JVM Driver A driver to allow deep interaction with the JVM without any restrictions. To include ToolFactory JVM Driver in your projects si

ToolFactory 34 Oct 8, 2022
Kotlin-decompiled - (Almost) every single language construct of the Kotlin programming language compiled to JVM bytecode and then decompiled to Java again for better readability

Kotlin: Decompiled (Almost) every single language construct of the Kotlin programming language compiled to JVM bytecode and then decompiled to Java ag

The Self-Taught Software Engineer 27 Dec 14, 2022
Jazzer is a coverage-guided, in-process fuzzer for the JVM platform developed by Code Intelligence

Jazzer is a coverage-guided, in-process fuzzer for the JVM platform developed by Code Intelligence. It is based on libFuzzer and brings many of its instrumentation-powered mutation features to the JVM.

Code Intelligence 696 Jan 5, 2023
Dynamic loading and compiling project based on JVM

camphor 基于jvm的弹性加载及编译中间件(Elastic loading and compiling middleware based on JVM) camphor_0.0.1 项目简介 该项目定位为弹性中间件,能够使系统在不重启的情况下完成增量代码文件的动态编译和加载 模块介绍 camp

palading 1 Jan 22, 2022
JavaOTTF - Official OTTF parser and composer for JVM languages

JavaOTTF Official OTTF parser and composer for JVM languages. Documentation Please refer to the Wiki Section. Installation Maven Add repository into p

Open Timetable 2 Nov 21, 2022
chardetng for the JVM

chardetng_j This is chardetng compiled for the JVM using asmble. Licensing Please see the file named COPYRIGHT. TL;DR: Apache-2.0 OR MIT Disclaimer Th

Henri Sivonen 1 Oct 18, 2021
JVM Explorer is a Java desktop application for browsing loaded class files inside locally running Java Virtual Machines.

JVM Explorer JVM Explorer is a Java desktop application for browsing loaded class files inside locally running Java Virtual Machines. Features Browse

null 109 Nov 30, 2022
Small set of tools for JVM troublshooting, monitoring and profiling.

Swiss Java Knife (SJK) SJK is a command line tool for JVM diagnostic, troubleshooting and profiling. SJK exploits standard diagnostic interfaces of JV

Alexey Ragozin 3.2k Jan 3, 2023
Tencent Kona JDK11 is a no-cost, production-ready distribution of the Open Java Development Kit (OpenJDK), Long-Term Support(LTS) with quarterly updates. Tencent Kona JDK11 is certified as compatible with the Java SE standard.

Tencent Kona JDK11 Tencent Kona JDK11 is a no-cost, production-ready distribution of the Open Java Development Kit (OpenJDK), Long-Term Support(LTS) w

Tencent 268 Dec 16, 2022
Spring-boot application to demo JVM HEAP and Native memory leak

Description This repo can be used as demo repo for finding memory leaks. Example spring-boot project to show how to find and fix JVM HEAP memory leak

Iranna Nk 4 Jul 22, 2022
Google Mr4c GNU Lesser 3 Google Mr4c MR4C is an implementation framework that allows you to run native code within the Hadoop execution framework. License: GNU Lesser 3, .

Introduction to the MR4C repo About MR4C MR4C is an implementation framework that allows you to run native code within the Hadoop execution framework.

Google 911 Dec 9, 2022
MapDB provides concurrent Maps, Sets and Queues backed by disk storage or off-heap-memory. It is a fast and easy to use embedded Java database engine.

MapDB: database engine MapDB combines embedded database engine and Java collections. It is free under Apache 2 license. MapDB is flexible and can be u

Jan Kotek 4.6k Dec 30, 2022