Showing preview only (1,774K chars total). Download the full file or copy to clipboard to get everything.
Repository: async-profiler/async-profiler
Branch: master
Commit: 8d653dd5e0f7
Files: 365
Total size: 1.6 MB
Directory structure:
gitextract_mgjkhml2/
├── .assets/
│ └── html/
│ └── flamegraph.html
├── .clang-tidy
├── .gitattributes
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug-report.yml
│ │ ├── config.yml
│ │ ├── documentation.yml
│ │ └── feature-request.yml
│ ├── PULL_REQUEST_TEMPLATE.md
│ └── workflows/
│ ├── build.yml
│ ├── clang-tidy-review.yml
│ ├── code-check.yml
│ ├── integ.yml
│ ├── linters.yml
│ └── test-and-publish-nightly.yml
├── .gitignore
├── .licenserc.yaml
├── CHANGELOG.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── Makefile
├── README.md
├── SECURITY.md
├── docker/
│ ├── alpaquita.Dockerfile
│ ├── alpine.Dockerfile
│ ├── amazonlinux2.Dockerfile
│ ├── amazonlinux2023.Dockerfile
│ ├── code-check.Dockerfile
│ └── debian.Dockerfile
├── docs/
│ ├── AdvancedStacktraceFeatures.md
│ ├── ConverterUsage.md
│ ├── CpuSamplingEngines.md
│ ├── FlamegraphInterpretation.md
│ ├── GettingStarted.md
│ ├── Heatmap.md
│ ├── IntegratingAsyncProfiler.md
│ ├── JfrVisualization.md
│ ├── OutputFormats.md
│ ├── ProfilerOptions.md
│ ├── ProfilingInContainer.md
│ ├── ProfilingModes.md
│ ├── ProfilingNonJavaApplications.md
│ ├── StackWalkingModes.md
│ └── Troubleshooting.md
├── pom-converter.xml
├── pom.xml
├── src/
│ ├── allocTracer.cpp
│ ├── allocTracer.h
│ ├── api/
│ │ └── one/
│ │ └── profiler/
│ │ ├── Agent.java
│ │ ├── AsyncProfiler.java
│ │ ├── AsyncProfilerMXBean.java
│ │ ├── Counter.java
│ │ ├── Events.java
│ │ └── MANIFEST.MF
│ ├── arch.h
│ ├── arguments.cpp
│ ├── arguments.h
│ ├── asprof.cpp
│ ├── asprof.h
│ ├── callTraceStorage.cpp
│ ├── callTraceStorage.h
│ ├── chk.cpp
│ ├── codeCache.cpp
│ ├── codeCache.h
│ ├── converter/
│ │ └── one/
│ │ ├── convert/
│ │ │ ├── Arguments.java
│ │ │ ├── BidirectionalIndex.java
│ │ │ ├── CallStack.java
│ │ │ ├── Classifier.java
│ │ │ ├── FlameGraph.java
│ │ │ ├── Frame.java
│ │ │ ├── Index.java
│ │ │ ├── JfrConverter.java
│ │ │ ├── JfrToFlame.java
│ │ │ ├── JfrToHeatmap.java
│ │ │ ├── JfrToOtlp.java
│ │ │ ├── JfrToPprof.java
│ │ │ ├── Main.java
│ │ │ ├── OtlpConstants.java
│ │ │ ├── ResourceProcessor.java
│ │ │ └── TimeIntervals.java
│ │ ├── heatmap/
│ │ │ ├── Heatmap.java
│ │ │ ├── HtmlOut.java
│ │ │ ├── HuffmanEncoder.java
│ │ │ ├── LzNodeTree.java
│ │ │ ├── Method.java
│ │ │ ├── SampleList.java
│ │ │ ├── StackStorage.java
│ │ │ └── SynonymTable.java
│ │ ├── jfr/
│ │ │ ├── ClassRef.java
│ │ │ ├── Dictionary.java
│ │ │ ├── DictionaryInt.java
│ │ │ ├── Element.java
│ │ │ ├── JfrClass.java
│ │ │ ├── JfrField.java
│ │ │ ├── JfrReader.java
│ │ │ ├── MethodRef.java
│ │ │ ├── StackTrace.java
│ │ │ └── event/
│ │ │ ├── AllocationSample.java
│ │ │ ├── CPULoad.java
│ │ │ ├── ContendedLock.java
│ │ │ ├── Event.java
│ │ │ ├── EventAggregator.java
│ │ │ ├── EventCollector.java
│ │ │ ├── ExecutionSample.java
│ │ │ ├── GCHeapSummary.java
│ │ │ ├── LiveObject.java
│ │ │ ├── MallocEvent.java
│ │ │ ├── MallocLeakAggregator.java
│ │ │ ├── MethodTrace.java
│ │ │ ├── NativeLockEvent.java
│ │ │ ├── ObjectCount.java
│ │ │ └── ProcessSample.java
│ │ └── proto/
│ │ └── Proto.java
│ ├── cpuEngine.cpp
│ ├── cpuEngine.h
│ ├── ctimer.h
│ ├── ctimer_linux.cpp
│ ├── demangle.cpp
│ ├── demangle.h
│ ├── dictionary.cpp
│ ├── dictionary.h
│ ├── dwarf.cpp
│ ├── dwarf.h
│ ├── engine.cpp
│ ├── engine.h
│ ├── event.h
│ ├── fdtransfer.h
│ ├── fdtransferClient.h
│ ├── fdtransferClient_linux.cpp
│ ├── flameGraph.cpp
│ ├── flameGraph.h
│ ├── flightRecorder.cpp
│ ├── flightRecorder.h
│ ├── frameName.cpp
│ ├── frameName.h
│ ├── helper/
│ │ └── one/
│ │ └── profiler/
│ │ ├── Instrument.java
│ │ ├── JfrSync.java
│ │ ├── LockTracer.java
│ │ └── Server.java
│ ├── hooks.cpp
│ ├── hooks.h
│ ├── incbin.h
│ ├── index.h
│ ├── instrument.cpp
│ ├── instrument.h
│ ├── itimer.cpp
│ ├── itimer.h
│ ├── j9Ext.cpp
│ ├── j9Ext.h
│ ├── j9ObjectSampler.cpp
│ ├── j9ObjectSampler.h
│ ├── j9StackTraces.cpp
│ ├── j9StackTraces.h
│ ├── j9WallClock.cpp
│ ├── j9WallClock.h
│ ├── jattach/
│ │ ├── jattach.c
│ │ ├── jattach_hotspot.c
│ │ ├── jattach_openj9.c
│ │ ├── psutil.c
│ │ └── psutil.h
│ ├── javaApi.cpp
│ ├── javaApi.h
│ ├── jfrMetadata.cpp
│ ├── jfrMetadata.h
│ ├── launcher/
│ │ └── launcher.sh
│ ├── linearAllocator.cpp
│ ├── linearAllocator.h
│ ├── lockTracer.cpp
│ ├── lockTracer.h
│ ├── log.cpp
│ ├── log.h
│ ├── lookup.cpp
│ ├── lookup.h
│ ├── main/
│ │ ├── fdtransferServer.h
│ │ ├── fdtransferServer_linux.cpp
│ │ └── main.cpp
│ ├── mallocTracer.cpp
│ ├── mallocTracer.h
│ ├── mutex.cpp
│ ├── mutex.h
│ ├── nativeLockTracer.cpp
│ ├── nativeLockTracer.h
│ ├── objectSampler.cpp
│ ├── objectSampler.h
│ ├── os.h
│ ├── os_linux.cpp
│ ├── os_macos.cpp
│ ├── otlp.cpp
│ ├── otlp.h
│ ├── perfEvents.h
│ ├── perfEvents_linux.cpp
│ ├── processSampler.cpp
│ ├── processSampler.h
│ ├── profiler.cpp
│ ├── profiler.h
│ ├── protobuf.cpp
│ ├── protobuf.h
│ ├── res/
│ │ ├── flame.html
│ │ ├── heatmap.html
│ │ └── tree.html
│ ├── rustDemangle.cpp
│ ├── rustDemangle.h
│ ├── safeAccess.cpp
│ ├── safeAccess.h
│ ├── spinLock.h
│ ├── stackFrame.h
│ ├── stackFrame_aarch64.cpp
│ ├── stackFrame_arm.cpp
│ ├── stackFrame_i386.cpp
│ ├── stackFrame_loongarch64.cpp
│ ├── stackFrame_ppc64.cpp
│ ├── stackFrame_riscv64.cpp
│ ├── stackFrame_x64.cpp
│ ├── stackWalker.cpp
│ ├── stackWalker.h
│ ├── symbols.h
│ ├── symbols_linux.cpp
│ ├── symbols_macos.cpp
│ ├── threadFilter.cpp
│ ├── threadFilter.h
│ ├── threadLocalData.cpp
│ ├── threadLocalData.h
│ ├── trap.cpp
│ ├── trap.h
│ ├── tsc.cpp
│ ├── tsc.h
│ ├── userEvents.cpp
│ ├── userEvents.h
│ ├── vmEntry.cpp
│ ├── vmEntry.h
│ ├── vmStructs.cpp
│ ├── vmStructs.h
│ ├── wallClock.cpp
│ ├── wallClock.h
│ ├── writer.cpp
│ ├── writer.h
│ └── zInit.cpp
└── test/
├── gen/
│ └── opentelemetry-gen-classes.jar
├── native/
│ ├── argumentsTest.cpp
│ ├── demangleTest.cpp
│ ├── instrumentTest.cpp
│ ├── libs/
│ │ ├── callsmalloc.c
│ │ ├── jnimalloc.c
│ │ ├── jninativelocks.c
│ │ ├── jninativestacks.c
│ │ ├── malloc.c
│ │ ├── multiplematching.s
│ │ ├── reladyn.c
│ │ ├── twiceatzero.s
│ │ ├── vaddrdif.c
│ │ └── vaddrdif.ld
│ ├── nativeLockTest.cpp
│ ├── perfEventsLinuxTest.cpp
│ ├── processInfoTest.cpp
│ ├── protobufBufferTest.cpp
│ ├── safeAccessTest.cpp
│ ├── symbolsTest.cpp
│ ├── testRunner.cpp
│ └── testRunner.hpp
├── one/
│ └── profiler/
│ └── test/
│ ├── Arch.java
│ ├── Assert.java
│ ├── Jvm.java
│ ├── Os.java
│ ├── Output.java
│ ├── RunnableTest.java
│ ├── Runner.java
│ ├── SourceCode.java
│ ├── Test.java
│ ├── TestDeclaration.java
│ ├── TestProcess.java
│ ├── TestResult.java
│ ├── TestStatus.java
│ └── Tests.java
├── stubs/
│ └── com/
│ └── google/
│ └── protobuf/
│ ├── ByteString.java
│ ├── CodedInputStream.java
│ ├── GeneratedMessageV3.java
│ ├── InvalidProtocolBufferException.java
│ ├── MessageOrBuilder.java
│ └── ProtocolStringList.java
└── test/
├── alloc/
│ ├── AllocTests.java
│ ├── Hello.java
│ ├── MapReader.java
│ ├── MapReaderOpt.java
│ └── RandomBlockRetainer.java
├── api/
│ ├── ApiTests.java
│ ├── BusyLoops.java
│ ├── DumpCollapsed.java
│ ├── DumpOtlp.java
│ ├── JavaAgent.java
│ ├── MetricsTest.java
│ └── StopResume.java
├── c/
│ ├── CTests.java
│ └── native_api.c
├── comptask/
│ ├── ComptaskTests.java
│ └── Main.java
├── cpu/
│ ├── CpuBurner.java
│ └── CpuTests.java
├── cstack/
│ ├── CstackTests.java
│ └── LongInitializer.java
├── instrument/
│ ├── CpuBurner.java
│ ├── CpuBurnerManyTargets.java
│ ├── InstrumentTests.java
│ ├── MethodTracingStop.java
│ └── Recursive.java
├── jfr/
│ ├── CpuLoad.java
│ ├── JfrCpuProfiling.java
│ ├── JfrMultiModeProfiling.java
│ ├── JfrTests.java
│ └── Ttsp.java
├── jfrconverter/
│ ├── JfrconverterTests.java
│ ├── Tracer.java
│ ├── sample1.collapsed
│ └── sample2.collapsed
├── kernel/
│ ├── KernelTests.java
│ └── ListFiles.java
├── lock/
│ ├── DatagramTest.java
│ └── LockTests.java
├── nativelock/
│ ├── AllNativeLocks.java
│ ├── NativeLock.java
│ ├── NativelockTests.java
│ └── native_lock_contention.c
├── nativemem/
│ ├── CallsAllNoLeak.java
│ ├── CallsMallocCalloc.java
│ ├── CallsRealloc.java
│ ├── Native.java
│ ├── NativememTests.java
│ ├── malloc_plt_dyn.c
│ ├── nativemem_known_lib_crash.c
│ ├── preload_malloc.c
│ └── profile_with_dlopen.c
├── nonjava/
│ ├── JavaClass.java
│ ├── NonjavaTests.java
│ └── non_java_app.cpp
├── otlp/
│ ├── CpuBurner.java
│ ├── OtlpProfileTimeTest.java
│ └── OtlpTests.java
├── pmu/
│ ├── Dictionary.java
│ └── PmuTests.java
├── proc/
│ ├── BasicApp.java
│ ├── CpuIntensiveApp.java
│ ├── IoIntensiveApp.java
│ ├── ManyProcessApp.java
│ ├── MemoryIntensiveApp.java
│ ├── MultiThreadApp.java
│ ├── ProcTests.java
│ └── ShortLivedApp.java
├── recovery/
│ ├── CodingIntrinsics.java
│ ├── Numbers.java
│ ├── RecoveryTests.java
│ ├── StringBuilderTest.java
│ ├── Suppliers.java
│ └── TimeLoop.java
├── smoke/
│ ├── Alloc.java
│ ├── Cpu.java
│ ├── LoadLibrary.java
│ ├── SmokeTests.java
│ └── Threads.java
├── stackwalker/
│ ├── StackGenerator.java
│ └── StackwalkerTests.java
├── vmstructs/
│ └── VmstructsTests.java
├── vtable/
│ └── VtableTests.java
└── wall/
├── BusyClient.java
├── IdleClient.java
├── SocketTest.java
└── WallTests.java
================================================
FILE CONTENTS
================================================
================================================
FILE: .assets/html/flamegraph.html
================================================
<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='utf-8'>
<style>
body {margin: 0; padding: 10px 10px 22px 10px; background-color: #ffffff}
h1 {margin: 5px 0 0 0; font-size: 18px; font-weight: normal; text-align: center}
header {margin: -22px 0 6px 0}
button {border: none; background: none; width: 24px; height: 24px; cursor: pointer; margin: 0; padding: 2px 0 0 0; text-align: center}
button:hover {background-color: #ffffe0; outline: 1px solid #ffc000; border-radius: 4px}
dl {margin: 0 4px 8px 4px}
dt {margin: 1px; padding: 2px 0; font-weight: bold}
dd {margin: 1px; padding: 2px 4px}
dl.frames {float: left; width: 160px}
dl.hotkeys {clear: left; border-top: 1px solid #666666}
dl.hotkeys > dt {float: left; clear: left; width: 158px; margin-right: 4px; text-align: right}
dl.hotkeys > dd {float: left}
p {position: fixed; bottom: 0; margin: 0; padding: 2px 3px 2px 3px; outline: 1px solid #ffc000; display: none; overflow: hidden; white-space: nowrap; background-color: #ffffe0}
a {color: #0366d6}
#legend {padding: 4px; border-radius: 4px; background: #ffffe0; border: 1px solid #666666; display: none}
#hl {position: absolute; display: none; overflow: hidden; white-space: nowrap; pointer-events: none; background-color: #ffffe0; outline: 1px solid #ffc000; height: 15px}
#hl span {padding: 0 3px 0 3px}
#status {left: 0}
#match {right: 0}
#reset {cursor: pointer}
#canvas {width: 100%; height: 576px}
</style>
</head>
<body style='font: 12px Verdana, sans-serif'>
<h1>CPU profile</h1>
<header style='float: left'>
<button id='inverted' title='Invert (I)'><svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 392 392'><path d='M196,36 L316,156 L76,156 Z' fill='#004d80'/><path d='M196,356 L76,236 L316,236 Z' fill='#004d80'/><path d='M196,54 L298,156 L94,156 Z' fill='#ff8d40'/><path d='M196,338 L94,236 L298,236 Z' fill='#40b2ff'/><rect x='94' y='188' width='204' height='16' fill='#004d80'/></svg></button>
<button id='search' title='Search (Ctrl+F)'><svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='-39.3 -39.3 471.1 471.1'><circle cx='147.7' cy='147.8' r='125.9' fill='#fff'/><path fill='#40b2ff' d='M370.7 348.7c0 1.4-1.6 6.3-7.2 12.3-6.2 6.7-12.5 9.8-14.7 9.8h-.1c-19.5-1.6-62-43.2-109.6-106.8 9.2-7.2 17.5-15.5 24.6-24.6 63.6 47.6 105.2 90.2 106.8 109.6z'/><path fill='#ff8d40' d='M208.7 86.9l-14.5 14.5c-17.1 17.1-46.5 5-46.5-19.3V61.6c-49 0-88.4 40.8-86.1 90.2 2 43.9 38.1 80 82 82 49.5 2.3 90.2-37.2 90.2-86.1 0-23.7-9.6-45.2-25.1-60.8z'/><path fill='#004d80' d='M276.1 221c12.3-21.5 19.5-46.5 19.5-73.2C295.6 66.3 229.2.1 147.7.1S0 66.3 0 147.9s66.3 147.7 147.7 147.7c26.6 0 51.5-7.1 73.2-19.5 39.8 53.3 91.9 113.5 126.1 116.4 12.3.5 22.9-6.7 32.8-16.7 5.2-5.6 13.8-16.9 12.8-28.8-2.9-34.1-63.1-86.2-116.4-126.1zM147.7 273.8c-69.5 0-125.9-56.5-125.9-125.9S78.3 21.9 147.7 21.9 273.6 78.4 273.6 147.8s-56.4 126-125.9 126zm215.9 87.2c-6.2 6.7-12.4 9.8-14.7 9.8h-.1c-19.5-1.6-62-43.2-109.6-106.8 9.2-7.2 17.5-15.5 24.6-24.6 63.6 47.6 105.2 90.2 106.8 109.6 0 1.4-1.6 6.3-7.2 12.4z'/></svg></button>
<button id='info'><svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'><circle cx='10' cy='10' r='8' stroke='#004d80' fill='none'/><path d='M10 5.5c-1.25 0-2.25 1-2.25 2.25H9a1.25 1.25 0 0 1 2.5 0c0 .65-.55 1-1 1.2-.7.35-1.25.85-1.25 1.8V11h1.5v-.25c0-.37.29-.65.68-.83.73-.34 1.32-.87 1.32-2.17 0-1.25-1.5-2.25-2.75-2.25' fill='#ff8d40' stroke='#ff8d40' stroke-width='.6' stroke-linecap='round' stroke-linejoin='round'/><circle cx='10' cy='13.5' r='1.2' fill='#ff8d40'/></svg></button>
</header>
<header style='float: right'>Produced by <a href='https://github.com/async-profiler/async-profiler'>async-profiler</a></header>
<div id='legend' style='position: absolute'>
<dl class='frames'>
<dt>Frame types</dt>
<dd style='background-color: #e17d00'>Kernel</dd>
<dd style='background-color: #e15a5a'>Native</dd>
<dd style='background-color: #c8c83c'>C++ (VM)</dd>
<dd style='background-color: #50e150'>Java compiled</dd>
<dd style='background-color: #cce880'>Java compiled by C1</dd>
<dd style='background-color: #50cccc'>Inlined</dd>
<dd style='background-color: #b2e1b2'>Interpreted</dd>
</dl>
<dl class='frames'>
<dt>Allocation profile</dt>
<dd style='background-color: #50cccc'>Allocated class</dd>
<dd style='background-color: #e17d00'>Allocation outside TLAB</dd>
<dt>Lock profile</dt>
<dd style='background-color: #50cccc'>Lock class</dd>
<dt> </dt>
<dt>Search</dt>
<dd style='background-color: #ee00ee'>Matches regexp</dd>
</dl>
<dl class='hotkeys'>
<dt>Click frame</dt><dd>Zoom into frame</dd>
<dt>Ctrl/Alt+Click</dt><dd>Remove stack</dd>
<dt>0</dt><dd>Reset zoom</dd>
<dt>I</dt><dd>Invert graph</dd>
<dt>Ctrl+F</dt><dd>Search</dd>
<dt>N</dt><dd>Next match</dd>
<dt>Shift+N</dt><dd>Previous match</dd>
<dt>Esc</dt><dd>Cancel search</dd>
</dl>
</div>
<canvas id='canvas'></canvas>
<div id='hl'><span></span></div>
<p id='status'></p>
<p id='match'>Matched: <span id='matchval'></span> <span id='reset' title='Clear'>❌</span></p>
<script>
// Copyright The async-profiler authors
// SPDX-License-Identifier: Apache-2.0
'use strict';
let root, px, pattern;
let level0 = 0, left0 = 0, width0 = 0, d = 0;
let nav = [], navIndex, matchval;
let inverted = false;
const U = undefined;
const maxdiff = -1;
const levels = Array(36);
for (let h = 0; h < levels.length; h++) {
levels[h] = [];
}
const canvas = document.getElementById('canvas');
const c = canvas.getContext('2d');
const hl = document.getElementById('hl');
const status = document.getElementById('status');
const canvasWidth = canvas.offsetWidth;
const canvasHeight = canvas.offsetHeight;
canvas.style.width = canvasWidth + 'px';
canvas.width = canvasWidth * (devicePixelRatio || 1);
canvas.height = canvasHeight * (devicePixelRatio || 1);
if (devicePixelRatio) c.scale(devicePixelRatio, devicePixelRatio);
c.font = document.body.style.font;
const palette = [
[0xb2e1b2, 20, 20, 20],
[0x50e150, 30, 30, 30],
[0x50cccc, 30, 30, 30],
[0xe15a5a, 30, 40, 40],
[0xc8c83c, 30, 30, 10],
[0xe17d00, 30, 30, 0],
[0xcce880, 20, 20, 20],
];
function getColor(p) {
const v = Math.random();
return '#' + (p[0] + ((p[1] * v) << 16 | (p[2] * v) << 8 | (p[3] * v))).toString(16);
}
function getDiffColor(diff) {
if (diff === U) return '#ffdd33';
if (diff === 0) return '#e0e0e0';
const v = Math.round(128 * (maxdiff - Math.abs(diff)) / maxdiff) + 96;
return diff > 0 ? 'rgb(255,' + v + ',' + v + ')' : 'rgb(' + v + ',' + v + ',255)';
}
function f(key, level, left, width, inln, c1, int) {
levels[level0 = level].push({level, left: left0 += left, width: width0 = width || width0,
color: maxdiff >= 0 ? getDiffColor(d) : getColor(palette[key & 7]),
title: cpool[key >>> 3],
details: (d ? (d > 0 ? ', +' : ', ') + d : '') + (int ? ', int=' + int : '') + (c1 ? ', c1=' + c1 : '') + (inln ? ', inln=' + inln : '')
});
}
function u(key, width, inln, c1, int) {
f(key, level0 + 1, 0, width, inln, c1, int)
}
function n(key, width, inln, c1, int) {
f(key, level0, width0, width, inln, c1, int)
}
function samples(n) {
return n === 1 ? '1 sample' : n.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') + ' samples';
}
function pct(a, b) {
return a >= b ? '100' : (100 * a / b).toFixed(2);
}
function findFrame(frames, x) {
let left = 0;
let right = frames.length - 1;
while (left <= right) {
const mid = (left + right) >>> 1;
const f = frames[mid];
if (f.left > x) {
right = mid - 1;
} else if (f.left + f.width <= x) {
left = mid + 1;
} else {
return f;
}
}
if (frames[left] && (frames[left].left - x) * px < 0.5) return frames[left];
if (frames[right] && (x - (frames[right].left + frames[right].width)) * px < 0.5) return frames[right];
return null;
}
function removeStack(left, width) {
for (let h = 0; h < levels.length; h++) {
const frames = levels[h], newFrames = [];
for (let i = 0; i < frames.length; i++) {
const f = frames[i];
if (f.left >= left + width) {
f.left -= width;
} else if (f.left + f.width > left) {
if ((f.width -= width) <= 0 && h) continue;
}
newFrames.push(f);
}
levels[h] = newFrames;
}
}
function search(r) {
if (r === true && (r = prompt('Enter regexp to search:', '')) === null) {
return;
}
pattern = r ? RegExp(r) : undefined;
const matched = render(root, nav = []);
navIndex = -1;
document.getElementById('matchval').textContent = matchval = pct(matched, root.width) + '%';
document.getElementById('match').style.display = r ? 'inline-block' : 'none';
}
function render(newRoot, nav) {
if (root) {
c.fillStyle = '#ffffff';
c.fillRect(0, 0, canvasWidth, canvasHeight);
}
root = newRoot || levels[0][0];
px = canvasWidth / root.width;
const x0 = root.left;
const x1 = x0 + root.width;
const marked = [];
function mark(f) {
return marked[f.left] || (marked[f.left] = f);
}
function totalMarked() {
let total = 0;
let left = 0;
Object.keys(marked).sort(function(a, b) { return a - b; }).forEach(function(x) {
if (+x >= left) {
const m = marked[x];
if (nav) nav.push(m);
total += m.width;
left = +x + m.width;
}
});
return total;
}
function drawFrame(f, y) {
if (f.left < x1 && f.left + f.width > x0) {
c.fillStyle = pattern && f.title.match(pattern) && mark(f) ? '#ee00ee' : f.color;
c.fillRect((f.left - x0) * px, y, f.width * px, 15);
if (f.width * px >= 21) {
const chars = Math.floor(f.width * px / 7);
const title = f.title.length <= chars ? f.title : f.title.substring(0, chars - 2) + '..';
c.fillStyle = '#000000';
c.fillText(title, Math.max(f.left - x0, 0) * px + 3, y + 12, f.width * px - 6);
}
if (f.level < root.level) {
c.fillStyle = 'rgba(255, 255, 255, 0.5)';
c.fillRect((f.left - x0) * px, y, f.width * px, 15);
}
}
}
for (let h = 0; h < levels.length; h++) {
const y = inverted ? h * 16 : canvasHeight - (h + 1) * 16;
const frames = levels[h];
for (let i = 0; i < frames.length; i++) {
drawFrame(frames[i], y);
}
}
return totalMarked();
}
function unpack(cpool) {
for (let i = 1; i < cpool.length; i++) {
cpool[i] = cpool[i - 1].substring(0, cpool[i].charCodeAt(0) - 32) + cpool[i].substring(1);
}
}
canvas.onmousemove = function() {
const h = Math.floor((inverted ? event.offsetY : (canvasHeight - event.offsetY)) / 16);
if (h >= 0 && h < levels.length) {
const f = findFrame(levels[h], event.offsetX / px + root.left);
if (f) {
if (f !== root) getSelection().removeAllRanges();
hl.style.left = (Math.max(f.left - root.left, 0) * px + canvas.offsetLeft) + 'px';
hl.style.width = (Math.min(f.width, root.width) * px) + 'px';
hl.style.top = ((inverted ? h * 16 : canvasHeight - (h + 1) * 16) + canvas.offsetTop) + 'px';
hl.firstChild.textContent = f.title;
hl.style.display = 'block';
canvas.title = f.title + '\n(' + samples(f.width) + f.details + ', ' + pct(f.width, levels[0][0].width) + '%)';
canvas.style.cursor = 'pointer';
canvas.onclick = function() {
if ((event.altKey || event.ctrlKey) && h >= root.level && h > 0) {
removeStack(f.left, f.width);
root.width > f.width ? render(root) : render();
} else if (f !== root) {
render(f);
}
canvas.onmousemove();
};
status.textContent = 'Function: ' + canvas.title;
status.style.display = 'inline-block';
return;
}
}
canvas.onmouseout();
}
canvas.onmouseout = function() {
hl.style.display = 'none';
status.style.display = 'none';
canvas.title = '';
canvas.style.cursor = '';
canvas.onclick = null;
}
canvas.ondblclick = function() {
getSelection().selectAllChildren(hl);
}
document.getElementById('inverted').onclick = function() {
inverted = !inverted;
render();
}
document.getElementById('search').onclick = function() {
search(true);
}
document.getElementById('reset').onclick = function() {
search(false);
}
const btnInfo = document.getElementById('info');
const legend = document.getElementById('legend');
btnInfo.onmouseover = function() {
legend.style.left = (btnInfo.offsetLeft + 24) + 'px';
legend.style.top = (btnInfo.offsetTop + 24) + 'px';
legend.style.display = 'block';
}
btnInfo.onmouseout = function() {
legend.style.display = 'none';
}
window.onkeydown = function(event) {
if ((event.ctrlKey || event.metaKey) && event.key === 'f') {
event.preventDefault();
search(true);
return false;
} else if (event.key === 'Escape') {
search(false);
} else if ((event.key === 'n' || event.key === 'N') && nav.length > 0) {
navIndex = (navIndex + (event.shiftKey ? nav.length - 1 : 1)) % nav.length;
render(nav[navIndex]);
document.getElementById('matchval').textContent = matchval + ' (' + (navIndex + 1) + ' of ' + nav.length + ')';
window.scroll(0, inverted ? root.level * 16 : canvasHeight - (root.level + 1) * 16);
canvas.onmousemove();
return false;
} else if (event.key === 'i') {
canvas.onmouseout();
document.getElementById('inverted').onclick();
return false;
} else if (event.key === '0') {
canvas.onmouseout();
root = levels[0][0];
search(false);
return false;
}
}
const cpool = [
'all',
' C2Compiler::compile_method',
'!ompilation::Compilation',
'-compile_java_method',
'5method',
'-emit_code_body',
'&e::Code_Gen',
'+mpile',
')Optimize',
'\'Broker::compiler_thread_loop',
'/invoke_compiler_on_method',
'\'r::compile_method',
'"ntiguousSpace::allocate',
' DefNewGeneration::FastEvacuateFollowersClosure::do_void',
'2collect',
'4py_to_survivor_space',
' GenCollectedHeap::collect_generation',
'2do_collection',
'2satisfy_failed_allocation',
'#eration::promote',
' InstanceKlass::allocate_objArray',
'"terpreterRuntime::anewarray',
' JVM_ArrayCopy',
'!avaThread::run',
'$_sun_nio_ch_FileDispatcherImpl_read0',
' Matcher::match',
'!emAllocator::allocate',
' ObjArrayAllocator::initialize',
'!ffsetTableContigSpace::allocate',
' Parse::Parse',
'\'do_all_blocks',
'*call',
'*one_block',
'/ytecode',
'%Generator::generate',
'!haseCFG::do_global_code_motion',
'*global_code_motion',
'*schedule_late',
'4ocal',
'&haitin::Register_Allocate',
'.Split',
'.build_ifg_physical',
'.elide_copy',
'.interfere_with_live',
'.merge_multidefs',
'.post_allocate_copy_removal',
'%IdealLoop::Dominators',
'0build_and_optimize',
'6loop_early',
';late',
';tree',
'0optimize',
'0remix_address_expressions',
'0split_if_with_blocks',
'D_post',
'Fre',
'&terGVN::optimize',
'.subsume_node',
'.transform_old',
'%Live::add_liveout',
'+compute',
'%MacroExpand::expand_macro_nodes',
'!redictedCallGenerator::generate',
' TenuredGeneration::allocate',
'!hread::call_run',
' VMThread::evaluate_operation',
'*inner_execute',
'*run',
'"_GenCollectForAllocation::doit',
'#Operation::evaluate',
' __GI_read',
'"handle_mm_fault',
'"memcpy_sse2_unaligned_erms',
'%set_avx2_unaligned_erms',
' aci_CopyRight',
'!sm_exc_page_fault',
' clear_huge_page',
'&page_erms',
'&subpage',
'"one3',
'!opy_page_to_iter',
'%user_enhanced_fast_string',
' demo8/FileConverter$$Lambda$3.0x00007ffab9001000.apply',
'<4.0x00007ffab9001240.applyAsInt',
'4Entry.<init>',
':equals',
':hashCode',
'3.convertFile',
';List',
'4main',
'4readInput',
'4saveResult',
'!o_huge_pmd_anonymous_page',
'#syscall_64',
'#user_addr_fault',
' entry_SYSCALL_64_after_hwframe',
'!xc_page_fault',
' filemap_read',
' handle_mm_fault',
' java/io/BufferedReader.fill',
'7readLine',
')yteArrayOutputStream.ensureCapacity',
'>toByteArray',
'>write',
'(DataOutputStream.write',
'>Int',
'>UTF',
'(InputStreamReader.read',
'%lang/Integer.parseInt',
'*String.<init>',
'1decodeASCII',
'1hashCode',
'1length',
'1substring',
'0Latin1.hashCode',
'7newString',
'0UTF16.compress',
'+ystem$2.decodeASCII',
'0.arraycopy',
'*ThreadLocal.get',
'%nio/charset/CharsetDecoder.decode',
')file/Files.readAllLines',
'%util/ArrayList$ArrayListSpliterator.tryAdvance',
'3.add',
'4grow',
'4sort',
'/s.copyOf',
'7Range',
'1sort',
'*Comparator$$Lambda$5.0x00007ffab90494b0.compare',
'4.lambda$comparingInt$7b0bb60$1',
'*HashMap$Node.<init>',
'1.hash',
'2newNode',
'2put',
'5Val',
'2resize',
'.Set.add',
'*TimSort.binarySort',
'2mergeAt',
'7Collapse',
'7ForceCollapse',
'7Hi',
'7Lo',
'2sort',
'*stream/AbstractPipeline.copyInto',
'JWithCancel',
'Bevaluate',
'BwrapAndCopyInto',
'1Collectors$$Lambda$7.0x00007ffab904a268.accept',
'1DistinctOps$1$2.accept',
'Aend',
'1ReduceOps$3ReducingSink.accept',
';ReduceOp.evaluateSequential',
'3ferencePipeline$3$1.accept',
'B.collect',
'CforEachWithCancel',
'1Sink$ChainedReference.end',
'2liceOps$1$1.accept',
'2ortedOps$RefSortingSink.accept',
'Jend',
'!long_disjoint_arraycopy',
' ksys_read',
' new_sync_read',
' oop_arraycopy',
' start_thread',
'!un/nio/ch/ChannelInputStream.read',
'+FileChannelImpl.read',
'/DispatcherImpl.read',
'B0',
'+IOUtil.read',
'6IntoNativeBuffer',
'+Util.getTemporaryDirectBuffer',
')s/StreamDecoder.implRead',
'9read',
'=Bytes',
'+UTF_8$Decoder.decodeArrayLoop',
'?Loop',
' thread_native_entry',
' vfs_read',
'!oid ContiguousSpace::oop_since_save_marks_iterate<DefNewScanClosure>',
'%OopOopIterateDispatch<DefNewScanClosure>::Table::oop_oop_iterate<InstanceKlass, narrowOop>',
'fObjArrayKlass, narrowOop>',
'AYoungerGenClosure>::Table::oop_oop_iterate<InstanceKlass, narrowOop>'
];
unpack(cpool);
n(3,584)
f(635,1,1,178)
u(1323)
u(1428)
u(516)
u(188,70)
u(76)
f(84,7,2,68)
f(12,8,2,63)
u(60)
u(52,36)
f(204,11,3,2)
n(284,7)
u(292)
f(300,13,1,2)
n(308,4)
f(316,11,4,24)
f(324,12,6,2)
n(332,9)
f(348,13,5,4)
f(356,12,4,2)
n(364)
u(340)
f(484,12,2,3)
u(476)
f(68,10,3,23)
f(412,11,2,16)
f(380,12,1,15)
f(372,13,1,3)
n(388,2)
n(396)
n(404)
n(428,5)
f(436,14,1,2)
n(444)
u(420)
f(452,11,2,3)
u(468)
f(460,13,1,2)
f(492,11,2)
u(452)
u(468)
f(276,10,2,4)
u(236)
u(244)
u(260)
u(268)
u(252)
f(500,16,1,3)
f(500,17,1,2)
u(276)
u(236)
u(244)
u(260)
u(268)
u(252)
f(92,8,2,3)
u(20)
u(36)
u(28)
f(44,12,1,2)
f(540,5,2,108)
u(532)
u(524)
u(556)
u(548)
u(148)
u(140)
u(132)
u(116)
u(108)
f(1444,15,12,50)
f(1452,16,1,22)
f(124,17,2,20)
f(156,18,10,8)
f(228,19,2,2)
n(508)
n(605)
u(773)
u(757)
u(789)
u(573)
u(741)
u(613)
u(629)
u(621)
f(579,18,2)
f(1460,16,2,27)
f(124,17,11,16)
f(156,18,13,3)
u(605)
u(773)
u(757)
u(789)
u(573)
u(741)
u(613)
u(629)
u(621)
f(1468,15,3,46)
f(124,16,19,27)
f(100,17,10,4)
n(156,13)
f(228,18,1,2)
n(605,10)
u(773)
u(757)
u(789)
u(573)
u(741)
u(613)
u(629)
f(621,26,1,9)
f(713,1,9,405)
u(697)
u(705,229)
f(1241,4,1,228)
u(1177)
u(1225)
u(1185)
u(1161)
u(1169)
u(1249,107)
f(977,11,2,105)
f(1233,12,2,103,2,0,0)
u(657,13)
f(674,14,4,9,8,0,0)
f(866,15,1,3)
u(866)
f(906,15,3,5,4,0,0)
u(906,3,2,0,0)
u(922)
f(1018,18,1,2)
f(922,16,2)
f(1201,13,2,90,2,0,0)
u(1098,87,57,0,0)
u(1074,87,59,0,0)
u(1057,4)
u(689)
f(890,18,1,3)
f(914,19,1,2)
f(1082,16,2,83,59,1,0)
f(682,17,41,2)
n(1066,17)
u(1050)
f(1089,17,17,23,0,0,2)
f(1265,14,23,3)
u(1273)
u(985)
u(985)
u(993)
u(993)
u(1009)
u(1008)
u(172)
u(164)
u(212)
u(220)
u(587)
u(605)
u(773)
u(757)
u(789)
u(573)
u(741)
u(613)
u(629)
u(621)
f(1257,10,3,121)
u(1209)
u(1257)
u(1281)
f(1001,14,1,117)
u(1025)
u(1153)
u(1105,21,0,1,0)
f(1034,18,13,4)
u(1042)
f(666,20,1,3)
f(1315,18,3,4)
f(1121,17,4,73)
u(1113)
u(1137,16)
f(1034,20,14,2,1,0,0)
u(1042)
f(1145,19,2,57,0,2,1)
f(1033,20,54,3)
u(1042)
u(666)
f(1129,17,3,23)
u(1113)
u(1137)
f(1033,20,18,5,1,0,0)
u(1042)
u(666)
f(1218,14,5,3,1,0,0)
u(1194,3,1,0,0)
u(986,3,1,0,0)
f(985,17,1,2)
u(993)
u(993)
u(1009)
u(1008)
u(172)
u(164)
u(212)
u(220)
f(721,3,2,107)
u(969)
u(969)
f(801,6,4,97)
u(801,97,0,0,1)
f(793,8,77,14)
u(857,14,1,0,0)
u(1393,14,1,0,0)
f(1385,11,1,13)
u(961,3)
u(1417)
u(1409)
u(938)
u(882)
f(1401,12,3,10,2,0,0)
u(1329,10,3,0,0)
u(1329,10,3,0,0)
u(1329,10,3,0,0)
u(1337,10,3,1,0)
f(1361,17,2,8,2,0,0)
u(1361,8,2,0,0)
u(1369,6)
u(1345)
u(1353)
u(195)
u(563)
u(765)
u(749)
f(1301,26,1,5)
u(1437)
f(1309,28,1,4)
u(781)
f(645,30,1,3)
u(653)
f(1378,19,3,2)
u(954)
u(1291)
f(874,8,2,6,5,0,0)
u(874,6,5,0,0)
u(930,6,5,0,0)
f(985,6,6)
u(985)
u(993)
u(993)
u(1009)
u(1008,6,0,1,4)
f(172,12,2,4)
u(164)
u(212)
u(220)
u(587)
f(605,17,1,3)
u(773)
u(757)
u(789)
u(573)
u(741)
u(613)
u(629)
u(621)
f(729,3,3,69,0,2,1)
f(817,4,21,2)
u(1009)
u(945)
u(179)
u(595)
f(842,4,2,8,5,0,0)
f(826,5,1,7,5,0,0)
f(809,6,5,2)
u(1008,2,0,0,1)
f(849,4,2,38)
u(849,38,0,0,2)
f(834,6,12,23,21,0,0)
f(826,7,6,17,15,1,0)
f(898,6,17,3)
search();
</script></body></html>
================================================
FILE: .clang-tidy
================================================
Checks: >
-*,
bugprone-assert-side-effect,
bugprone-bool-pointer-implicit-conversion,
bugprone-chained-comparison,
bugprone-copy-constructor-init,
bugprone-incorrect-roundings,
bugprone-infinite-loop,
bugprone-integer-division,
bugprone-misplaced-operator-in-strlen-in-alloc,
bugprone-misplaced-pointer-arithmetic-in-alloc,
bugprone-misplaced-widening-cast,
bugprone-non-zero-enum-to-bool-conversion,
bugprone-pointer-arithmetic-on-polymorphic-object,
bugprone-posix-return,
bugprone-redundant-branch-condition,
bugprone-return-const-ref-from-parameter,
bugprone-sizeof-container,
bugprone-standalone-empty,
bugprone-string-literal-with-embedded-nul,
bugprone-string-integer-assignment,
bugprone-suspicious-include,
bugprone-suspicious-memset-usage,
bugprone-suspicious-missing-comma,
bugprone-suspicious-realloc-usage,
bugprone-suspicious-semicolon,
bugprone-suspicious-string-compare,
bugprone-swapped-arguments,
bugprone-terminating-continue,
bugprone-too-small-loop-variable,
bugprone-undefined-memory-manipulation,
bugprone-undelegated-constructor,
bugprone-unhandled-self-assignment,
bugprone-unused-raii,
bugprone-unused-return-value,
bugprone-use-after-move,
bugprone-virtual-near-miss,
cppcoreguidelines-misleading-capture-default-by-value,
cppcoreguidelines-pro-type-const-cast,
cppcoreguidelines-slicing,
cert-oop58-cpp,
cert-flp30-c,
misc-confusable-identifiers,
misc-definitions-in-headers,
misc-header-include-cycle,
misc-misplaced-const,
misc-non-copyable-objects,
misc-redundant-expression,
misc-static-assert,
misc-unconventional-assign-operator,
misc-unused-alias-decls,
performance-avoid-endl,
performance-faster-string-find,
performance-for-range-copy,
performance-implicit-conversion-in-loop,
performance-inefficient-algorithm,
performance-inefficient-string-concatenation,
performance-inefficient-vector-operation,
performance-move-const-arg,
performance-move-constructor-init,
performance-no-automatic-move,
performance-noexcept-destructor,
performance-noexcept-move-constructor,
performance-noexcept-swap,
performance-trivially-destructible,
performance-type-promotion-in-math-fn,
performance-unnecessary-copy-initialization,
performance-unnecessary-value-param,
readability-avoid-return-with-void-value,
readability-avoid-unconditional-preprocessor-if,
readability-const-return-type,
readability-container-contains,
readability-container-data-pointer,
readability-container-size-empty,
readability-delete-null-pointer,
readability-duplicate-include,
readability-function-size,
readability-identifier-naming,
readability-misleading-indentation,
readability-misplaced-array-index,
readability-named-parameter,
readability-operators-representation,
readability-qualified-auto,
readability-redundant-access-specifiers,
readability-redundant-casting,
readability-redundant-control-flow,
readability-redundant-declaration,
readability-redundant-function-ptr-dereference,
readability-redundant-preprocessor,
readability-redundant-string-cstr,
readability-redundant-string-init,
readability-reference-to-constructed-temporary,
readability-simplify-subscript-expr,
readability-static-accessed-through-instance,
readability-static-definition-in-anonymous-namespace,
readability-string-compare,
readability-uniqueptr-delete-release,
readability-use-anyofallof,
# TODO: Consider these
# bugprone-switch-missing-default-case
# bugprone-multi-level-implicit-pointer-conversion
# bugprone-branch-clone
# cert-err33-c
# cppcoreguidelines-narrowing-conversions
# cppcoreguidelines-init-variables
# cppcoreguidelines-explicit-virtual-functions
# cppcoreguidelines-special-member-functions
# llvm-include-order
# misc-const-correctness
# modernize-*
# performance-enum-size
# readability-function-cognitive-complexity
# readability-else-after-return
# readability-convert-member-functions-to-static
# readability-math-missing-parentheses
# readability-non-const-parameter
# readability-redundant-member-init
# readability-simplify-boolean-expr
# misc-include-cleaner
# google-explicit-constructor
# cppcoreguidelines-virtual-class-destructor
# readability-make-member-function-const
HeaderFilterRegex: "*"
CheckOptions:
- key: readability-identifier-naming.LocalVariableCase
value: lower_case
- key: readability-identifier-naming.LocalVariableIgnoredRegexp
value: '(KB|Thread|setDaemon|klassOop|nVMs|loadLibrary|getTicksFrequency|counterTime|System|M|R|s_)'
- key: readability-identifier-naming.PrivateMemberPrefix
value: _
- key: readability-identifier-naming.ConstexprVariableCase
value: UPPER_CASE
================================================
FILE: .gitattributes
================================================
*.sh eol=lf
================================================
FILE: .github/ISSUE_TEMPLATE/bug-report.yml
================================================
---
name: "🐛 Bug Report"
description: Report a bug
title: "(short issue description)"
assignees: []
body:
- type: textarea
id: description
attributes:
label: Describe the bug
description: What is the problem? A clear and concise description of the bug.
validations:
required: true
- type: textarea
id: behavior
attributes:
label: Expected vs. actual behavior
description: |
What did you expect to happen? What happened instead?
validations:
required: false
- type: textarea
id: reproduction
attributes:
label: Reproduction Steps
description: |
Step-by-step instructions how to reproduce the issue. Attach a code sample if available.
validations:
required: false
- type: textarea
id: context
attributes:
label: Additional Information/Context
description: |
Anything else that might be relevant for troubleshooting this bug: profiles, screenshots, etc.
validations:
required: false
- type: input
id: version
attributes:
label: Async-profiler version
validations:
required: true
- type: textarea
id: environment
attributes:
label: Environment details
description: |
OS name and version, JDK version, CPU architecture. Is an application running in a container?
validations:
required: false
================================================
FILE: .github/ISSUE_TEMPLATE/config.yml
================================================
---
blank_issues_enabled: false
contact_links:
- name: 💬 General Question
url: https://github.com/async-profiler/async-profiler/discussions
about: Please ask and answer questions as a discussion thread
================================================
FILE: .github/ISSUE_TEMPLATE/documentation.yml
================================================
---
name: "📕 Documentation Issue"
description: Report an issue in the profiler documentation
title: "(short issue description)"
labels: [documentation]
assignees: []
body:
- type: textarea
id: description
attributes:
label: Describe the issue
description: A clear and concise description of the issue.
validations:
required: true
================================================
FILE: .github/ISSUE_TEMPLATE/feature-request.yml
================================================
---
name: 🚀 Feature Request
description: Suggest an idea for this project
title: "(short issue description)"
labels: [enhancement]
assignees: []
body:
- type: textarea
id: description
attributes:
label: Describe the feature
description: A clear and concise description of the feature you are proposing.
validations:
required: true
- type: textarea
id: use-case
attributes:
label: Use Case
description: |
Why do you need this feature? For example: "I'm always frustrated when..."
validations:
required: true
- type: textarea
id: solution
attributes:
label: Proposed Solution
description: |
Suggest how to implement the addition or change. Provide references to alternative solutions, if any.
validations:
required: false
- type: checkboxes
id: ack
attributes:
label: Acknowledgements
options:
- label: I may be able to implement this feature request
required: false
- label: This feature might incur a breaking change
required: false
================================================
FILE: .github/PULL_REQUEST_TEMPLATE.md
================================================
### Description
### Related issues
### Motivation and context
### How has this been tested?
---
By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license].
[Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0
================================================
FILE: .github/workflows/build.yml
================================================
name: build-template
on:
workflow_call:
inputs:
platform:
type: string
required: true
runner:
type: string
required: true
container-image:
type: string
required: false
env:
build_java_distribution: corretto
build_java_version: 11
permissions:
contents: read
jobs:
build:
runs-on: ${{ inputs.runner }}
container:
image: ${{ inputs.container-image && format('public.ecr.aws/async-profiler/asprof-builder-{0}', inputs.container-image) || '' }}
name: "build and unit test (${{ inputs.platform }})"
steps:
- name: Run container setup
if: inputs.container-image != ''
run: "[ ! -f /root/setup.sh ] || /root/setup.sh"
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: ${{ env.build_java_distribution }}
java-version: ${{ env.build_java_version }}
- name: Checkout sources
uses: actions/checkout@v4
- name: Build and unit test
id: build
run: |
set -x
HASH=${GITHUB_SHA:0:7}
case "${{ inputs.platform }}" in
macos*)
brew install gcovr
make COMMIT_TAG=$HASH FAT_BINARY=true release coverage -j
;;
*)
make COMMIT_TAG=$HASH CC=/usr/local/musl/bin/musl-gcc release coverage -j
echo "debug_archive=$(find . -type f -name "async-profiler-*-debug*" -exec basename {} \;)" >> $GITHUB_OUTPUT
;;
esac
echo "archive=$(find . -type f -name "async-profiler-*" -not -name "*-debug*" -exec basename {} \;)" >> $GITHUB_OUTPUT
shell: bash
env:
GITHUB_SHA: ${{ github.sha }}
- name: Set artifact name
id: set_artifact_name
run: echo "artifact_name=async-profiler-${{ inputs.platform }}-${GITHUB_SHA:0:7}" >> $GITHUB_OUTPUT
shell: bash
env:
GITHUB_SHA: ${{ github.sha }}
- name: Upload binaries
uses: actions/upload-artifact@v4
with:
name: ${{ steps.set_artifact_name.outputs.artifact_name }}
path: ${{ steps.build.outputs.archive }}
if-no-files-found: error
- name: Upload debug info
uses: actions/upload-artifact@v4
if: inputs.platform != 'macos'
with:
name: ${{ steps.set_artifact_name.outputs.artifact_name }}-debug
path: ${{ steps.build.outputs.debug_archive }}
if-no-files-found: error
- name: Upload coverage report
uses: actions/upload-artifact@v4
with:
name: test-coverage-${{ inputs.platform }}
path: build/test/coverage/
if-no-files-found: error
================================================
FILE: .github/workflows/clang-tidy-review.yml
================================================
name: clang-tidy-review
on:
workflow_run:
workflows:
- code-check
types:
- completed
jobs:
clang-tidy-results:
if: ${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
container:
image: "public.ecr.aws/async-profiler/asprof-code-check:latest"
permissions:
pull-requests: write
contents: write
actions: read
steps:
- name: Download code-check artifacts
uses: actions/download-artifact@v4
with:
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ secrets.GITHUB_TOKEN }}
name: code-check-artifacts
path: /tmp/code-check-artifacts/
- name: Read PR information
id: pr_info
run: |
cd /tmp/code-check-artifacts
echo "pr_id=$(cat pr-id.txt)" >> "$GITHUB_OUTPUT"
echo "pr_head_repo=$(cat pr-head-repo.txt)" >> "$GITHUB_OUTPUT"
echo "pr_head_sha=$(cat pr-head-sha.txt)" >> "$GITHUB_OUTPUT"
- uses: actions/checkout@v4
with:
repository: ${{ steps.pr_info.outputs.pr_head_repo }}
ref: ${{ steps.pr_info.outputs.pr_head_sha }}
persist-credentials: false
- name: Run clang-tidy-pr-comments action
uses: platisd/clang-tidy-pr-comments@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
clang_tidy_fixes: /tmp/code-check-artifacts/clang-tidy-fixes.yml
pull_request_id: ${{ steps.pr_info.outputs.pr_id }}
python_path: python
auto_resolve_conversations: true
suggestions_per_comment: 100
================================================
FILE: .github/workflows/code-check.yml
================================================
name: code-check
on:
- pull_request
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
cpp-lint:
runs-on: ubuntu-latest
container:
image: "public.ecr.aws/async-profiler/asprof-code-check:latest"
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: Mark repo as safe for Git
run: git config --global --add safe.directory $GITHUB_WORKSPACE
- name: Fetch base branch
run: |
git remote add upstream "https://github.com/${{ github.event.pull_request.base.repo.full_name }}"
git fetch --no-tags --no-recurse-submodules upstream "${{ github.event.pull_request.base.ref }}"
- name: Create artifacts directory
run: |
mkdir code-check-artifacts/
echo "${{ github.event.number }}" > code-check-artifacts/pull-request-id.txt
- name: Run clang-tidy
run: |
set pipefail
make cpp-lint-diff \
DIFF_BASE="$(git merge-base HEAD "upstream/${{ github.event.pull_request.base.ref }}")" \
CLANG_TIDY_ARGS_EXTRA="-export-fixes code-check-artifacts/clang-tidy-fixes.yml"
shell: bash
- name: Save PR information
run: |
echo "${{ github.event.number }}" > code-check-artifacts/pr-id.txt
echo "${{ github.event.pull_request.head.repo.full_name }}" > code-check-artifacts/pr-head-repo.txt
echo "${{ github.event.pull_request.head.sha }}" > code-check-artifacts/pr-head-sha.txt
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: code-check-artifacts
path: code-check-artifacts/
================================================
FILE: .github/workflows/integ.yml
================================================
name: integration-test-template
on:
workflow_call:
inputs:
test-platform:
type: string
required: true
platform:
type: string
required: true
architecture:
type: string
required: false
java-version:
type: string
required: true
java-distribution:
type: string
required: false
default: "corretto"
runner:
type: string
required: true
container-image:
type: string
required: false
container-volumes:
type: string
required: false
use-builtin-jdk:
type: boolean
required: false
default: false
retry-count:
type: number
required: false
default: 0
permissions:
contents: read
jobs:
integration-test:
runs-on: ${{ inputs.runner }}
container:
image: ${{ inputs.container-image && format('public.ecr.aws/async-profiler/asprof-builder-{0}', inputs.container-image) || '' }}
options: --privileged
volumes: ${{ fromJSON(inputs.container-volumes || '[]') }}
name: "${{ inputs.test-platform }}, ${{ inputs.java-distribution }} ${{ inputs.java-version }}"
steps:
- name: Run container setup
if: inputs.container-image != ''
run: "[ ! -f /root/setup.sh ] || /root/setup.sh"
- name: Setup Java
uses: actions/setup-java@v4
# https://github.com/actions/setup-java/issues/678#issuecomment-2446279753
if: ${{ !inputs.use-builtin-jdk }}
with:
distribution: ${{ inputs.java-distribution }}
java-version: ${{ inputs.java-version }}
architecture: ${{ inputs.architecture }}
- name: Checkout sources
uses: actions/checkout@v4
- name: Set variables
id: set_variables
run: |
echo "short_sha=${GITHUB_SHA:0:7}" >> $GITHUB_OUTPUT
echo "artifact_name=async-profiler-${{ inputs.platform }}-${GITHUB_SHA:0:7}" >> $GITHUB_OUTPUT
shell: bash
env:
GITHUB_SHA: ${{ github.sha }}
- name: Download async-profiler release artifact
uses: actions/download-artifact@v4
with:
name: ${{ steps.set_variables.outputs.artifact_name }}
path: async_profiler_release
- name: Download async-profiler JAR artifacts
uses: actions/download-artifact@v4
with:
name: async-profiler-jars
path: jar_artifacts
- name: Extract async-profiler artifact
id: extract_artifact
run: |
release_archive=$(basename $(find async_profiler_release -type f -iname "async-profiler-*" ))
case "${{ inputs.runner }}" in
macos*)
unzip async_profiler_release/$release_archive
;;
*)
tar xvf async_profiler_release/$release_archive
;;
esac
echo "jars_directory=jar_artifacts" >> $GITHUB_OUTPUT
echo "release_directory=$(basename $(find . -type d -iname "async-profiler-*" ))" >> $GITHUB_OUTPUT
- name: Download Protobuf Java runtime
run: |
mkdir -p test/deps
cd test/deps
curl -L -O "https://repo1.maven.org/maven2/com/google/protobuf/protobuf-java/$PB_JAVA_VERSION/protobuf-java-$PB_JAVA_VERSION.jar"
env:
PB_JAVA_VERSION: "4.31.1"
- name: Run integration tests
run: |
mkdir -p build/jar
cp ${{ steps.extract_artifact.outputs.jars_directory }}/* build/jar
make build/test.jar
cp -r ${{ steps.extract_artifact.outputs.release_directory }}/bin build
cp -r ${{ steps.extract_artifact.outputs.release_directory }}/lib build
make test-java TEST_THREADS=2 RETRY_COUNT=${{ inputs.retry-count }} -j
- name: Upload integration test logs
uses: actions/upload-artifact@v4
if: always()
with:
name: integration-test-logs-${{ inputs.test-platform }}-${{ inputs.java-version }}-${{ steps.set_variables.outputs.short_sha }}
path: |
build/test/logs/
hs_err*.log
================================================
FILE: .github/workflows/linters.yml
================================================
name: lint
on:
- push
- pull_request
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
license-header:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check license headers
uses: apache/skywalking-eyes/header@v0.6.0
markdown:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install prettier
run: |
npm install -g prettier@3.4.2
make check-md
eof-newline:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: EOF newline check
env:
offenders_path: /tmp/eof_newline_offenders.txt
run: |
find . -path './.git' -prune -o -exec file --mime-type {} + | grep 'text/' | awk -F: '{print $1}' | while read -r file; do
# Read last byte and verify it's a newline
if [ -s "$file" ] && [ "$(tail -c1 "$file" | wc -l)" -eq 0 ]; then
echo "$file" >> "$offenders_path"
fi
done
if [ -s "$offenders_path" ]; then
cat "$offenders_path"
exit 1
fi
trailing-spaces:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Trailing spaces check
env:
offenders_path: /tmp/trailing_space_offenders.txt
run: |
grep -rIlE --exclude-dir=.git '[[:blank:]]+$' . > "$offenders_path" || true
if [ -s "$offenders_path" ]; then
cat "$offenders_path"
exit 1
fi
================================================
FILE: .github/workflows/test-and-publish-nightly.yml
================================================
name: CI
on: # We are very liberal in terms of triggering builds. This should be revisited if we start seeing a lot of queueing
- push
- pull_request
- workflow_dispatch
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
build-jars:
runs-on: ubuntu-latest
name: build / jars
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Build JARs
run: make jar
- name: Upload JARs
uses: actions/upload-artifact@v4
with:
name: async-profiler-jars
path: build/jar/*
if-no-files-found: error
build-linux-arm64:
name: build / linux-arm64
uses: ./.github/workflows/build.yml
with:
platform: linux-arm64
runner: ubuntu-24.04-arm
container-image: "arm:latest"
build-linux-x64:
name: build / linux-x64
uses: ./.github/workflows/build.yml
with:
platform: linux-x64
runner: ubuntu-latest
container-image: x86:latest
build-macos:
name: build / macos
uses: ./.github/workflows/build.yml
with:
platform: macos
runner: macos-15
integ-linux-x64:
name: integ / linux-x64
needs: [build-linux-x64, build-jars]
strategy:
fail-fast: false
matrix:
test-platform: [linux-x64]
java-version: [8, 11, 17, 21, 25]
java-distribution: [corretto]
container-image: [x86:latest]
include:
- test-platform: linux-x64-alpine
container-image: alpine:corretto-11
use-builtin-jdk: true
java-distribution: corretto
java-version: 11
- test-platform: linux-x64-AL2
container-image: amazonlinux:2
# GHA provides Node.js by attaching a volume to the container. The container path is
# '/__e/node20', and it's not writable unless we override it via 'container.volumes'.
container-volumes: '["/tmp/node20:/__e/node20"]'
java-version: 11
java-distribution: corretto
- test-platform: linux-x64-AL2023
container-image: amazonlinux:2023
java-version: 11
java-distribution: corretto
- test-platform: linux-x64-alpaquita
container-image: alpaquita:x86_64-liberica-21
use-builtin-jdk: true
java-distribution: liberica
java-version: 21
uses: ./.github/workflows/integ.yml
with:
platform: linux-x64
test-platform: ${{ matrix.test-platform }}
runner: ubuntu-latest
container-image: ${{ matrix.container-image }}
container-volumes: ${{ matrix.container-volumes || '' }}
java-version: ${{ matrix.java-version }}
java-distribution: ${{ matrix.java-distribution }}
use-builtin-jdk: ${{ matrix.use-builtin-jdk || false }}
integ-linux-arm64:
name: integ / linux-arm64
needs: [build-linux-arm64, build-jars]
strategy:
fail-fast: false
matrix:
test-platform: [linux-arm64]
java-version: [8, 11, 17, 21, 25]
java-distribution: [corretto]
container-image: [arm:latest]
uses: ./.github/workflows/integ.yml
with:
platform: linux-arm64
test-platform: ${{ matrix.test-platform }}
runner: ubuntu-24.04-arm
container-image: ${{ matrix.container-image }}
container-volumes: ${{ matrix.container-volumes || '' }}
java-version: ${{ matrix.java-version }}
java-distribution: ${{ matrix.java-distribution }}
integ-macos:
name: integ / macos
needs: [build-macos, build-jars]
strategy:
fail-fast: false
matrix:
include:
- runner: macos-15
test-platform: macos-arm64
java-version: "11"
- runner: macos-15
test-platform: macos-arm64
java-version: "21"
- runner: macos-15-intel
test-platform: macos-x64
java-version: "17"
architecture: x64
retry-count: 1
uses: ./.github/workflows/integ.yml
with:
platform: macos
test-platform: ${{ matrix.test-platform }}
runner: ${{ matrix.runner }}
java-version: ${{ matrix.java-version }}
architecture: ${{ matrix.architecture || '' }}
retry-count: ${{ matrix.retry-count || 0 }}
publish-only-on-push:
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
permissions:
contents: write
name: publish (nightly)
runs-on: ubuntu-latest
needs: [integ-linux-x64, integ-linux-arm64, integ-macos]
steps:
- name: Download async-profiler binaries and jars
uses: actions/download-artifact@v4
with:
pattern: 'async-profiler-*'
merge-multiple: 'true'
- name: Delete previous release and publish new release
uses: actions/github-script@v7
with:
result-encoding: string
script: |
const fs = require('fs').promises;
const commonOptions = {
owner: "async-profiler",
repo: "async-profiler",
};
let previousRelease = undefined;
try {
previousRelease = await github.rest.repos.getReleaseByTag({
...commonOptions,
tag: "nightly",
});
} catch (e) {
console.log("No previous nightly release");
// ignore, there was no previous nightly release
}
if (previousRelease !== undefined) {
// delete previous release and nightly tag
await github.rest.repos.deleteRelease({
...commonOptions,
release_id: previousRelease.data.id,
});
await github.rest.git.deleteRef({...commonOptions, ref: "tags/nightly"});
}
// create draft release
const newReleaseId = (await github.rest.repos.createRelease({
...commonOptions,
tag_name: "nightly",
target_commitish: "${{ github.sha }}",
name: "Nightly builds",
body: "Async-profiler binaries published automatically from the latest sources in `master` upon a successful build.",
prerelease: true,
draft: true,
})).data.id;
// upload binaries and jars to draft release
for (const archiveName of await fs.readdir(process.cwd())) {
await github.rest.repos.uploadReleaseAsset({
...commonOptions,
release_id: newReleaseId,
name: archiveName,
data: await fs.readFile(archiveName),
});
}
// publish release
await github.rest.repos.updateRelease({
...commonOptions,
release_id: newReleaseId,
draft: false,
});
================================================
FILE: .gitignore
================================================
/build/
/nbproject/
/out/
/target/
/.idea/
/test/*.class
.vscode
*.iml
/src/api/**/*.class
.gdb_history
================================================
FILE: .licenserc.yaml
================================================
header:
- paths:
- 'src/jattach'
license:
content: |
Copyright The jattach authors
SPDX-License-Identifier: Apache-2.0
comment: on-failure
- paths:
- 'src'
- 'test'
paths-ignore:
- 'src/jattach'
- 'src/res'
- '**/MANIFEST.MF'
- 'test/**/*.collapsed'
license:
content: |
Copyright The async-profiler authors
SPDX-License-Identifier: Apache-2.0
comment: on-failure
================================================
FILE: CHANGELOG.md
================================================
# Changelog
## [4.3]
### Features
- #1547: Native lock profiling
- #1566: Filter cpu/wall profiles by latency
- #1568: Expose async-profiler metrics in Prometheus format
- #1628: async-profiler.jar as Java agent; remote control via JMX
### Improvements
- #1140: FlameGraph improvements: legend, hot keys, new toolbar icons
- #1530: Timezone switcher between Local and UTC time in Heatmaps
- #1582: Support `--include`/`--exclude` options for JFR to Heatmap/OTLP/pprof conversion
- #1624: Compatibility with OTLP v1.9.0
- #1629: Harden crash protection in StackWalker
### Breaking changes
- #1277: New `timeSpan` field in WallClockSample events
- #1518: Deprecate `check` command
- #1590: Support compilation on modern JDKs. Drop JDK 7 support
### Bug fixes
- #1599: Workaround for the kernel PERF_EVENT_IOC_REFRESH bug
- #1596: Do not block any signals during execution of a custom crash handler
- #1584: JfrReader loops on corrupted recordings
- #1555: Parse FlameGraph title from HTML input
- #1621: `loop` and `timeout` options do not work together
- #1641: Unwind vDSO correctly on Linux-ARM64
- #1648: Fix stop sequence in Profiler::start
- #1575: Fix CodeCache memory leak in lock profiling while looping
- #1558: Fix record-cpu bug when kernel stacks are not available
- #1651: Do not record CPU frame for non-perf samples
- #1614, #1615, #1617, #1623: Fix races related to VM termination
## [4.2.1] - 2025-11-22
### Bug fixes
- #1599: Workaround for the kernel PERF_EVENT_IOC_REFRESH bug
- #1596: Do not block any signals during execution of a custom crash handler
## [4.2] - 2025-10-20
### Features
- Java Method Tracing and Latency Profiling
* #1421: Latency profiling
* #1435: Allow wildcards in Instrument profiling engine
* #1499: `--trace` option with per-method latency threshold
- System-wide process sampling on Linux
* #1411: `--proc` option to record `profiler.ProcessSample` events
- VMStructs stack walker by default
* #1539: Use VMStructs stack walking mode by default
* #1537: Support `comptask` and `vtable` features
* #1517: Use JavaFrameAnchor to find top Java frame
* #1449: Special handling of prologue and epilogue of compiled methods
### Improvements
- #1475: Add `CPUTimeSample` event support to jfrconv
- #1414: Per-thread flamegraph option in JFR heatmap converter
- #1526: Expose JfrReader dictionary that maps osThreadId to javaThreadId
- #1448: Thread name in OpenTelemetry output
- #1413: Add `time_nanos` and `duration_nanos` to OTLP profiles
- #1450: Unwind dylib stubs as empty frames on macOS
- #1416: Add synthetic symbols for Mach-O stubs/trampolines
- Allow cross-compilation for 32-bit platforms
### Bug fixes
- #1515: Fix UnsatisfiedLinkError when tmpdir is set to a relative path
- #1500: Detect if `calloc` calls `malloc` for nativemem profiling
- #1427: Re-implement SafeAccess crash protection
- #1417: Two wall-clock profilers interfere with each other
### Project Infrastructure
- #1527: GHA: replace macos-13 with macos-15-intel
- #1510: Add option to retry tests
- #1508: Add more GHA jobs to cover JDK versions on ARM
- #1502: Fix job dependencies between integration tests and builds
- #1466: Add Liberica JDK on Alpaquita Linux to the CI
- Made integration tests more stable overall
## [4.1] - 2025-07-21
### Features
- Experimental support for the OpenTelemetry profiling signal
* #1188: OTLP output format and `dumpOtlp` Java API
* #1336: JFR to OTLP converter
- JDK 25 support
* #1222: Update VMStructs for JDK 25
- Productize native memory profiling
* #1193: Full `nativemem` support on macOS
* #1254: Fixed Nativemem tests on Alpine
* #1269: Native memory profiling now works with `jemalloc`
* #1323: `nativemem` shows allocations inside async-profiler itself
### Improvements
- #1174: Detect JVM in non-Java application and attach to it
- #1223: Native API to add custom events in JFR recording
- #1259: `--all` option to collect all possible events simultaneously
- #1286: Record which CPU a sample was taken on
- #1299: Skip last 10% allocations for leak detection
- #1300: Allow profiling kprobes/uprobes with `--fdtransfer`
- #1366: Rewrite `jfrconv` executable to shell
- #1400: Unwind checksum and digest intrinsics on ARM64
- #1357, #1389: VMStructs-based stack unwinding for `alloc` and `nativemem` profiling
### Bug fixes
- #1251: `--ttsp` option does not work on Alpine
- #1264: Guard hook installation with dlopen/dlclose
- #1319: SIGSEGV in PerfEvents::walk
- #1350: Disable JFR OldObjectSample event in jfrsync mode
- #1358: Do not dereference jmethodIDs on JDK 26
- #1374: Correctly check if profiler is preloaded
- #1380: Workaround clang type promotion bug
- #1387: JFR writer crashes when using cstack=vmx
- #1393: Improve stack walking termination logic: no endless `unknown` frames
- Stack unwinding fixes for ARM64
### Project Infrastructure
- #1129: Command-line option to filter tests
- #1262: Include `asprof.h` in async-profiler release package
- #1271: Release additional binaries with debug symbols
- #1274: Add Corretto 8 to the test matrix
- #1246, #1226: Run tests on Amazon Linux and Alpine Linux
- #1360: Auto-generated clang-tidy review comments
- #1373: Save all generated test logs for debug purposes
- Fixed flaky tests (#1282, #1307, #1376)
## [4.0] - 2025-04-08
### Features
- #895, #905: `jfrconv` binary and numerous converter enhancements
- #944: Interactive Heatmap
- #1064: Native memory leak profiler
- #1002: An option to display instruction addresses
- #1007: Optimize wall clock profiling
- #1073: Productize VMStructs-based stack walker: `--cstack vm/vmx`
- #1169: C API for accessing thread-local profiling context
### Improvements
- #923: Support JDK 23+
- #952: Solve musl and glibc compatibility issues; link `libstdc++` statically
- #955: `--libpath` option to specify path to `libasyncProfiler.so` in a container
- #1018: `--grain` converter option to coarsen flame graphs
- #1046: `--nostop` option to continue profiling outside `--begin`/`--end` window
- #1178: `--inverted` option to flip flame graphs vertically
- #1009: Allows collecting allocation and live object traces at the same time
- #925: An option to accumulate JFR events in memory instead of flushing to a file
- #929: Load symbols from debuginfod cache
- #982: Sample contended locks by overflowing interval bucket
- #993: Filter native frames in allocation profile
- #896: FlameGraph: `Alt+Click` to remove stacks
- #1097: FlameGraph: `N`/`Shift+N` to navigate through search results
- #1182: Retain by-thread grouping when reversing FlameGraph
- #1167: Log when no samples are collected
- #1044: Fall back to `ctimer` for CPU profiling when perf_events are unavailable
- #1068: Count missed samples when estimating total CPU time in `ctimer` mode
- #1142: Use counter-timer register for timestamps on ARM64
- #1123: Support `clock=tsc` without a JVM
- #1070: Demangle Rust v0 symbols
- #1007: Use `ExecutionSample` event for CPU profiling and `WallClockSample` for Wall clock profiling
- #1011: Obtain `can_generate_sampled_object_alloc_events` JVMTI capability only when needed
- #1013: Intercept java.util.concurrent locks more efficiently
- #759: Discover available profiling signal automatically
- #884: Record event timestamps early
- #885: Print error message if JVM fails to load libasyncProfiler
- #892: Resolve tracepoint id in `asprof`
- Suppress dynamic attach warning on JDK 21+
### Bug fixes
- #1143: Crash on macOS when using thread filter
- #1125: Fixed parsing concurrently loaded libraries
- #1095: jfr print fails when a recording has empty pools
- #1084: Fixed Logging related races
- #1074: Parse both .rela.dyn and .rela.plt sections
- #1003: Support both tracefs and debugfs for kernel tracepoints
- #986: Profiling output respects loglevel
- #981: Avoid JVM crash by deleting JNI refs after `GetMethodDeclaringClass`
- #934: Fix crash on Zing in a native thread
- #843: Fix race between parsing and concurrent unloading of shared libraries
- #1147, #1151: Deadlocks with jemalloc and tcmalloc profilers
- Stack walking fixes for ARM64
- Converter fixes for `jfrsync` profiles
- Fixed parsing non-PIC executables and shared objects with non-standard section layout
- Fixed recursion in `pthread_create` when using native profiling API
- Fixed crashes on Alpine when profiling native apps
- Fixed warnings with `-Xcheck:jni`
- Fixed "Unsupported JVM" on OpenJ9 JDK 21
- Fixed DefineClass crash on OpenJ9
- JfrReader should handle custom events properly
- Handle truncated JFRs
### Project Infrastructure
- Restructure and update documentation
- Implement test framework; add new integration tests
- Unit test framework for C++ code
- Run CI on all supported platforms
- Test multiple JDK versions in CI
- Add GHA to validate license headers
- Add Markdown checker and formatter
- Add Issue and Pull Request templates
- Add Contributing Guidelines and Code of Conduct
- Run static analyzer and fix found issues (#1034, #1039, #1049, #1051, #1098)
- Provide Dockerfile for building async-profiler release packages
- Publish nightly builds automatically
## [3.0] - 2024-01-20
### Features
- #724: Binary launcher `asprof`
- #751: Profile non-Java processes
- #795: AsyncGetCallTrace replacement
- #719: Classify execution samples into categories in JFR converter
- #855: `ctimer` mode for accurate profiling without perf_events
- #740: Profile CPU + Wall clock together
- #736: Show targets of vtable/itable calls
- #777: Show JIT compilation task
- #644: RISC-V port
- #770: LoongArch64 port
### Improvements
- #733: Make the same `libasyncProfiler` work with both glibc and musl
- #734: Support raw PMU event descriptors
- #759: Configure alternative profiling signal
- #761: Parse dynamic linking structures
- #723: `--clock` option to select JFR timestamp source
- #750: `--jfrsync` may specify a list of JFR events
- #849: Parse concatenated multi-chunk JFRs
- #833: Time-to-safepoint JFR event
- #832: Normalize names of hidden classes / lambdas
- #864: Reduce size of HTML Flame Graph
- #783: Shutdown asprof gracefully on SIGTERM
- Better demangling of C++ and Rust symbols
- DWARF unwinding for ARM64
- `JfrReader` can parse in-memory buffer
- Support custom events in `JfrReader`
- An option to read JFR file by chunks
- Record `GCHeapSummary` events in JFR
### Bug fixes
- Workaround macOS crashes in SafeFetch
- Fixed attach to OpenJ9 on macOS
- Support `UseCompressedObjectHeaders` aka Lilliput
- Fixed allocation profiling on JDK 20.0.x
- Fixed context-switches profiling
- Prefer ObjectSampler to TLAB hooks for allocation profiling
- Improved accuracy of ObjectSampler in `--total` mode
- Make Flame Graph status line and search results always visible
- `loop` and `timeout` options did not work in some modes
- Restart interrupted poll/epoll_wait syscalls
- Fixed stack unwinding issues on ARM64
- Workaround for stale jmethodIDs
- Calculate ELF base address correctly
- Do not dump redundant threads in a JFR chunk
- `check` action prints result to a file
- Annotate JFR unit types with `@ContentType`
## [2.9] - 2022-11-27
### Features
- Java Heap leak profiler
- `meminfo` command to print profiler's memory usage
- Profiler API with embedded agent as a Maven artifact
### Improvements
- `--include`/`--exclude` options in the FlameGraph converter
- `--simple` and `--dot` options in jfr2flame converter
- An option for agressive recovery of `[unknown_Java]` stack traces
- Do not truncate signatures in collapsed format
- Display inlined frames under a runtime stub
### Bug fixes
- Profiler did not work with Homebrew JDK
- Fixed allocation profiling on Zing
- Various `jfrsync` fixes
- Symbol parsing fixes
- Attaching to a container on Linux 3.x could fail
## [2.8.3] - 2022-07-16
### Improvements
- Support virtualized ARM64 macOS
- A switch to generate auxiliary events by async-profiler or FlightRecorder in jfrsync mode
### Bug fixes
- Could not recreate perf_events after the first failure
- Handle different versions of Zing properly
- Do not call System.loadLibrary, when libasyncProfiler is preloaded
## [2.8.2] - 2022-07-13
### Bug fixes
- The same .so works with glibc and musl
- dlopen hook did not work on Arch Linux
- Fixed JDK 7 crash
- Fixed CPU profiling on Zing
### Changes
- Mark interpreted frames with `_[0]` in collapsed output
- Double click selects a method name on a flame graph
## [2.8.1] - 2022-06-10
### Improvements
- JFR to pprof converter (contributed by @NeQuissimus)
- JFR converter improvements: time range, collapsed output, pattern highlighting
- `%n` pattern in file names; limit number of output files
- `--lib` to customize profiler library path in a container
- `profiler.sh list` command now works without PID
### Bug fixes
- Fixed crashes related to continuous profiling
- Fixed Alpine/musl compatibility issues
- Fixed incomplete collapsed output due to weird locale settings
- Workaround for JDK-8185348
## [2.8] - 2022-05-09
### Features
- Mark top methods as interpreted, compiled (C1/C2), or inlined
- JVM TI based allocation profiling for JDK 11+
- Embedded HTTP management server
### Improvements
- Re-implemented stack recovery for better reliability
- Add `loglevel` argument
- Do not mmap perf page in `--all-user` mode
- Distinguish runnable/sleeping threads in OpenJ9 wall-clock profiler
- `--cpu` converter option to extract CPU profile from the wall-clock output
## [2.7] - 2022-02-14
### Features
- Experimental support for OpenJ9 VM
- DWARF stack unwinding
### Improvements
- Better handling of VM threads (fixed missing JIT threads)
- More reliable recovery from `not_walkable` AGCT failures
- Do not accept unknown agent arguments
## [2.6] - 2022-01-09
### Features
- Continuous profiling; `loop` and `timeout` options
### Improvements
- Reliability improvements: avoid certain crashes and deadlocks
- Smaller and faster agent library
- Minor `jfr` and `jfrsync` enhancements (see the commit log)
## [2.5.1] - 2021-12-05
### Bug fixes
- Prevent early unloading of libasyncProfiler.so
- Read kernel symbols only for perf_events
- Escape backslashes in flame graphs
- Avoid duplicate categories in `jfrsync` mode
- Fixed stack overflow in RedefineClasses
- Fixed deadlock when flushing JFR
### Improvements
- Support OpenJDK C++ Interpreter (aka Zero)
- Allow reading incomplete JFR recordings
## [2.5] - 2021-10-01
### Features
- macOS/ARM64 (aka Apple M1) port
- PPC64LE port (contributed by @ghaug)
- Profile low-privileged processes with perf_events (contributed by @Jongy)
- Raw PMU events; kprobes & uprobes
- Dump results in the middle of profiling session
- Chunked JFR; support JFR files larger than 2 GB
- Integrate async-profiler events with JDK Flight Recordings
### Improvements
- Use RDTSC for JFR timestamps when possible
- Show line numbers and bci in Flame Graphs
- jfr2flame can produce Allocation and Lock flame graphs
- Flame Graph title depends on the event and `--total`
- Include profiler logs and native library list in JFR output
- Lock profiling no longer requires JVM symbols
- Better container support
- Native function profiler can count the specified argument
- An option to group threads by scheduling policy
- An option to prepend library name to native symbols
### Notes
- macOS build is provided as a fat binary that works both on x86-64 and ARM64
- 32-bit binaries are no longer shipped. It is still possible to build them from sources
- Dropped JDK 6 support (may still work though)
## [2.0] - 2021-03-14
### Features
- Profile multiple events together (cpu + alloc + lock)
- HTML 5 Flame Graphs: faster rendering, smaller size
- JFR v2 output format, compatible with FlightRecorder API
- JFR to Flame Graph converter
- Automatically turn profiling on/off at `--begin`/`--end` functions
- Time-to-safepoint profiling: `--ttsp`
### Improvements
- Unlimited frame buffer. Removed `-b` option and 64K stack traces limit
- Additional JFR events: OS, CPU, and JVM information; CPU load
- Record bytecode indices / line numbers
- Native stack traces for Java events
- Improved CLI experience
- Better error handling; an option to log warnings/errors to a dedicated stream
- Reduced the amount of unknown stack traces
### Changes
- Removed non-ASL code. No more CDDL license
## [1.8.4] - 2021-02-24
### Improvements
- Smaller and faster agent library
### Bug fixes
- Fixed JDK 7 crash during wall-clock profiling
## [1.8.3] - 2021-01-06
### Improvements
- libasyncProfiler.dylib symlink on macOS
### Bug fixes
- Fixed possible deadlock on non-HotSpot JVMs
- Gracefully stop profiler when terminating JVM
- Fixed GetStackTrace problem after RedefineClasses
## [1.8.2] - 2020-11-02
### Improvements
- AArch64 build is now provided out of the box
- Compatibility with JDK 15 and JDK 16
### Bug fixes
- More careful native stack walking in wall-clock mode
- `resume` command is not compatible with JFR format
- Wrong allocation sizes on JDK 8u262
## [1.8.1] - 2020-09-05
### Improvements
- Possibility to specify application name instead of `pid` (contributed by @yuzawa-san)
### Bug fixes
- Fixed long attach time and slow class loading on JDK 8
- `UnsatisfiedLinkError` during Java method profiling
- Avoid reading `/proc/kallsyms` when `--all-user` is specified
## [1.8] - 2020-08-10
### Features
- Converters between different output formats:
- JFR -> nflx (FlameScope)
- Collapsed stacks -> HTML 5 Flame Graph
### Improvements
- `profiler.sh` no longer requires bash (contributed by @cfstras)
- Fixed long attach time and slow class loading on JDK 8
- Fixed deadlocks in wall-clock profiling mode
- Per-thread reverse Flame Graph and Call Tree
- ARM build now works with ARM and THUMB flavors of JDK
### Changes
- Release package is extracted into a separate folder
## [1.7.1] - 2020-05-14
### Features
- LBR call stack support (available since Haswell)
### Improvements
- `--filter` to profile only specified thread IDs in wall-clock mode
- `--safe-mode` to disable selected stack recovery techniques
## [1.7] - 2020-03-17
### Features
- Profile invocations of arbitrary Java methods
- Filter stack traces by the given name pattern
- Java API to filter monitored threads
- `--cstack`/`--no-cstack` option
### Improvements
- Thread names and Java thread IDs in JFR output
- Wall clock profiler distinguishes RUNNABLE vs. SLEEPING threads
- Stable profiling interval in wall clock mode
- C++ function names as events, e.g. `-e VMThread::execute`
- `check` command to test event availability
- Allow shading of AsyncProfiler API
- Enable CPU profiling on WSL
- Enable allocation profiling on Zing
- Reduce the amount of `unknown_Java` samples
## [1.6] - 2019-09-09
### Features
- Pause/resume profiling
- Allocation profiling support for JDK 12, 13 (contributed by @rraptorr)
### Improvements
- Include all AsyncGetCallTrace failures in the profile
- Parse symbols of JNI libraries loaded in runtime
- The agent autodetects output format by the file extension
- Output file name patterns: `%p` and `%t`
- `-g` option to print method signatures
- `-j` can increase the maximum Java stack depth
- Allocaton sampling rate can be adjusted with `-i`
- Improved reliability on macOS
### Changes
- `-f` file names are now relative to the current shell directory
## [1.5] - 2019-01-08
### Features
- Wall-clock profiler: `-e wall`
- `-e itimer` mode for systems that do not support perf_events
- Native stack traces on macOS
- Support for Zing runtime, except allocation profiling
### Improvements
- `--all-user` option to allow profiling with restricted
`perf_event_paranoid` (contributed by @jpbempel)
- `-a` option to annotate method names
- Improved attach to containerized and chroot'ed JVMs
- Native function profiling now accepts non-public symbols
- Better mapping of Java thread names (contributed by @KirillTim)
### Changes
- Changed default profiling engine on macOS
- Fixed the order of stack frames in JFR format
## [1.4] - 2018-06-24
### Features
- Interactive Call tree and Backtrace tree in HTML format (contributed by @rpulle)
- Experimental support for Java Flight Recorder (JFR) compatible output
### Improvements
- Added units: `ms`, `us`, `s` and multipliers: `K`, `M`, `G` for interval argument
- API and command-line option `-v` for profiler version
- Allow profiling containerized JVMs on older kernels
### Changes
- Default CPU sampling interval reduced to 10 ms
- Changed the text format of flat profile
## [1.3] - 2018-05-13
### Features
- Profiling of native functions, e.g. malloc
### Improvements
- JDK 9, 10, 11 support for heap profiling with accurate stack traces
- `root` can now profile Java processes of any user
- `-j` option for limiting Java stack depth
## [1.2] - 2018-03-05
### Features
- Produce SVG files out of the box; flamegraph.pl is no longer needed
- Profile ReentrantLock contention
- Java API
### Improvements
- Allocation and Lock profiler now works on JDK 7, too
- Faster dumping of results
### Changes
- `total` counter of allocation profiler now measures heap pressure (like JMC)
## [1.1] - 2017-12-03
### Features
- Linux Perf Events profiling: CPU cycles, cache misses, branch misses, page faults, context switches etc.
- Kernel tracepoints support
- Contended monitor (aka intrinsic lock) profiling
- Individual thread profiles
### Improvements
- Profiler can engage at JVM start and automatically dump results on exit
- `list` command-line option to list supported events
- Automatically find target process ID with `jps` tool
- An option to include counter value in `collapsed` output
- Friendly class names in allocation profile
- Split allocations in new TLAB vs. outside TLAB
### Changes
- Replaced `-m` modes with `-e` events
- Interval changed from `int` to `long`
## [1.0] - 2017-10-09
### Features
- CPU profiler without Safepoint bias
- Lightweight Allocation profiler
- Java, native and kernel stack traces
- FlameGraph compatible output
================================================
FILE: CODE_OF_CONDUCT.md
================================================
## Code of Conduct
This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
opensource-codeofconduct@amazon.com with any additional questions or comments.
================================================
FILE: CONTRIBUTING.md
================================================
# Contributing Guidelines
Thank you for your interest in contributing to our project. Whether it's a bug report, new feature, correction, or additional
documentation, we greatly value feedback and contributions from our community.
Please read through this document before submitting any issues or pull requests to ensure we have all the necessary
information to effectively respond to your bug report or contribution.
## Security issue notifications
If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/). Please do **not** create a public GitHub issue.
## Reporting Bugs/Feature Requests
We welcome you to use the GitHub issue tracker to report bugs or suggest features.
When filing an issue, please check [existing open](https://github.com/async-profiler/async-profiler/issues), or [recently closed](https://github.com/async-profiler/async-profiler/issues?q=is%3Aissue+is%3Aclosed), issues to make sure somebody else hasn't already
reported the issue. Please try to include as much information as you can. Details like these are incredibly useful:
* A reproducible test case or series of steps
* The version of our code being used
* Any modifications you've made relevant to the bug
* Anything unusual about your environment or deployment
## Contributing via Pull Requests
Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that:
1. You are working against the latest source on the *master* branch.
2. You check existing open, and recently merged, pull requests to make sure someone else hasn't addressed the problem already.
3. You open an issue to discuss any significant work - we would hate for your time to be wasted.
To send us a pull request, please:
1. Fork the repository.
2. Modify the source; please focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change.
3. Ensure local tests pass.
4. Commit to your fork using clear commit messages.
5. Send us a pull request, answering any default questions in the pull request interface.
6. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.
GitHub provides additional document on [forking a repository](https://help.github.com/articles/fork-a-repo/) and
[creating a pull request](https://help.github.com/articles/creating-a-pull-request/).
## Finding contributions to work on
Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels (enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any ['help wanted'](https://github.com/async-profiler/async-profiler/labels/help%20wanted) issues is a great place to start.
## Code of Conduct
This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
opensource-codeofconduct@amazon.com with any additional questions or comments.
## Licensing
See the [LICENSE](LICENSE) file for our project's licensing. We will ask you to confirm the licensing of your contribution.
================================================
FILE: LICENSE
================================================
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright {yyyy} {name of copyright owner}
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
================================================
FILE: Makefile
================================================
PROFILER_VERSION ?= 4.3
ifeq ($(COMMIT_TAG),true)
PROFILER_VERSION := $(PROFILER_VERSION)-$(shell git rev-parse --short=8 HEAD)
else ifneq ($(COMMIT_TAG),)
PROFILER_VERSION := $(PROFILER_VERSION)-$(COMMIT_TAG)
endif
TMP_DIR=/tmp
COMMA=,
PACKAGE_NAME=async-profiler-$(PROFILER_VERSION)-$(OS_TAG)-$(ARCH_TAG)
PACKAGE_DIR=$(TMP_DIR)/$(PACKAGE_NAME)
DEBUG_PACKAGE_NAME=$(PACKAGE_NAME)-debug
DEBUG_PACKAGE_DIR=$(PACKAGE_DIR)-debug
ASPROF=bin/asprof
JFRCONV=bin/jfrconv
LIB_PROFILER=lib/libasyncProfiler.$(SOEXT)
LIB_PROFILER_DEBUG=libasyncProfiler.$(SOEXT).debug
ASPROF_HEADER=include/asprof.h
API_JAR=jar/async-profiler.jar
CONVERTER_JAR=jar/jfr-converter.jar
TEST_JAR=test.jar
CC ?= gcc
CXX ?= g++
STRIP ?= strip
OBJCOPY ?= objcopy
ifneq ($(CROSS_COMPILE),)
CC := $(CROSS_COMPILE)gcc
CXX := $(CROSS_COMPILE)g++
AS := $(CROSS_COMPILE)as
LD := $(CROSS_COMPILE)ld
STRIP := $(CROSS_COMPILE)strip
OBJCOPY := $(CROSS_COMPILE)objcopy
endif
CFLAGS_EXTRA ?=
CXXFLAGS_EXTRA ?=
CFLAGS=-O3 -fno-exceptions $(CFLAGS_EXTRA)
CXXFLAGS=-O3 -fno-exceptions -fno-omit-frame-pointer -fvisibility=hidden -std=c++11 $(CXXFLAGS_EXTRA)
CPPFLAGS=
DEFS=-DPROFILER_VERSION=\"$(PROFILER_VERSION)\"
INCLUDES=-I$(JAVA_HOME)/include -Isrc/helper
LIBS=-ldl -lpthread
MERGE=true
GCOV ?= gcov
JAVAC=$(JAVA_HOME)/bin/javac
JAR=$(JAVA_HOME)/bin/jar
JAVA=$(JAVA_HOME)/bin/java
JAVA_TARGET=8
JAVAC_OPTIONS=--release $(JAVA_TARGET) -Xlint:-options
TEST_JAVA ?= $(JAVA_HOME)/bin/java
TEST_LIB_DIR=build/test/lib
TEST_BIN_DIR=build/test/bin
TEST_DEPS_DIR=test/deps
TEST_GEN_DIR=test/gen
LOG_DIR=build/test/logs
LOG_LEVEL=
SKIP=
RETRY_COUNT=0
TEST_THREADS ?= 8
TEST_FLAGS=-DlogDir=$(LOG_DIR) -DlogLevel=$(LOG_LEVEL) -Dskip='$(subst $(COMMA), ,$(SKIP))' -DretryCount=$(RETRY_COUNT) -DthreadCount=$(TEST_THREADS)
# always sort SOURCES so zInit is last.
SOURCES := $(sort $(wildcard src/*.cpp))
HEADERS := $(wildcard src/*.h)
RESOURCES := $(wildcard src/res/*)
JAVA_HELPER_CLASSES := $(wildcard src/helper/one/profiler/*.class)
API_SOURCES := $(wildcard src/api/one/profiler/*.java)
JAR_MANIFEST := src/api/one/profiler/MANIFEST.MF
CONVERTER_SOURCES := $(shell find src/converter -name '*.java')
TEST_SOURCES := $(shell find test -name '*.java' ! -path 'test/stubs/*')
TESTS ?=
CPP_TEST_SOURCES := test/native/testRunner.cpp $(shell find test/native -name '*Test.cpp')
CPP_TEST_HEADER := test/native/testRunner.hpp
CPP_TEST_INCLUDES := -Isrc -Itest/native
TEST_LIB_SOURCES := $(wildcard test/native/libs/*)
TEST_BIN_SOURCES := $(shell find test/test -name "*.c*")
ifeq ($(JAVA_HOME),)
JAVA_HOME:=$(shell java -cp . JavaHome)
endif
OS:=$(shell uname -s)
ifeq ($(OS),Darwin)
CXXFLAGS += -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -Wl,-rpath,@executable_path/../lib -Wl,-rpath,@executable_path/../lib/server
INCLUDES += -I$(JAVA_HOME)/include/darwin
SOEXT=dylib
PACKAGE_EXT=zip
OS_TAG=macos
ifeq ($(FAT_BINARY),true)
FAT_BINARY_FLAGS=-arch x86_64 -arch arm64 -mmacos-version-min=10.15
CFLAGS += $(FAT_BINARY_FLAGS)
CXXFLAGS += $(FAT_BINARY_FLAGS)
PACKAGE_NAME=async-profiler-$(PROFILER_VERSION)-$(OS_TAG)
MERGE=false
endif
else
CXXFLAGS += -U_FORTIFY_SOURCE -Wl,-z,defs -Wl,--exclude-libs,ALL -static-libstdc++ -static-libgcc
CXXFLAGS += -fdata-sections -ffunction-sections -Wl,--gc-sections -ggdb -Wunused-variable -Wno-psabi
ifeq ($(MERGE),true)
CXXFLAGS += -fwhole-program
endif
LIBS += -lrt
INCLUDES += -I$(JAVA_HOME)/include/linux
SOEXT=so
PACKAGE_EXT=tar.gz
OS_TAG=linux
endif
ifeq ($(ARCH_TAG),)
ARCH:=$(shell uname -m)
ifeq ($(ARCH),x86_64)
ARCH_TAG=x64
else ifeq ($(ARCH),aarch64)
ARCH_TAG=arm64
else ifeq ($(ARCH),arm64)
ARCH_TAG=arm64
else ifeq ($(findstring arm,$(ARCH)),arm)
ARCH_TAG=arm32
else ifeq ($(ARCH),ppc64le)
ARCH_TAG=ppc64le
else ifeq ($(ARCH),riscv64)
ARCH_TAG=riscv64
else ifeq ($(ARCH),loongarch64)
ARCH_TAG=loongarch64
else
ARCH_TAG=x86
endif
endif
STATIC_BINARY=$(findstring musl-gcc,$(CC))
ifneq (,$(STATIC_BINARY))
CFLAGS += -static -fdata-sections -ffunction-sections -Wl,--gc-sections
endif
.PHONY: all jar release build-test test clean coverage clean-coverage build-test-java build-test-cpp test-cpp test-java check-md format-md
all: build/bin build/lib build/$(LIB_PROFILER) build/$(ASPROF) jar build/$(JFRCONV) build/$(ASPROF_HEADER)
jar: build/jar build/$(API_JAR) build/$(CONVERTER_JAR)
release: $(PACKAGE_NAME).$(PACKAGE_EXT)
$(PACKAGE_NAME).tar.gz: $(PACKAGE_DIR)
patchelf --remove-needed ld-linux-x86-64.so.2 --remove-needed ld-linux-aarch64.so.1 $(PACKAGE_DIR)/$(LIB_PROFILER)
tar czf $@ -C $(PACKAGE_DIR)/.. $(PACKAGE_NAME)
rm -r $(PACKAGE_DIR)
tar czf $(DEBUG_PACKAGE_NAME).tar.gz -C $(DEBUG_PACKAGE_DIR)/.. $(DEBUG_PACKAGE_NAME)
rm -r $(DEBUG_PACKAGE_DIR)
$(PACKAGE_NAME).zip: $(PACKAGE_DIR)
ifneq ($(GITHUB_ACTIONS), true)
codesign -s "Developer ID" -o runtime --timestamp -v $(PACKAGE_DIR)/$(ASPROF) $(PACKAGE_DIR)/$(JFRCONV) $(PACKAGE_DIR)/$(LIB_PROFILER)
endif
ditto -c -k --keepParent $(PACKAGE_DIR) $@
rm -r $(PACKAGE_DIR)
$(PACKAGE_DIR): all LICENSE README.md
rm -rf $@
mkdir -p $(PACKAGE_DIR) $(DEBUG_PACKAGE_DIR)
cp -RP build/bin build/lib build/include LICENSE README.md $(PACKAGE_DIR)/
chmod -R 755 $(PACKAGE_DIR)
chmod 644 $(PACKAGE_DIR)/lib/* $(PACKAGE_DIR)/include/* $(PACKAGE_DIR)/LICENSE $(PACKAGE_DIR)/README.md
ifeq ($(OS_TAG),linux)
$(STRIP) --only-keep-debug build/$(LIB_PROFILER) -o $(DEBUG_PACKAGE_DIR)/$(LIB_PROFILER_DEBUG)
$(STRIP) -g $@/$(LIB_PROFILER)
$(OBJCOPY) --add-gnu-debuglink=$(DEBUG_PACKAGE_DIR)/$(LIB_PROFILER_DEBUG) $@/$(LIB_PROFILER)
chmod 644 $(DEBUG_PACKAGE_DIR)/*
endif
build/%:
mkdir -p $@
build/$(ASPROF): src/main/* src/jattach/* src/fdtransfer.h
$(CC) $(CPPFLAGS) $(CFLAGS) $(DEFS) -o $@ src/main/*.cpp src/jattach/*.c
$(STRIP) $@
build/$(JFRCONV): src/launcher/launcher.sh build/$(CONVERTER_JAR)
sed -e 's/PROFILER_VERSION/$(PROFILER_VERSION)/g' -e 's/BUILD_DATE/$(shell date "+%b %d %Y")/g' src/launcher/launcher.sh > $@
chmod +x $@
cat build/$(CONVERTER_JAR) >> $@
build/$(LIB_PROFILER): $(SOURCES) $(HEADERS) $(RESOURCES) $(JAVA_HELPER_CLASSES)
ifeq ($(MERGE),true)
for f in src/*.cpp; do echo '#include "'$$f'"'; done |\
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(DEFS) $(INCLUDES) -fPIC -shared -o $@ -xc++ - $(LIBS)
else
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(DEFS) $(INCLUDES) -fPIC -shared -o $@ $(SOURCES) $(LIBS)
endif
build/$(ASPROF_HEADER): src/asprof.h
mkdir -p build/include
cp -f $< build/include
build/$(API_JAR): $(API_SOURCES) $(JAR_MANIFEST)
mkdir -p build/api
$(JAVAC) $(JAVAC_OPTIONS) -d build/api $(API_SOURCES)
$(JAR) cfm $@ $(JAR_MANIFEST) -C build/api .
$(RM) -r build/api
build/$(CONVERTER_JAR): $(CONVERTER_SOURCES) $(RESOURCES)
mkdir -p build/converter
$(JAVAC) $(JAVAC_OPTIONS) -d build/converter $(CONVERTER_SOURCES)
$(JAR) cfe $@ one.convert.Main -C build/converter . -C src/res .
$(RM) -r build/converter
%.class: %.java
$(JAVAC) -source $(JAVA_TARGET) -target $(JAVA_TARGET) -Xlint:-options -g:none $^
build/test/cpptests: $(CPP_TEST_SOURCES) $(CPP_TEST_HEADER) $(SOURCES) $(HEADERS) $(RESOURCES) $(JAVA_HELPER_CLASSES)
mkdir -p build/test
ifeq ($(MERGE),true)
for f in src/*.cpp test/native/*.cpp; do echo '#include "'$$f'"'; done |\
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(DEFS) $(INCLUDES) $(CPP_TEST_INCLUDES) -fPIC -o $@ -xc++ - $(LIBS)
else
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(DEFS) $(INCLUDES) $(CPP_TEST_INCLUDES) -fPIC -o $@ $(SOURCES) $(CPP_TEST_SOURCES) $(LIBS)
endif
build-test-java: all build/$(TEST_JAR) build/test/build-test-libs build/test/build-test-bins
build-test-cpp: build/test/cpptests build/test/build-test-libs
build-test: build-test-cpp build-test-java
build/test/build-test-libs: $(TEST_LIB_SOURCES)
@mkdir -p $(TEST_LIB_DIR)
$(CC) -shared -fPIC -o $(TEST_LIB_DIR)/libreladyn.$(SOEXT) test/native/libs/reladyn.c
$(CC) -shared -fPIC -o $(TEST_LIB_DIR)/libcallsmalloc.$(SOEXT) test/native/libs/callsmalloc.c
$(CC) -shared -fPIC $(INCLUDES) -Isrc -o $(TEST_LIB_DIR)/libjnimalloc.$(SOEXT) test/native/libs/jnimalloc.c
$(CC) -shared -fPIC -o $(TEST_LIB_DIR)/libmalloc.$(SOEXT) test/native/libs/malloc.c
$(CC) -fno-optimize-sibling-calls -shared -fPIC $(INCLUDES) -Isrc -o $(TEST_LIB_DIR)/libjninativestacks.$(SOEXT) test/native/libs/jninativestacks.c
$(CC) -shared -fPIC $(INCLUDES) -Isrc -o $(TEST_LIB_DIR)/libjninativelocks.$(SOEXT) test/native/libs/jninativelocks.c -lpthread
ifeq ($(OS_TAG),linux)
$(CC) -c -shared -fPIC -o $(TEST_LIB_DIR)/vaddrdif.o test/native/libs/vaddrdif.c
$(LD) -N -shared -o $(TEST_LIB_DIR)/libvaddrdif.$(SOEXT) $(TEST_LIB_DIR)/vaddrdif.o -T test/native/libs/vaddrdif.ld
$(AS) -o $(TEST_LIB_DIR)/multiplematching.o test/native/libs/multiplematching.s
$(LD) -shared -o $(TEST_LIB_DIR)/multiplematching.$(SOEXT) $(TEST_LIB_DIR)/multiplematching.o
$(AS) -o $(TEST_LIB_DIR)/twiceatzero.o test/native/libs/twiceatzero.s
$(LD) -shared -o $(TEST_LIB_DIR)/libtwiceatzero.$(SOEXT) $(TEST_LIB_DIR)/twiceatzero.o --section-start=.seg1=0x4000 -z max-page-size=0x1000
endif
@touch $@
build/test/build-test-bins: $(TEST_BIN_SOURCES)
@mkdir -p $(TEST_BIN_DIR)
$(CC) -o $(TEST_BIN_DIR)/malloc_plt_dyn test/test/nativemem/malloc_plt_dyn.c
$(CC) -o $(TEST_BIN_DIR)/native_api -Isrc test/test/c/native_api.c -ldl
$(CC) -o $(TEST_BIN_DIR)/native_lock_contention test/test/nativelock/native_lock_contention.c -lpthread
$(CC) -o $(TEST_BIN_DIR)/profile_with_dlopen -Isrc test/test/nativemem/profile_with_dlopen.c -ldl
$(CC) -o $(TEST_BIN_DIR)/preload_malloc -Isrc test/test/nativemem/preload_malloc.c -ldl
$(CC) -o $(TEST_BIN_DIR)/nativemem_known_lib_crash -Isrc test/test/nativemem/nativemem_known_lib_crash.c -ldl
$(CXX) -o $(TEST_BIN_DIR)/non_java_app -std=c++11 $(INCLUDES) $(CPP_TEST_INCLUDES) test/test/nonjava/non_java_app.cpp $(LIBS)
@touch $@
test-cpp: build-test-cpp
echo "Running cpp tests..."
LD_LIBRARY_PATH="$(TEST_LIB_DIR)" DYLD_LIBRARY_PATH="$(TEST_LIB_DIR)" build/test/cpptests
test-java: build-test-java
echo "Running tests against $(LIB_PROFILER)"
$(TEST_JAVA) $(TEST_FLAGS) -ea -cp "build/$(TEST_JAR):build/jar/*:$(TEST_DEPS_DIR)/*:$(TEST_GEN_DIR)/*" one.profiler.test.Runner $(subst $(COMMA), ,$(TESTS))
coverage: override FAT_BINARY=false
coverage: clean-coverage
$(MAKE) test-cpp CXXFLAGS_EXTRA="-fprofile-arcs -ftest-coverage -fPIC -O0 --coverage"
mkdir -p build/test/coverage
cd build/test/ && gcovr -r ../.. --html-details --gcov-executable "$(GCOV)" -o coverage/index.html
rm -rf -- -.gc*
# unit tests shouldn't run if the user selects an integration test target
ifeq ($(TESTS),)
TEST_CPP := test-cpp
endif
test: $(TEST_CPP) test-java
$(TEST_DEPS_DIR):
mkdir -p $@
build/$(TEST_JAR): build/$(API_JAR) $(TEST_SOURCES) build/$(CONVERTER_JAR) $(TEST_DEPS_DIR)
rm -rf build/test/classes
mkdir -p build/test/classes
$(JAVAC) -source $(JAVA_TARGET) -target $(JAVA_TARGET) -Xlint:-options -XDignore.symbol.file \
-implicit:none \
-cp "build/jar/*:$(TEST_DEPS_DIR)/*:$(TEST_GEN_DIR)/*:test/stubs" \
-d build/test/classes \
$(TEST_SOURCES)
$(JAR) cf $@ -C build/test/classes .
update-otlp-classes-jar:
@if [ -z "$(OTEL_PROTO_PATH)" ]; then \
echo "'OTEL_PROTO_PATH' is empty"; \
exit 1; \
fi
rm -rf $(TMP_DIR)/gen/java $(TMP_DIR)/build
mkdir -p $(TMP_DIR)/gen/java $(TMP_DIR)/build $(TEST_GEN_DIR)
cd $(OTEL_PROTO_PATH) && protoc --java_out=$(TMP_DIR)/gen/java $$(find . \
-type f \
-name '*.proto' \
-not \( -name 'logs*.proto' -o -name 'metrics*.proto' -o -name 'trace*.proto' -o -name '*service.proto' \))
$(JAVAC) -source $(JAVA_TARGET) \
-target $(JAVA_TARGET) \
-cp $(TEST_DEPS_DIR)/* \
-d $(TMP_DIR)/build \
-Xlint:-options \
$$(find $(TMP_DIR)/gen/java -name "*.java")
$(JAR) cvf $(TEST_GEN_DIR)/opentelemetry-gen-classes.jar -C $(TMP_DIR)/build .
LINT_SOURCES=`ls -1 src/*.cpp src/*/*.cpp | grep -v rustDemangle.cpp`
CLANG_TIDY_ARGS_EXTRA=
cpp-lint:
clang-tidy $(LINT_SOURCES) $(CLANG_TIDY_ARGS_EXTRA) -- -x c++ $(CXXFLAGS) $(INCLUDES) $(DEFS) $(LIBS)
DIFF_BASE=
cpp-lint-diff:
git diff -U0 $(DIFF_BASE) -- 'src/*.cpp' 'src/**/*.cpp' 'src/*.h' 'src/**/*.h' ':!**/rustDemangle.cpp' | \
clang-tidy-diff.py -p1 $(CLANG_TIDY_ARGS_EXTRA) -- -x c++ $(CXXFLAGS) $(INCLUDES) $(DEFS) $(LIBS)
check-md:
prettier -c README.md "docs/**/*.md"
format-md:
prettier -w README.md "docs/**/*.md"
clean-coverage:
$(RM) -rf build/test/cpptests build/test/coverage
clean:
$(RM) -r build
================================================
FILE: README.md
================================================
# Async-profiler
This project is a low overhead sampling profiler for Java
that does not suffer from the [Safepoint bias problem](http://psy-lob-saw.blogspot.ru/2016/02/why-most-sampling-java-profilers-are.html).
It features HotSpot-specific API to collect stack traces
and to track memory allocations. The profiler works with
OpenJDK and other Java runtimes based on the HotSpot JVM.
Unlike traditional Java profilers, async-profiler monitors non-Java threads
(e.g., GC and JIT compiler threads) and shows native and kernel frames in stack traces.
What can be profiled:
- CPU time
- Allocations in Java Heap
- Native memory allocations and leaks
- Contended locks
- Hardware and software performance counters like cache misses, page faults, context switches
- and [more](docs/ProfilingModes.md).
See our [3 hours playlist](https://www.youtube.com/playlist?list=PLNCLTEx3B8h4Yo_WvKWdLvI9mj1XpTKBr)
to learn about more features.
# Download
### Stable release: [4.3](https://github.com/async-profiler/async-profiler/releases/tag/v4.3)
- Linux x64: [async-profiler-4.3-linux-x64.tar.gz](https://github.com/async-profiler/async-profiler/releases/download/v4.3/async-profiler-4.3-linux-x64.tar.gz)
- Linux arm64: [async-profiler-4.3-linux-arm64.tar.gz](https://github.com/async-profiler/async-profiler/releases/download/v4.3/async-profiler-4.3-linux-arm64.tar.gz)
- macOS arm64/x64: [async-profiler-4.3-macos.zip](https://github.com/async-profiler/async-profiler/releases/download/v4.3/async-profiler-4.3-macos.zip)
- Profile converters: [jfr-converter.jar](https://github.com/async-profiler/async-profiler/releases/download/v4.3/jfr-converter.jar)
### Nightly builds
[The most recent binaries](https://github.com/async-profiler/async-profiler/releases/tag/nightly) corresponding
to the latest successful commit in `master`.
For a build corresponding to one of the previous commits, go to
[Nightly Builds](https://github.com/async-profiler/async-profiler/actions/workflows/test-and-publish-nightly.yml),
click the desired build and scroll down to the artifacts section. These binaries are kept for 30 days.
# Quick start
In a typical use case, profiling a Java application is just a matter of a running `asprof` with a PID of a
running Java process.
```
$ asprof -d 30 -f flamegraph.html <PID>
```
The above command translates to: run profiler for 30 seconds and save results to `flamegraph.html`
as an interactive [Flame Graph](docs/FlamegraphInterpretation.md) that can be viewed in a browser.
[](https://htmlpreview.github.io/?https://github.com/async-profiler/async-profiler/blob/master/.assets/html/flamegraph.html)
Find more details in the [Getting started guide](docs/GettingStarted.md).
# Building
### Build status
[](https://github.com/async-profiler/async-profiler/actions/workflows/test-and-publish-nightly.yml)
### Minimum requirements
- make
- GCC 7.5.0+ or Clang 7.0.0+
- Static version of libstdc++ (e.g. on Amazon Linux 2023: `yum install libstdc++-static`)
- JDK 11+
### How to build
Make sure `gcc`, `g++` and `java` are available on the `PATH`.
Navigate to the root directory with async-profiler sources and run `make`.
async-profiler launcher will be available at `build/bin/asprof`.
Other Makefile targets:
- `make test` - run unit and integration tests;
- `make release` - package async-profiler binaries as `.tar.gz` (Linux) or `.zip` (macOS).
### Supported platforms
| | Officially maintained builds | Other available ports |
| --------- | ---------------------------- | ----------------------------------------- |
| **Linux** | x64, arm64 | x86, arm32, ppc64le, riscv64, loongarch64 |
| **macOS** | x64, arm64 | |
# Documentation
## Basic usage
- [Getting Started](docs/GettingStarted.md)
- [Profiler Options](docs/ProfilerOptions.md)
- [Profiling Modes](docs/ProfilingModes.md)
- [Integrating async-profiler](docs/IntegratingAsyncProfiler.md)
- [Profiling In Container](docs/ProfilingInContainer.md)
## Profiler output
- [Output Formats](docs/OutputFormats.md)
- [FlameGraph Interpretation](docs/FlamegraphInterpretation.md)
- [JFR Visualization](docs/JfrVisualization.md)
- [Converter Usage](docs/ConverterUsage.md)
- [Heatmap](docs/Heatmap.md)
## Advanced usage
- [CPU Sampling Engines](docs/CpuSamplingEngines.md)
- [Stack Walking Modes](docs/StackWalkingModes.md)
- [Advanced Stacktrace Features](docs/AdvancedStacktraceFeatures.md)
- [Profiling Non-Java Applications](docs/ProfilingNonJavaApplications.md)
## Troubleshooting
For known issues faced while running async-profiler and their detailed troubleshooting,
please refer [here](docs/Troubleshooting.md).
================================================
FILE: SECURITY.md
================================================
## Reporting Security Issues
We take all security reports seriously.
When we receive such reports,
we will investigate and subsequently address
any potential vulnerabilities as quickly as possible.
If you discover a potential security issue in this project,
please notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/).
Please do *not* create a public GitHub issue in this project.
================================================
FILE: docker/alpaquita.Dockerfile
================================================
FROM public.ecr.aws/bellsoft/alpaquita-linux-gcc:15.2-musl
RUN apk add --no-cache liberica21-jdk util-linux-misc curl
================================================
FILE: docker/alpine.Dockerfile
================================================
FROM public.ecr.aws/docker/library/amazoncorretto:11-alpine-jdk
RUN apk add --no-cache make gcc g++ linux-headers musl-dev util-linux patchelf gcovr bash tar curl
================================================
FILE: docker/amazonlinux2.Dockerfile
================================================
FROM public.ecr.aws/amazonlinux/amazonlinux:2
RUN amazon-linux-extras enable python3.8
RUN yum update -y && yum install -y git make python38 gcc10 gcc10-c++ binutils tar
ARG node_version=20.19.1
ARG node_sha256=babcd5b9e3216510b89305e6774bcdb2905ca98ff60028b67f163eb8296b6665
RUN curl -L --output node.tar.gz https://github.com/nodejs/node/archive/refs/tags/v${node_version}.tar.gz
RUN echo ${node_sha256} node.tar.gz | sha256sum -c
RUN mkdir /node
RUN tar xf node.tar.gz -C /node --strip-components=1
WORKDIR /node
ENV CC=gcc10-cc
ENV CXX=gcc10-c++
RUN ./configure
RUN make -j4 -s > /dev/null
RUN make install
FROM public.ecr.aws/amazonlinux/amazonlinux:2
COPY --from=0 /usr/local/bin/node /usr/local/bin/node
RUN amazon-linux-extras enable python3.8 && \
yum update -y && \
yum install -y gcc-c++ binutils make java-11-amazon-corretto patchelf tar python38 && \
yum clean all && \
rm -rf /var/cache/yum && \
python -m ensurepip && \
python -m pip install gcovr
ENV NODE_JS_LOCATION=/__e/node20
RUN cat <<EOF > /root/setup.sh
#!/bin/sh
mkdir -p "$NODE_JS_LOCATION/bin"
ln --force --symbolic "/usr/local/bin/node" "$NODE_JS_LOCATION/bin/node"
EOF
================================================
FILE: docker/amazonlinux2023.Dockerfile
================================================
FROM public.ecr.aws/amazonlinux/amazonlinux:2023
RUN yum update -y && \
yum install -y binutils findutils make tar gcc-c++ util-linux && \
yum clean all && \
rm -rf /var/cache/yum && \
python3 -m ensurepip && \
python3 -m pip install gcovr
================================================
FILE: docker/code-check.Dockerfile
================================================
# Image for all tasks related to static code analysis in async-profiler
FROM public.ecr.aws/docker/library/amazoncorretto:11-alpine-jdk
ADD --chmod=555 https://raw.githubusercontent.com/llvm/llvm-project/67be4fe3d5fd986a3149de3806bcf2c92320015e/clang-tools-extra/clang-tidy/tool/clang-tidy-diff.py /usr/bin/
RUN apk add --no-cache clang-extra-tools linux-headers make python3 git py3-pip bash
# Needed by clang-tidy-diff.py to merge multiple results in one file.
# '--break-system-packages' is needed because Alpine does not like other package managers than 'apk' ('pip' in this case) to install
# software globally, but it's safe to do in this case.
RUN pip install --break-system-packages pyyaml
ENV CPLUS_INCLUDE_PATH="/usr/lib/jvm/java-11-amazon-corretto/include:/usr/lib/jvm/java-11-amazon-corretto/include/linux"
================================================
FILE: docker/debian.Dockerfile
================================================
# Image for building async-profiler release packages
# Stage 0: download and build musl
FROM public.ecr.aws/debian/debian:10-slim
RUN apt-get update && apt-get install -y --no-install-recommends \
sudo libicu-dev patchelf curl make g++ openjdk-11-jdk-headless gcovr && \
rm -rf /var/cache/apt /var/lib/apt/lists/*
ARG musl_src=musl-1.2.5
ARG musl_sha256=a9a118bbe84d8764da0ea0d28b3ab3fae8477fc7e4085d90102b8596fc7c75e4
ADD https://musl.libc.org/releases/${musl_src}.tar.gz /
RUN echo ${musl_sha256} ${musl_src}.tar.gz | sha256sum -c
RUN ["/bin/bash", "-c", "\
tar xfz ${musl_src}.tar.gz && \
cd /${musl_src} && \
./configure --disable-shared --prefix=/usr/local/musl && \
make -j`nproc` && make install && make clean && \
ln -s /usr/include/$(arch)-linux-gnu/asm /usr/include/{asm-generic,linux} /usr/local/musl/include/"]
# Stage 1: install build tools + copy musl toolchain from the previous step
FROM public.ecr.aws/debian/debian:10-slim
# The following command should be exactly the same as at stage 0 to benefit from caching.
# libicu-dev is needed for the github actions runner
RUN apt-get update && apt-get install -y --no-install-recommends \
sudo libicu-dev patchelf curl make g++ openjdk-11-jdk-headless gcovr && \
rm -rf /var/cache/apt /var/lib/apt/lists/*
COPY --from=0 /usr/local/musl /usr/local/musl
================================================
FILE: docs/AdvancedStacktraceFeatures.md
================================================
# Advanced Stacktrace Features
## Display JIT compilation task
Async-profiler samples JIT compiler threads just the same way as Java threads, and hence can show
CPU percentage spent on JIT compilation. At the same time, Java methods are different:
some take more resources to compile, other take less. Furthermore, there are cases when
a bug in C2 compiler causes a JIT thread to stuck in an infinite loop consuming 100% CPU.
Async-profiler can highlight which particular Java methods take most CPU time to compile.

The feature can be enabled with the option `-F comptask` (or its agent equivalent `features=comptask`).
## Display actual implementation in vtable
In some applications, a significant amount of CPU time is spent on dispatching megamorphic virtual/interface calls.
async-profiler shows a pseudo-frame on top of v/itable stub with the actual type of object the virtual method is
called on. This should make clear the proportion of different receivers for the particular call site.

The feature can be enabled with the option `-F vtable` (or its agent equivalent `features=vtable`).
## Display instruction addresses
Sometimes, for low-level performance analysis, it is important to know where exactly
CPU time is spent inside a method. As an intermediate step to the instruction-level
profiling, async-profiler provides an option to record PC address of the currently
running method for each execution sample. In this case, each stack trace will include
a synthetic frame with the address at the top of every stack trace.

The feature can be enabled with the option `-F pcaddr` (or its agent equivalent `features=pcaddr`).
================================================
FILE: docs/ConverterUsage.md
================================================
# Converter Usage
async-profiler provides `jfrconv` utility to convert between different profile output formats.
`jfrconv` can be found at the same location as the `asprof` binary. Converter is also available
as a standalone Java application: [`jfr-converter.jar`](https://github.com/async-profiler/async-profiler/releases/latest/download/jfr-converter.jar).
## Supported conversions
| Source | html | collapsed | pprof | pb.gz | heatmap | otlp |
| --------- | ---- | --------- | ----- | ----- | ------- | ---- |
| jfr | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| html | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ |
| collapsed | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ |
## Usage
```
jfrconv [options] <input> [<input>...] <output>
```
The output format specified can be only one at a time for conversion from one format to another.
```
Conversion options:
-o --output FORMAT, -o can be omitted if the output file extension unambiguously determines the format, e.g. profile.collapsed
FORMAT can be any of the following:
# collapsed: This is a collection of call stacks, where each line is a semicolon separated
list of frames followed by a counter. This is used by the FlameGraph script to
generate the FlameGraph visualization of the profile data.
# html: FlameGraph is a hierarchical representation of call traces of the profiled
software in a color coded format that helps to identify a particular resource
usage like CPU and memory for the application.
# pprof: pprof is a profiling visualization and analysis tool from Google. More details on
pprof on the official github page https://github.com/google/pprof.
# pb.gz: This is a compressed version of pprof output.
# heatmap: A single page interactive heatmap that allows to explore profiling events
on a timeline.
# otlp: OpenTelemetry profile format.
Differential Flame Graph:
--diff <base-profile> <new-profile>
JFR options:
--cpu Generate only CPU profile during conversion
--cpu-time Generate only CPU profile, using CPUTimeSample events
--wall Generate only Wall clock profile during conversion
--alloc Generate only Allocation profile during conversion
--live Build allocation profile from live objects only during conversion
--nativemem Generate native memory allocation profile
--leak Only include memory leaks in nativemem
--tail RATIO Ignore tail allocations for leak profiling (10% by default)
--lock Generate only lock contention profile during conversion
--nativelock Generate only native (pthread) lock contention profile
--trace Convert only MethodTrace events
-t --threads Split stack traces by threads
-s --state LIST Filter thread states: runnable, sleeping, default. State name is case insensitive
and can be abbreviated, e.g. -s r
--classify Classify samples into predefined categories
--total Accumulate total value (time, bytes, etc.) instead of samples
--lines Show line numbers
--bci Show bytecode indices
--simple Simple class names instead of fully qualified names
--norm Normalize names of hidden classes/lambdas, e.g. Original JFR transforms
lambda names to something like pkg.ClassName$$Lambda+0x00007f8177090218/543846639
which gets normalized to pkg.ClassName$$Lambda
--dot Dotted class names, e.g. java.lang.String instead of java/lang/String
--from TIME Start time in ms (absolute or relative)
--to TIME End time in ms (absolute or relative)
TIME can be:
# an absolute timestamp specified in millis since epoch;
# an absolute time in hh:mm:ss or yyyy-MM-dd'T'hh:mm:ss format;
# a relative time from the beginning of recording;
# a relative time from the end of recording (a negative number).
--latency MS Retain only samples within MethodTraces of at least MS milliseconds
Flame Graph options:
--title STRING Convert to Flame Graph with provided title
--minwidth X Skip frames smaller than X%
--grain X Coarsen Flame Graph to the given grain size
--skip N Skip N bottom frames
-r --reverse Reverse stack traces (defaults to icicle graph)
-i --inverted Toggles the layout for reversed stacktraces from icicle to flamegraph
and for default stacktraces from flamegraph to icicle
-I --include REGEX Include only stacks with the specified frames, e.g. -I 'MyApplication\.main' -I 'VMThread.*'
-X --exclude REGEX Exclude stacks with the specified frames, e.g. -X '.*pthread_cond_(wait|timedwait).*'
--highlight REGEX Highlight frames matching the given pattern
```
See the [profiler options documentation](ProfilerOptions.md#options-applicable-to-flamegraph-and-tree-view-outputs-only) for details on the `--reverse` and `--inverted` options.
## jfrconv examples
`jfrconv` utility is provided in `bin` directory of the async-profiler package.
It requires JRE to be installed on the system.
### Generate Flame Graph from JFR
If no output file is specified, it defaults to a Flame Graph output.
```
jfrconv foo.jfr
```
Profiling in JFR mode allows multi-mode profiling. So the command above will generate a Flame Graph
output, however, for a multi-mode profile output with both `cpu` and `wall-clock` events, the
Flame Graph will have an aggregation of both in the view. Such a view wouldn't make much sense and
hence it is advisable to use JFR conversion filter options like `--cpu` to filter out events
during a conversion.
```
jfrconv --cpu foo.jfr
# which is equivalent to:
# jfrconv --cpu -o html foo.jfr foo.html
```
for HTML output as HTML is the default format for conversion from JFR.
### Flame Graph options
To add a custom title to the generated Flame Graph, use `--title`, which has the default value `Flame Graph`:
```
jfrconv --cpu foo.jfr foo.html -r --title "Custom Title"
```
### Differential Flame Graph
To find performance regressions, it may be useful to compare current profile
to a previous one that serves as a baseline. Differential Flame Graph
visualizes such a comparsion with a special color scheme:
- Red color denotes frames with more samples comparing to the baseline (i.e. regression);
- Blue is for frames with less samples;
- Yellow are new frames that were absent in the baseline.
The more intense the color, the larger the delta.
For each different frame, the delta value is displayed in a tooltip.

Differential Flame Graph takes the shape of the current profile:
all frames have exactly the same size as in the normal Flame Graph.
This means, frames that exist only in the base profile will not be visible.
To see such frames, create another differential Flame Graph,
swapping the base and the current input file.
To create differential Flame Graph, run `jfrconv --diff` with two input files:
basline profile and new profile. Both files can be in JFR, HTML, or collapsed format.
Other converter options work as usual.
```
jfrconv --cpu --diff baseline.jfr new.jfr diff.html
```
Output file name is optional. If omitted, `jfrconv` takes the name
of the second input file, replacing its extension with `.diff.html`.
## Standalone converter examples
Standalone converter jar is provided in
[Download](https://github.com/async-profiler/async-profiler/?tab=readme-ov-file#Download).
It accepts the same parameters as `jfrconv`.
Below is an example usage:
```
java -jar jfr-converter.jar --cpu foo.jfr --reverse --title "Application CPU profile"
```
================================================
FILE: docs/CpuSamplingEngines.md
================================================
# CPU Sampling Engines
Async-profiler has three options for CPU profiling: `-e cpu`, `-e itimer` and `-e ctimer`.
## cpu
`cpu` mode measures CPU time spent by the running threads. For example,
if an application uses 2 cpu cores, each with 30% utilization, and the sampling interval is
10ms, then the profiler will collect about `2 * 0.3 * 100 = 60` samples per second.
In other words, 1 profiling sample means that one CPU core was actively running for N nanoseconds,
where N is the profiling interval.
On Linux, `cpu` mode relies on [perf_events](https://man7.org/linux/man-pages/man2/perf_event_open.2.html).
One `perf_event` descriptor is created for each running thread and configured to generate a signal
every `N` nanoseconds of CPU time. This is the most accurate CPU sampler available in async-profiler
and the only one that can obtain kernel stack traces. It, however, comes with certain restrictions.
Most importantly, OS configuration may limit access to `perf_events` API, e.g.,
by `kernel.perf_event_paranoid` sysctl or by seccomp (which is often the case in a Docker container).
If `perf_events` are available, but kernel symbols are hidden (e.g., by `kernel.kptr_resitrct` setting),
async-profiler continues to use `perf_events`, emits a warning and does not show kernel stack traces.
Another important thing to consider is that `cpu` sampling engine allocates a descriptor per thread.
This means, if an application has too many threads and OS limit for the maximum number of open descriptors
(`ulimit -n`) is too low, an application may run out of file descriptors. The workaround
is to simply increase file descriptor limit.
## itimer
`itimer` mode is based on [setitimer(ITIMER_PROF)](https://man7.org/linux/man-pages/man2/setitimer.2.html)
syscall, which ideally generates a signal every given interval of CPU time consumed by the process.
Ideally, both `itimer` and `cpu` should collect the same number of samples. Typically,
profiles indeed look very similar. However, in [some cases](https://github.com/golang/go/issues/14434),
`cpu` profile appears more accurate, since a signal is delivered exactly to the thread
that overflowed a hardware counter. In contrast, `itimer` has the following limitations:
- Only one `itimer` signal can be delivered to a process at a time.
- Signals are not distributed evenly between running threads.
- Sampling resolution is limited by the size of [jiffies](https://man7.org/linux/man-pages/man7/time.7.html).
`itimer` profiles may be even less accurate on macOS, where `itimer` signals are often biased
towards system calls.
The main advantage of `itimer` is that it works in containers and does not consume file descriptors.
## ctimer
`ctimer` is a Linux-specific alternative for `cpu` profiling mode to overcome limitations
of `perf_events`, such as `perf_event_paraniod` setting, seccomp restriction or a low limit
for the number of open file descriptors. `ctimer` mode relies on
[timer_create](https://man7.org/linux/man-pages/man2/timer_create.2.html) API.
It combines benefits of `-e cpu` and `-e itimer`, except that it does not allow collecting kernel stacks.
Like with `itimer`, `ctimer` resolution is limited by the size of the jiffy -
kernel `HZ` constant, which is typically equal to 100 or 250, meaning that the minimum supported
profiling interval is 10ms or 4ms respectively.
## Summary
Here is a summary of advantages and drawbacks of all CPU profiling engines:
| Attribute | cpu (perf_events) | itimer | ctimer |
| --------------------------------- | :---------------: | :----: | :----: |
| Can collect kernel stack traces | ✅ | ❌ | ❌ |
| High resolution | ✅ | ❌ | ❌ |
| Accuracy / fairness | ✅ | ❌ | 🆗 |
| Works in containers by default | ❌ | ✅ | ✅ |
| Does not consume file descriptors | ❌ | ✅ | ✅ |
| macOS support | ❌ | ✅ | ❌ |
When using `-e cpu` on Linux, async-profiler automatically checks for `perf_events` availability
by trying to create a dummy perf_event. If kernel-space profiling is not available,
async-profiler transparently falls back to `ctimer` mode. To force using `perf_events`
for user-space only profiling, specify `-e cpu-clock --all-user` instead of `-e cpu`.
The actual profiling engine (`perf_events`, `ctimer`, etc.) is now recorded in `jfr` output.
================================================
FILE: docs/FlamegraphInterpretation.md
================================================
# FlameGraph interpretation
To interpret a flame graph, the best way forward is to understand how it is created.
## Example application to profile
Let's take the below example:
```
main() {
// some business logic
func3() {
// some business logic
func7();
}
// some business logic
func4();
// some business logic
func1() {
// some business logic
func5();
}
// some business logic
func2() {
// some business logic
func6() {
// some business logic
func8(); // cpu intensive work here
}
}
```
## Profiler sampling
Profiling starts by taking samples `X` times per second. Whenever a sample is taken,
the current call stack for it is saved. The diagram below shows the unsorted sampling view
before the sorting and aggregation takes place.

Below are the sampling numbers:
- `func3()->func7()`: 3 samples
- `func4()`: 1 sample
- `func1()->func5()`: 2 samples
- `func2()->func8()`: 4 samples
- `func2()->func6()`: 1 sample
## Sorting samples
Samples are then alphabetically sorted at the base level just after root (or main method) of the application.

Note that X-axis is no longer a timeline. Flame graph does not preserve information
on _when_ a particular stack trace was taken, it only indicates _how often_
a stack trace was observed during profiling.
## Aggregated view
The blocks for the same functions at each level of stack depth are then stitched together
to get an aggregated view of the flame graph.

In this example, except `func4()`, no other function actually consumes
any resource at the base level of stack depth. `func5()`, `func6()`,
`func7()` and `func8()` are the ones consuming resources, with `func8()`
being a likely candidate for performance optimization.
CPU utilization is the most common use case for flame graphs, however,
there are other modes of profiling like allocation profiling to view
heap utilization and wall-clock profiling to view latency.
[More on various modes of profiling](ProfilingModes.md)
## Understanding FlameGraph colors
Color is another flame graph dimension that may be used to encode additional information
about each frame. Colors may have different meaning in various flame graph implementations.
async-profiler uses the following palette to differentiate frame types:

================================================
FILE: docs/GettingStarted.md
================================================
# Getting started guide
## Before profiling
As of Linux 4.6, capturing kernel call stacks using `perf_events` from a non-root
process requires setting two kernel parameters. You can set them using sysctl as follows:
```
# sysctl kernel.perf_event_paranoid=1
# sysctl kernel.kptr_restrict=0
```
For better profiling accuracy, it is [recommended](Troubleshooting.md#known-limitations)
to start the JVM with `-XX:+UnlockDiagnosticVMOptions -XX:+DebugNonSafepoints` flags,
unless async-profiler is loaded at JVM startup.
## Find a process to profile
Common ways to find the target process include using
[`jps`](https://docs.oracle.com/en/java/javase/21/docs/specs/man/jps.html) and
[`pgrep`](https://man7.org/linux/man-pages/man1/pgrep.1.html).
For example, to list all Java process IDs with their full command lines, run
`pgrep -a java`. The next section includes an example using `jps`.
## Start profiling
async-profiler works in the context of the target Java application,
i.e. it runs as an agent in the process being profiled.
`asprof` is a tool to attach and control the agent.
A typical workflow would be to launch your Java application, attach
the agent and start profiling, exercise your performance scenario, and
then stop profiling. The agent's output, including the profiling results, will
be displayed on the console where you've started `asprof`.
Example:
```
$ jps
9234 Jps
8983 Computey
$ asprof start 8983
$ asprof stop 8983
```
The following may be used in lieu of the `pid` (8983):
- The keyword `jps`, which will find `pid` automatically, if there is a single Java process running in the system.
- The application name as it appears in the `jps` output: e.g. `Computey`
Alternatively, you may specify `-d` (duration) argument to profile
the application for a fixed period of time with a single command.
```
$ asprof -d 30 8983
```
By default, the profiling frequency is 100Hz (every 10ms of CPU time).
Here is a sample output of `asprof`:
```
--- Execution profile ---
Total samples: 687
Unknown (native): 1 (0.15%)
--- 6790000000 (98.84%) ns, 679 samples
[ 0] Primes.isPrime
[ 1] Primes.primesThread
[ 2] Primes.access$000
[ 3] Primes$1.run
[ 4] java.lang.Thread.run
... a lot of output omitted for brevity ...
ns percent samples top
---------- ------- ------- ---
6790000000 98.84% 679 Primes.isPrime
40000000 0.58% 4 __do_softirq
... more output omitted ...
```
This indicates that the hottest method was `Primes.isPrime`, and the hottest
call stack leading to it comes from `Primes.primesThread`.
## Other use cases
- [Launching as an agent](IntegratingAsyncProfiler.md#launching-as-an-agent)
- [Java API](IntegratingAsyncProfiler.md#using-java-api)
- [IntelliJ IDEA](IntegratingAsyncProfiler.md#intellij-idea)
## FlameGraph visualization
async-profiler provides out-of-the-box [Flame Graph](https://www.brendangregg.com/flamegraphs.html) support.
Specify `-o flamegraph` argument to dump profiling results as an interactive HTML Flame Graph.
Also, Flame Graph output format will be chosen automatically if the target filename ends with `.html`.
```
$ jps
9234 Jps
8983 Computey
$ asprof -d 30 -f /tmp/flamegraph.html 8983
```
[](https://htmlpreview.github.io/?https://github.com/async-profiler/async-profiler/blob/master/.assets/html/flamegraph.html)
The flame graph html can be opened in any browser of your choice for further interpretation.
Please refer to [Interpreting a Flame Graph](FlamegraphInterpretation.md)
to understand more on how to interpret a Flame Graph.
================================================
FILE: docs/Heatmap.md
================================================
# Heatmap
Problems to be solved with a profiler can be divided into two large categories:
1. Optimization of overall resource usage.
2. Troubleshooting of intermittent performance issues.
While flame graphs are handy for the first type of problems, they are not very helpful
for analyzing transient anomalies because they provide an aggregated view that lacks
any timeline information. To address the second type of problems, async-profiler offers
a converter from JFR format to an interactive heatmap in the form of a single-page HTML file.
Heatmap is an alternative representation of profile data that preserves timestamps
of particular samples. Essentially, it's a two-dimensional timeline composed of
colored blocks. Each block represents a short period of time (usually in the range of
milliseconds to seconds) with its color being the third dimension: the more intense
the color, the more events happened in a given period of time.

The idea of heatmaps was borrowed from [FlameScope](https://github.com/Netflix/flamescope),
however, FlameScope targets short profiling intervals up to a few minutes, whereas
async-profiler implementation is capable of visualizing 24-hour recordings
with the granularity of 20 milliseconds. Moreover, heatmaps produced by async-profiler
are serverless: they are standalone self-contained HTML files that can be easily shared
and viewed without additional software besides a browser.
## Heatmap features
### Whole day profile
Heatmaps are optimized for information density. Full day of continuous profiling
can be presented on a single image, where an engineer can spot regular activity
patterns as well as anomalies at a glance.
Heatmaps are also optimized for footprint. Specialized compression algorithms
can pack 1 GB original JFR recording to an HTML page of 10-15 MB in size.

### Scale / zoom
Depending on the recording duration and level of detail you are interested in,
you can switch between 3 available scales. On the largest scale, each vertical line
represents 5 minutes of wall clock time, with each square corresponding to
5 second interval. On the finest scale, each square corresponds to 20 milliseconds,
allowing you to analyze profiling samples with a high resolution.

### Instant flame graphs
A click on any heatmap square displays a flame graph for this specific time interval.

Hold mouse button to select an arbitrary time range on a heatmap.
A flame graph for the given time range will be built automatically.

### Compare time ranges
Select target time range as described above. Holding `Ctrl` key,
move mouse pointer to choose another time range that will serve as a baseline.
You will then get a differential flame graph highlighting stacks
that were seen more often in the target time range comparing to the baseline.

### Search
Press `Ctrl+F` and enter a regex to search on the entire heatmap.
Time intervals containing matched stacks will be highlighted on a heatmap in blue.
Matching frames, if any, will be also highlighted on a flame graph.
`Ctrl+Shift+F` does the same, except that a flame graph will
retain stacks with matching frames only. All other stacks will be filtered out.

## Producing heatmaps
Heatmaps can only be generated from recordings in JFR format.
Run [`jfrconv`](ConverterUsage.md) tool with `-o heatmap` option.
Standard `jfrconv` options (`--cpu`, `--alloc`, `--from`/`--to`, `--simple`, etc.)
are also applicable to heatmaps.
Example:
```
jfrconv --cpu -o heatmap profiler.jfr heatmap-cpu.html
```
================================================
FILE: docs/IntegratingAsyncProfiler.md
================================================
# Integrating async-profiler
## Launching as an agent
If you need to profile some code as soon as the JVM starts up, instead of using `asprof`,
it is possible to attach async-profiler as an agent on the command line. For example:
```
$ java -agentpath:/path/to/libasyncProfiler.so=start,event=cpu,file=profile.html ...
```
On macOS, the library name is `libasyncProfiler.dylib` instead of `libasyncProfiler.so`.
Agent library is configured through the JVMTI argument interface.
The argument string is a comma-separated list of [profiler options](ProfilerOptions.md):
```
option[=value],option[=value]...
```
`asprof` internally converts command line arguments to the above format and attaches
`libasyncProfiler.so` agent to a running process.
Another important use of attaching async-profiler as an agent is for continuous profiling.
## Using Java API
async-profiler can be controlled programmatically using Java API. The corresponding Java library
is published to Maven Central. You can [include it](https://mvnrepository.com/artifact/tools.profiler/async-profiler/latest)
just like any other Maven dependency:
```
<dependency>
<groupId>tools.profiler</groupId>
<artifactId>async-profiler</artifactId>
<version>X.Y</version>
</dependency>
```
### Example usage with the API
```
AsyncProfiler profiler = AsyncProfiler.getInstance();
```
The above gives us an instance of `AsyncProfiler` object which can be further used to start
actual profiling.
```
profiler.execute("start,jfr,event=cpu,file=/path/to/%p.jfr");
// do some meaningful work
profiler.execute("stop");
```
`%p` equates to the PID of the process. Filename may include other placeholders which
can be found in [Profiler Options](ProfilerOptions.md).
`file` should be specified only once, either in
`start` command with `jfr` output or in `stop` command with any other format.
## Intellij IDEA
Intellij IDEA comes bundled with async-profiler, which can be further configured to our needs
by selecting the `Java Profiler` menu option at `Settings/Preferences > Build, Execution, Deployment`.
Agent options can be modified for the specific use cases and also `Collect native calls` can be checked
to monitor non-java threads and native frames in Java stack traces.
================================================
FILE: docs/JfrVisualization.md
================================================
# JFR Visualization
JFR recordings produced by async-profiler can be viewed using multiple options explained below.
## Built-in converter
async-profiler provides a built-in converter `jfrconv` which can be used to convert `jfr` output
to a flame graph or one of the other supported formats. More details on the built-in converter usage
can be found [here](ConverterUsage.md).
## JMC
[JDK Mission Control](https://www.oracle.com/java/technologies/jdk-mission-control.html) (JMC)
is a popular GUI tool to analyze JFR recordings.
It has been originally developed to work in conjunction with the JDK Flight Recorder,
however, async-profiler recordings are also fully compatible with JMC.
When viewing async-profiler recordings in JMC, information on some tabs may be missing.
Developers are typically interested in the following sections:
- Java Application
- Method Profiling
- Memory
- Lock Instances
- JVM Internals
- TLAB Allocations
## IntelliJ IDEA
IntelliJ IDEA Ultimate has built-in JFR viewer that works perfectly with async-profiler recordings.
For the Community Edition, there is an open-source profiler [plugin](https://plugins.jetbrains.com/plugin/20937-java-jfr-profiler)
that allows you to profile Java applications with JFR and async-profiler as well as
open JFR files obtained outside IDE.
## JFR command line tool
JDK distributions include the `jfr` command line utility to filter, summarize and output
flight recording files into human-readable format. The
[official documentation](https://docs.oracle.com/en/java/javase/21/docs/specs/man/jfr.html)
provides complete information on how to manipulate the contents and translate it as per
developers' needs to debug performance issues with their Java applications.
================================================
FILE: docs/OutputFormats.md
================================================
# Output Formats
async-profiler currently supports the following output formats:
- `collapsed` - This is a collection of call stacks, where each line is a semicolon separated list of frames followed
by a counter. This is used by the FlameGraph script to generate the FlameGraph visualization of the profile data.
```
FileConverter.main;FileConverter.convertFile;FileConverter.saveResult 21
FileConverter.main;FileConverter.convertFile;FileConverter.saveResult;java/io/DataOutputStream.writeInt 1
FileConverter.main;FileConverter.convertFile;FileConverter.saveResult;java/io/DataOutputStream.writeInt;java/io/ByteArrayOutputStream.write 5
FileConverter.main;FileConverter.convertFile;FileConverter.saveResult;java/io/DataOutputStream.writeUTF;java/io/DataOutputStream.writeUTF 12
FileConverter.main;FileConverter.convertFile;FileConverter.saveResult;java/io/DataOutputStream.writeUTF;java/io/DataOutputStream.writeUTF;java/lang/String.length 3
FileConverter.main;FileConverter.convertFile;FileConverter.saveResult;java/io/DataOutputStream.writeUTF;java/io/DataOutputStream.writeUTF;java/io/DataOutputStream.write 6
start_thread;thread_native_entry;Thread::call_run;VMThread::run;VMThread::inner_execute;VMThread::evaluate_operation;VM_Operation::evaluate;VM_GenCollectForAllocation::doit;GenCollectedHeap::satisfy_failed_allocation;GenCollectedHeap::do_collection;GenCollectedHeap::collect_generation;DefNewGeneration::collect;DefNewGeneration::FastEvacuateFollowersClosure::do_void 12
start_thread;thread_native_entry;Thread::call_run;VMThread::run;VMThread::inner_execute;VMThread::evaluate_operation;VM_Operation::evaluate;VM_GenCollectForAllocation::doit;GenCollectedHeap::satisfy_failed_allocation;GenCollectedHeap::do_collection;GenCollectedHeap::collect_generation;DefNewGeneration::collect;DefNewGeneration::FastEvacuateFollowersClosure::do_void;void ContiguousSpace::oop_since_save_marks_iterate<DefNewScanClosure> 1
```
- `flamegraph` - FlameGraph is a hierarchical representation of call traces of the profiled software in a color coded
format. Read more on the [interpretation](FlamegraphInterpretation.md) of FlameGraphs.
[](https://htmlpreview.github.io/?https://github.com/async-profiler/async-profiler/blob/master/.assets/html/flamegraph.html)
- `tree` - Profile output generated in HTML format showing a tree view of resource usage beginning with the call stack
with the highest resource usage and then showing other call stacks in descending order of resource usage. Expanding a
parent frame follows the same hierarchical representation within that frame.

- `text` - If no output format is specified with `-o` and filename has no extension provided, profiled output is
generated in text format.
```
--- Execution profile ---
Total samples : 733
--- 8208 bytes (19.58%), 1 sample
[ 0] byte[]
[ 1] java.util.jar.Manifest$FastInputStream.<init>
[ 2] java.util.jar.Manifest$FastInputStream.<init>
[ 3] java.util.jar.Manifest.read
[ 4] java.util.jar.Manifest.<init>
[ 5] java.util.jar.Manifest.<init>
[ 6] java.util.jar.JarFile.getManifestFromReference
[ 7] java.util.jar.JarFile.getManifest
[ 8] jdk.internal.loader.URLClassPath$JarLoader$2.getManifest
[ 9] jdk.internal.loader.BuiltinClassLoader.defineClass
[10] jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull
[11] jdk.internal.loader.BuiltinClassLoader.loadClassOrNull
[12] jdk.internal.loader.BuiltinClassLoader.loadClass
[13] jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass
[14] java.lang.ClassLoader.loadClass
[15] java.lang.Class.forName0
[16] java.lang.Class.forName
[17] sun.launcher.LauncherHelper.loadMainClass
[18] sun.launcher.LauncherHelper.checkAndLoadMain
```
- `jfr` - profile format used by the JDK Flight Recorder. The `jfr` format collects data
about the JVM as well as the Java application running on it. async-profiler can generate output in `jfr` format
compatible with tools capable of viewing and analyzing `jfr` files. JDK Mission Control (JMC) and Intellij IDEA are
some of many options to visualize `jfr` files. More details [here](JfrVisualization.md).
- `otlp` - OpenTelemetry protocol format for [profiling data](https://opentelemetry.io/blog/2024/profiling).
Experimental feature: backward-incompatible changes may happen in future releases of async-profiler.
================================================
FILE: docs/ProfilerOptions.md
================================================
# Profiler options
The below tables list the profiler options available with `asprof` and also when
[launching as an agent](IntegratingAsyncProfiler.md#launching-as-an-agent).
Some tables are output specific, which means some options are applicable to only one or more output formats but not all.
```
Usage: asprof [action] [options] [PID]
```
## Actions
The below options are `action`s for async-profiler and common for both `asprof` binary and when launching as an agent.
| Option | Description |
| --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `start` | Start profiling in semi-automatic mode, i.e. profiler will run until `stop` command is explicitly called. |
| `resume` | Start or resume earlier profiling session that has been stopped. All the collected data remains valid. The profiling options are not preserved between sessions, and should be specified again. |
| `stop` | Stop profiling and print the report. |
| `dump` | Dump collected data without stopping profiling session. |
| `status` | Print profiling status: whether profiler is active and for how long. |
| `metrics` | Print profiler metrics in Prometheus format. |
| `list` | Show the list of profiling events available for the target process specified with PID. |
## General options
| asprof | Launch as agent | Description |
| -------------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `-o fmt` | `fmt` | Specifies what information to dump when profiling ends. For various dump option details, please refer to [Dump Option Appendix](#dump-option). |
| `-f FILENAME` | `file=FILENAME` | The file name to dump the profile information to.<br>`%p` in the file name is expanded to the PID of the target JVM;<br>`%t` - to the timestamp;<br>`%n{MAX}` - to the sequence number;<br>`%{ENV}` - to the value of the given environment variable.<br>Example: `asprof -o collapsed -f /tmp/traces-%t.txt 8983` |
| `-d N` | N/A | asprof-only option designed for interactive use. It is a shortcut for running 3 actions: start, sleep for N seconds, stop. If no `start`, `resume`, `stop` or `status` option is given, the profiler will run for the specified period of time and then automatically stop.<br>Example: `asprof -d 30 <pid>` |
| `--timeout N` | `timeout=N` | The profiling duration, in seconds. The profiler will run for the specified period of time and then automatically stop.<br>Example: `java -agentpath:/path/to/libasyncProfiler.so=start,event=cpu,timeout=30,file=profile.html <application>` |
| `--loop TIME` | `loop=TIME` | Run profiler in a loop (continuous profiling). The argument is either a clock time (`hh:mm:ss`) or a loop duration in `s`econds, `m`inutes, `h`ours, or `d`ays. Make sure the filename includes a timestamp pattern, or the output will be overwritten on each iteration.<br>Example: `asprof --loop 1h -f /var/log/profile-%t.jfr 8983` |
| `-e --event EVENT` | `event=EVENT` | The profiling event: `cpu`, `alloc`, `nativemem`, `lock`, `cache-misses` etc. Use `list` to see the complete list of available events.<br>Please refer to [Profiling Modes](ProfilingModes.md) for additional information. |
| `-i --interval N` | `interval=N` | Interval has different meaning depending on the event. For CPU profiling, it's CPU time in nanoseconds. In wall clock mode, it's wall clock time. For Java method profiling or native function profiling, it's number of calls. For PMU profiling, it's number of events. Time intervals may be followed by `s` for seconds, `ms` for milliseconds, `us` for microseconds or `ns` for nanoseconds.<br>Example: `asprof -e cpu -i 5ms 8983` |
| `--alloc N` | `alloc=N` | Allocation profiling interval in bytes or in other units, if N is followed by `k` (kilobytes), `m` (megabytes), or `g` (gigabytes). |
| `--tlab` | `tlab` | Use TLAB events for allocation profiling |
| `--live` | `live` | Retain allocation samples with live objects only (object that have not been collected by the end of profiling session). Useful for finding Java heap memory leaks. |
| `--nativemem N` | `nativemem=N` | Native memory allocation profiling. N, if specified is the interval in bytes or in other units, if N is followed by `k` (kilobytes), `m` (megabytes), or `g` (gigabytes). Default N is 0. |
| `--nofree` | `nofree` | Will not record free calls in native memory allocation profiling. This is relevant when tracking memory leaks is not important and there are lots of free calls. |
| `--trace METHOD[:T]` | `trace=METHOD[:T]` | Java method to be traced, optionally followed by a latency threshold.<br>Example: `--trace my.pkg.Class.Method:50ms`.<br>Latency threshold defaults to 0 (all calls are profiled). Can be used multiple times. |
| `--lock TIME` | `lock=TIME` | In lock profiling mode, sample contended locks whenever total lock wait time overflows the specified threshold. |
| `--nativelock TIME` | `nativelock=TIME ` | In native lock profiling mode, sample contended pthread locks (mutex/rwlock) whenever total lock wait time overflows the specified threshold. |
| `--wall INTERVAL` | `wall=INTERVAL` | Wall clock profiling interval. Use this option instead of `-e wall` to enable wall clock profiling with another event, typically `cpu`.<br>Example: `asprof -e cpu --wall 100ms -f combined.jfr 8983`. |
| `--nobatch` | `nobatch` | Disable wall clock profiling optimization. Async-profiler will emit one `jdk.ExecutionSample` event for each wall clock sample instead of batching them in a custom `profiler.WallClockSample` event. |
| `-j N` | `jstackdepth=N` | Sets the maximum stack depth. The default is 2048.<br>Example: `asprof -j 30 8983` |
| `-F features` | `features=LIST` | Comma separated (or `+` separated when launching as an agent) list of stack walking features. Supported features are:<ul><li>`stats` - log stack walking performance stats.</li><li>`vtable` - display targets of megamorphic virtual calls as an extra frame on top of `vtable stub` or `itable stub`.</li><li>`comptask` - display current compilation task (a Java method being compiled) in a JIT compiler stack trace.</li><li>`pcaddr` - display instruction addresses .</li></ul>More details [here](AdvancedStacktraceFeatures.md). |
| `-L level` | `loglevel=level` | Log level: `debug`, `info`, `warn`, `error` or `none`. |
| N/A | `log=FILENAME` | Dedicated file for log messages. Used internally by asprof. |
| N/A | `quiet` | Do not log "Profiling started/stopped" message. Used internally by asprof. |
| N/A | `server=ADDRESS` | Start insecure HTTP server with the given IP address/port to control the profiler. This option can be specified as `-agentpath` argument only. Be careful not to expose async-profiler server in a public network. |
| `--all-user` | `alluser` | Include only user-mode events. This option is helpful when kernel profiling is restricted by `perf_event_paranoid` settings. |
| `--sched` | `sched` | Group threads by Linux-specific scheduling policy: BATCH/IDLE/OTHER. |
| `--cstack MODE` | `cstack=MODE` | How to walk native frames (C stack). Possible modes are `fp` (Frame Pointer), `dwarf` (DWARF unwind info), `vm`, `vmx` (HotSpot VM Structs) and `no` (do not collect C stack).<br><br>By default, C stack is shown in cpu, ctimer, wall-clock and perf-events profiles. Java-level events like `alloc` and `lock` collect only Java stack. |
| `--signal NUM` | `signal=NUM` | Use alternative signal for cpu or wall clock profiling. To change both signals, specify two numbers separated by a slash: `--signal SIGCPU/SIGWALL`. |
| `--clock SOURCE` | `clock=SOURCE` | Clock source for JFR timestamps: `tsc` (default) or `monotonic` (equivalent for `CLOCK_MONOTONIC`). |
| `--begin function` | `begin=FUNCTION` | Automatically start profiling when the specified native function is executed. |
| `--end function` | `end=FUNCTION` | Automatically stop profiling when the specified native function is executed. |
| `--ttsp` | `ttsp` | Time-to-safepoint profiling. An alias for `--begin SafepointSynchronize::begin --end RuntimeService::record_safepoint_synchronized`.<br>It is not a separate event type, but rather a constraint. Whatever event type you choose (e.g. `cpu` or `wall`), the profiler will work as usual, except that only events between the safepoint request and the start of the VM operation will be recorded. |
| `--nostop` | `nostop` | Record profiling window between `--begin` and `--end`, but do not stop profiling outside window. |
| `--libpath PATH` | N/A | Full path to `libasyncProfiler.so` (useful when profiling a container from the host). |
| `--filter FILTER` | `filter=FILTER` | In the wall-clock profiling mode, profile only threads with the specified ids.<br>Example: `asprof -e wall -d 30 --filter 120-127,132,134 Computey` |
| `--fdtransfer` | `fdtransfer` | Run a background process that provides access to perf_events to an unprivileged process. `--fdtransfer` is useful for profiling a process in a container (which lacks access to perf_events) from the host.<br>See [Profiling Java in a container](ProfilingInContainer.md). |
| `--target-cpu` | `target-cpu` | In perf_events profiling mode, instruct the profiler to only sample threads running on the specified CPU, defaults to -1.<br>Example: `asprof --target-cpu 3`. |
| `--record-cpu` | `record-cpu` | In perf_events profiling mode, instruct the profiler to capture which CPU a sample was taken on. |
| `-v --version` | `version` | Prints the version of profiler library. If PID is specified, gets the version of the library loaded into the given process. |
## Options applicable to JFR output only
| asprof | Launch as agent | Description |
| ------------------- | ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--chunksize N` | `chunksize=N` | Approximate size for a single JFR chunk. A new chunk will be started whenever specified size is reached. The default `chunksize` is 100MB.<br>Example: `asprof -f profile.jfr --chunksize 100m 8983` |
| `--chunktime N` | `chunktime=N` | Approximate time limit for a single JFR chunk. A new chunk will be started whenever specified time limit is reached. The default `chunktime` is 1 hour.<br>Example: `asprof -f profile.jfr --chunktime 1h 8983` |
| `--jfropts OPTIONS` | `jfropts=OPTIONS` | Comma separated list of JFR recording options. Currently, the only available option is `mem` supported on Linux 3.17+. `mem` enables accumulating events in memory instead of flushing synchronously to a file. |
| `--jfrsync CONFIG` | `jfrsync[=CONFIG]` | Start Java Flight Recording with the given configuration synchronously with the profiler. The output .jfr file will include all regular JFR events, except that execution samples will be obtained from async-profiler. This option implies `-o jfr`.<br>`CONFIG` is a predefined JFR profile or a JFR configuration file (.jfc) or a list of JFR events started with `+`.<br>Example: `asprof -e cpu --jfrsync profile -f combined.jfr 8983` |
| `--proc INTERVAL` | `proc=INTERVAL` | Collect statistics about other processes in the system. Default sampling interval is 30s. |
| `--all` | `all` | Shorthand for enabling `cpu`, `wall`, `alloc`, `live`, `lock`, `nativelock`, `nativemem`, and `proc` profiling simultaneously. This can be combined with `--alloc 2m --lock 10ms` etc. to pass custom interval/threshold. It is also possible to combine it with `-e` argument to change the type of event being collected (default is `cpu`). This is not recommended for production, especially for continuous profiling. |
## Options applicable to FlameGraph and Tree view outputs only
| asprof | Launch as agent | Description |
| -------------------- | ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--title TITLE` | `title=TITLE` | Custom title of a FlameGraph.<br>Example: `asprof -f profile.html --title "Sample CPU profile" 8983` |
| `--minwidth PERCENT` | `minwidth=PERCENT` | Minimum frame width as a percentage. Smaller frames will not be visible.<br>Example: `asprof -f profile.html --minwidth 0.5 8983` |
| `--reverse` | `reverse` | Reverse stack traces (defaults to icicle graph).<br>Example: `asprof -f profile.html --reverse 8983` |
| `--inverted` | `inverted` | Toggles the layout for reversed stacktraces from icicle to flamegraph and for default stacktraces from flamegraph to icicle.<br>Example: `asprof -f profile.html --inverted 8983` |
Notice that `--reverse` and `--inverted` are orthogonal settings. By default, flamegraphs grow from bottom to top (because flames grow from bottom to top). The outermost frames (e.g. the `main()` function) are shown at the bottom while the innermost, leaf frames are shown at the top. If such a flame graph is mirrored on the y-axis, it becomes an icicle graph (icicles grow top-down). The default setting for this layout can be toggled with the `--inverted` option when the graph is created or changed later with the `Invert` button which is located in the upper-left corner of the generated HTML page, when the graph is displayed.
By default, async-profiler merges stack traces starting from the outermost (e.g. `main()`) frames and displays them from bottom to top in a flamegraph. The `--reverse` option can be used to create reverse stack traces, i.e. merge them starting with the innermost, leaf frames. By default, reversed stack traces are displayed from top to bottom as icicle graphs. The default layout setting for both, normal and reversed stack traces can be changed with the `--inverted` option.
## Options applicable to any output format except JFR
| asprof | Launch as agent | Description |
| -------------- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `-t --threads` | `threads` | Profile threads separately. Each stack trace will end with a frame that denotes a single thread.<br>Example: `asprof -t 8983` |
| `-s --simple` | `simple` | Print simple class names instead of fully qualified names. |
| `-n --norm` | `norm` | Normalize names of hidden classes / lambdas. |
| `-g --sig` | `sig` | Print method signatures. |
| `-a --ann` | `ann` | Annotate JIT compiled methods with `_[j]`, inlined methods with `_[i]`, interpreted methods with `_[0]` and C1 compiled methods with `_[1]`. FlameGraph and Tree view will color frames depending on their type regardless of this option. |
| `-l --lib` | `lib` | Prepend library names to symbols, e.g. ``libjvm.so`JVM_DefineClassWithSource``. |
| `--dot` | `dot` | Dotted class names, e.g. `java.lang.String` instead of `java/lang/String`. |
| `--samples` | `samples` | Count the number of samples. This is the default aggregation option. |
| `--total` | `total` | Count the total value of the collected metric instead of the number of samples, e.g. total allocation size. |
| `-I PATTERN` | `include=PATTERN` | Filter stack traces by the given pattern(s). `-I` defines the name pattern that _must_ be present in the stack traces. `-I` can be specified multiple times. A pattern may begin or end with a star `*` that denotes any (possibly empty) sequence of characters.<br>Example: `asprof -I 'Primes.*' -I 'java/*' 8983` |
| `-X PATTERN` | `exclude=PATTERN` | Filter stack traces by the given pattern(s). `-X` defines the name pattern that _must not_ occur in any of stack traces in the output. `-X` can be specified multiple times. A pattern may begin or end with a star `*` that denotes any (possibly empty) sequence of characters.<br>Example: `asprof -X '*Unsafe.park*' 8983` |
| N/A | `mcache[=AGE]` | Maximum age of the method name cache. Default is `0` (do not cache method names between profiling sessions). |
## Appendix
### Dump Option
`-o fmt` - specifies what information to dump when profiling ends.
`fmt` can be one of the following options:
- `traces[=N]` - dump call traces (at most N samples);
- `flat[=N]` - dump flat profile (top N hot methods);
- can be combined with `traces`, e.g. `traces=200,flat=200`
- `jfr` - dump events in JDK Flight Recorder format readable by JDK Mission Control.
- `collapsed` - dump collapsed call traces in the format used by
[FlameGraph](https://github.com/brendangregg/FlameGraph) script. This is
a collection of call stacks, where each line is a semicolon separated list
of frames followed by a counter.
- `flamegraph` - produce Flame Graph in HTML format.
- `tree` - produce Call Tree in HTML format.
- `--reverse` option will generate backtrace view.
- `otlp` - dump events in OpenTelemetry format.
It is possible to specify multiple dump options at the same time.
================================================
FILE: docs/ProfilingInContainer.md
================================================
# Profiling Java in a container
async-profiler provides the ability to profile Java processes running in a Docker or LXC
container both from within a container and from the host system.
When profiling from the host, `pid` should be the Java process ID in the host
namespace. Use `ps aux | grep java` or `docker top <container>` to find
the process ID.
async-profiler should be run from the host by a privileged user - it will
automatically switch to the proper pid/mount namespace and change
user credentials to match the target process. Also make sure that
the target container can access `libasyncProfiler.so` by the same
absolute path as on the host. Alternatively, specify `--libpath` option
to override path to `libasyncProfiler.so` in a container.
By default, Docker container restricts the access to `perf_event_open`
syscall. There are 3 alternatives to allow profiling in a container:
1. You can modify the [seccomp profile](https://docs.docker.com/engine/security/seccomp/)
or disable it altogether with `--security-opt seccomp=unconfined` option. In
addition, `--cap-add SYS_ADMIN` may be required.
2. You can use "fdtransfer": see the help for `--fdtransfer`.
3. Last, you may fall back to `-e ctimer` profiling mode, see [Troubleshooting](Troubleshooting.md).
================================================
FILE: docs/ProfilingModes.md
================================================
# Profiling modes
Besides CPU time, async-profiler provides various other profiling modes such as `Allocation`, `Wall Clock`, `Java Method`
and even a `Multiple Events` profiling mode.
## CPU profiling
In this mode, profiler collects stack trace samples that include **Java** methods,
**native** calls, **JVM** code and **kernel** functions.
The general approach is receiving call stacks generated by `perf_events`
and matching them up with call stacks generated by `AsyncGetCallTrace`,
in order to produce an accurate profile of both Java and native code.
Additionally, async-profiler provides a workaround to recover stack traces
in some [corner cases](https://bugs.openjdk.java.net/browse/JDK-8178287)
where `AsyncGetCallTrace` fails.
This approach has the following advantages compared to using `perf_events`
directly with a Java agent that translates addresses to Java method names:
- Does not require `-XX:+PreserveFramePointer`, which introduces
performance overhead that can be sometimes as high as 10%.
- Does not require starting JVM with an agent for translating Java code addresses
to method names.
- Displays interpreter frames.
- Does not produce large intermediate files (perf.data) for further processing in
user space scripts.
If you wish to resolve frames within `libjvm`, the [debug symbols](#installing-debug-symbols) are required.
## ALLOCATION profiling
The profiler can be configured to collect call sites where the largest amount
of heap memory is allocated.
async-profiler does not use intrusive techniques like bytecode instrumentation
or expensive DTrace probes which have significant performance impact.
It also does not affect Escape Analysis or prevent from JIT optimizations
like allocation elimination. Only actual heap allocations are measured.
The profiler features TLAB-driven sampling. It relies on HotSpot-specific
callbacks to receive two kinds of notifications:
- when an object is allocated in a newly created TLAB;
- when an object is allocated on a slow path outside TLAB.
Sampling interval can be adjusted with `--alloc` option.
For example, `--alloc 500k` will take one sample after 500 KB of allocated
space on average. Prior to JDK 11, intervals less than TLAB size will not take effect.
In allocation profiling mode, the top frame of every call trace is the class
of the allocated object, and the counter is the heap pressure (the total size
of allocated TLABs or objects outside TLAB).
### Installing Debug Symbols
Prior to JDK 11, the allocation profiler required HotSpot debug symbols.
Some OpenJDK distributions (Amazon Corretto, Liberica JDK, Azul Zulu)
already have them embedded in `libjvm.so`, other OpenJDK builds typically
provide debug symbols in a separate package. For example, to install
OpenJDK debug symbols on Debian / Ubuntu, run:
```
# apt install openjdk-17-dbg
```
(replace `17` with the desired version of JDK).
On CentOS, RHEL and some other RPM-based distributions, this could be done with
[debuginfo-install](http://man7.org/linux/man-pages/man1/debuginfo-install.1.html) utility:
```
# debuginfo-install java-1.8.0-openjdk
```
On Gentoo, the `icedtea` OpenJDK package can be built with the per-package setting
`FEATURES="nostrip"` to retain symbols.
The `gdb` tool can be used to verify if debug symbols are properly installed for the `libjvm` library.
For example, on Linux:
```
$ gdb $JAVA_HOME/lib/server/libjvm.so -ex 'info address UseG1GC'
```
This command's output will either contain `Symbol "UseG1GC" is at 0xxxxx`
or `No symbol "UseG1GC" in current context`.
## Native memory leaks
The profiling mode `nativemem` records `malloc`, `realloc`, `calloc` and `free` calls
with the addresses, so that allocations can be matched with frees. This helps to focus
the profile report only on unfreed allocations, which are the likely to be a source of a memory leak.
Example:
```
asprof start -e nativemem -f app.jfr <YourApp>
# or
asprof start --nativemem N -f app.jfr <YourApp>
# or if only allocation calls are interesting, do not collect free calls:
asprof start --nativemem N --nofree -f app.jfr <YourApp>
asprof stop <YourApp>
```
Now we need to process the jfr file, to find native memory leaks:
```
# --total for bytes, default counts invocations.
jfrconv --total --nativemem --leak app.jfr app-leak.html
# No leak analysis, include all native allocations:
jfrconv --total --nativemem app.jfr app-malloc.html
```
When `--leak` option is used, the generated flame graph will show allocations without matching `free` calls.

To avoid bias towards youngest allocations not freed by the end of the profiling session,
leak profiler ignores tail allocations made in the last 10% of the profiling period.
Tail length can be altered with `--tail` option that accepts `ratio` or `percent%` as an argument.
For example, to ignore allocations in the last 2 minutes of a 10 minutes profile, use
```
jfrconv --nativemem --leak --tail 20% app.jfr app-leak.html
```
The overhead of `nativemem` profiling depends on the number of native allocations,
but is usually small enough even for production use. If required, the overhead can be reduced
by configuring the profiling interval. E.g. if you add `nativemem=1m` profiler option,
allocation samples will be limited to at most one sample per allocated megabyte.
### Using LD_PRELOAD for finding native memory leaks
Similar to Java applications, `nativemem` mode can be also used with [non-Java processes](ProfilingNonJavaApplications.md).
Run an application with `nativemem` profiler that dumps recordings in JFR format every 10 minutes:
```
LD_PRELOAD=/path/to/libasyncProfiler.so ASPROF_COMMAND=start,nativemem,total,loop=10m,cstack=dwarf,file=profile-%t.jfr NativeApp [args]
```
Then run `jfrconv` to generate memory leak report as a flame graph:
```
jfrconv --total --nativemem --leak <profile>.jfr <profile>-leak.html
```
## Wall-clock profiling
`-e wall` option tells async-profiler to sample all threads equally every given
period of time regardless of thread status: Running, Sleeping or Blocked.
For instance, this can be helpful when profiling application start-up time.
Wall-clock profiler is most useful in per-thread mode: `-t`.
Example: `asprof -e wall -t -i 50ms -f result.html 8983`
## Lock profiling
`-e lock` option tells async-profiler to measure lock contention in the profiled application. Lock profiling can help
developers understand lock acquisition patterns, lock contention (when threads have to wait to acquire locks), time
spent waiting for locks and which code paths are blocked due to locks.
In lock profiling mode, the top frame is the class of lock/monitor, and the counter is number of nanoseconds it took to
enter this lock/monitor.
Example: `asprof -e lock -t -i 5ms -f result.html 8983`
## Native lock profiling
`--nativelock` option tells async-profiler to measure pthread lock contention in the profiled application.
Native lock profiling can help developers understand pthread lock acquisition patterns, lock contention (when threads
have to wait to acquire native locks), time spent waiting for pthread mutexes and read-write locks, and which code paths
are blocked due to native synchronization primitives.
Native lock profiling works by intercepting calls to:
- [`pthread_mutex_lock`](https://man7.org/linux/man-pages/man3/pthread_mutex_lock.3p.html)
- [`pthread_rwlock_rdlock`](https://man7.org/linux/man-pages/man3/pthread_rwlock_rdlock.3p.html)
- [`pthread_rwlock_wrlock`](https://man7.org/linux/man-pages/man3/pthread_rwlock_wrlock.3p.html)
In this mode, the top frame shows the native function that experienced contention (e.g., pthread_mutex_lock_hook),
and the counter represents the number of nanoseconds threads spent waiting to acquire the lock.
Key differences from Java lock profiling:
- Profiles native pthread locks instead of Java monitors.
- Works with C/C++ applications and native libraries used by Java applications.
- Captures contention in native code paths that Java lock profiling cannot see.
Example: `asprof --nativelock 5ms -t -f result.html 8983`
## Java method profiling
`-e ClassName.methodName` option instruments the given Java method
in order to record all invocations of this method with the stack traces.
Example: `-e java.util.Properties.getProperty` will profile all places
where `getProperty` method is called from.
Only non-native Java methods are supported. To profile a native method,
use hardware breakpoint event instead, e.g. `-e Java_java_lang_Throwable_fillInStackTrace`
**Be aware** that if you attach async-profiler at runtime, the first instrumentation
of a non-native Java method may cause the [deoptimization](https://github.com/openjdk/jdk/blob/bf2e9ee9d321ed289466b2410f12ad10504d01a2/src/hotspot/share/prims/jvmtiRedefineClasses.cpp#L4092-L4096)
of all compiled methods. The subsequent instrumentation flushes only the _dependent code_.
The massive CodeCache flush doesn't occur if attaching async-profiler as an agent.
### Latency profiling
Please refer to our blog post on [latency profiling](https://github.com/async-profiler/async-profiler/discussions/1497)
to know more about this profiling mode.
## Native function profiling
Here are some useful native functions to profile:
- `G1CollectedHeap::humongous_obj_allocate` - trace _humongous allocations_ of the G1 GC,
- `JVM_StartThread` - trace creation of new Java threads,
- `Java_java_lang_ClassLoader_defineClass1` - trace class loading.
## Multiple events
It is possible to profile CPU, allocations, and locks at the same time.
Instead of CPU, you may choose any other execution event: wall-clock,
perf event, tracepoint, Java method, etc.
The only output format that supports multiple events together is JFR.
The recording will contain the following event types:
- `jdk.ExecutionSample`
- `jdk.ObjectAllocationInNewTLAB` (alloc)
- `jdk.ObjectAllocationOutsideTLAB` (alloc)
- `jdk.JavaMonitorEnter` (lock)
- `jdk.ThreadPark` (lock)
To start profiling cpu + allocations + locks together, specify
```
asprof -e cpu,alloc,lock -f profile.jfr ...
```
or use `--alloc` and `--lock` parameters with the desired threshold:
```
asprof -e cpu --alloc 2m --lock 10ms -f profile.jfr ...
```
The same, when starting profiler as an agent:
```
-agentpath:/path/to/libasyncProfiler.so=start,event=cpu,alloc=2m,lock=10ms,file=profile.jfr
```
### Multi-event profiling using `--all`
The `--all` flag offers a way to simultaneously enable predefined collection of common profiling events. By default, `--all` activates profiling for `cpu`, `wall`, `alloc`, `live`, `lock` and `nativemem`.
**Important consideration**
While the `--all` flag can be useful for development environments to get a wide overview, it is not recommended to enable this in production, especially for continuous profiling. Users are invited to select carefully what to profile and with what settings.
**Sample command:**
This command enables the default set of events included in `--all`:
```
asprof --all -f profile.jfr
```
or combine it with `--alloc`/`--wall`/`--lock`/`--nativemem` options to override individual settings. For example:
```
asprof --all --alloc 2m --lock 10ms -f profile.jfr
```
The same, when starting profiler as an agent:
```
-agentpath:/path/to/libasyncProfiler.so=start,all,alloc=2m,lock=10ms,file=profile.jfr
```
Instead of `cpu`, it is possible to override the `--all` parameter with any other event type of your choice. For instance, the following command will profile `cycles` along with ` wall`, `alloc`, `live`, `lock` and `nativemem`:
```
asprof --all -e cycles -f profile.jfr
```
## Continuous profiling
Continuous profiling is a means by which an application can be profiled
continuously and dump profile results every specified time period.
It is a very effective technique in finding performance degradations proactively
and efficiently. Continuous profiling helps users to understand performance
differences between versions of the same application. Recent outputs can
be compared with continuous profiling output history to find differences
and optimize the changes introduced in case of performance degradations.
aysnc-profiler provides the ability to continously profile an application with
the `loop` option. Make sure the filename includes a timestamp pattern, or the
output will be overwritten on each iteration.
```
asprof --loop 1h -f /var/log/profile-%t.jfr 8983
```
## perf event types supported on Linux
| Usage | Description |
| ----------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Predefined: | |
| `-e cpu-clock` | High-resolution per-CPU timer. Similar to `-e cpu` but forces using perf_events. |
| `-e page-faults` | Software page faults |
| `-e context-switches` | Context switches |
| `-e cycles` | Total CPU cycles |
| `-e ref-cycles` | CPU reference cycles, not affected by CPU frequency scaling |
| `-e instructions` | Retired CPU instructions |
| `-e cache-references` | Cache accesses (usually Last Level Cache, but may depend on the architecture) |
| `-e cache-misses` | Cache accesses requiring fetching data from a higher-level cache or main memory |
| `-e bran
gitextract_mgjkhml2/
├── .assets/
│ └── html/
│ └── flamegraph.html
├── .clang-tidy
├── .gitattributes
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug-report.yml
│ │ ├── config.yml
│ │ ├── documentation.yml
│ │ └── feature-request.yml
│ ├── PULL_REQUEST_TEMPLATE.md
│ └── workflows/
│ ├── build.yml
│ ├── clang-tidy-review.yml
│ ├── code-check.yml
│ ├── integ.yml
│ ├── linters.yml
│ └── test-and-publish-nightly.yml
├── .gitignore
├── .licenserc.yaml
├── CHANGELOG.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── Makefile
├── README.md
├── SECURITY.md
├── docker/
│ ├── alpaquita.Dockerfile
│ ├── alpine.Dockerfile
│ ├── amazonlinux2.Dockerfile
│ ├── amazonlinux2023.Dockerfile
│ ├── code-check.Dockerfile
│ └── debian.Dockerfile
├── docs/
│ ├── AdvancedStacktraceFeatures.md
│ ├── ConverterUsage.md
│ ├── CpuSamplingEngines.md
│ ├── FlamegraphInterpretation.md
│ ├── GettingStarted.md
│ ├── Heatmap.md
│ ├── IntegratingAsyncProfiler.md
│ ├── JfrVisualization.md
│ ├── OutputFormats.md
│ ├── ProfilerOptions.md
│ ├── ProfilingInContainer.md
│ ├── ProfilingModes.md
│ ├── ProfilingNonJavaApplications.md
│ ├── StackWalkingModes.md
│ └── Troubleshooting.md
├── pom-converter.xml
├── pom.xml
├── src/
│ ├── allocTracer.cpp
│ ├── allocTracer.h
│ ├── api/
│ │ └── one/
│ │ └── profiler/
│ │ ├── Agent.java
│ │ ├── AsyncProfiler.java
│ │ ├── AsyncProfilerMXBean.java
│ │ ├── Counter.java
│ │ ├── Events.java
│ │ └── MANIFEST.MF
│ ├── arch.h
│ ├── arguments.cpp
│ ├── arguments.h
│ ├── asprof.cpp
│ ├── asprof.h
│ ├── callTraceStorage.cpp
│ ├── callTraceStorage.h
│ ├── chk.cpp
│ ├── codeCache.cpp
│ ├── codeCache.h
│ ├── converter/
│ │ └── one/
│ │ ├── convert/
│ │ │ ├── Arguments.java
│ │ │ ├── BidirectionalIndex.java
│ │ │ ├── CallStack.java
│ │ │ ├── Classifier.java
│ │ │ ├── FlameGraph.java
│ │ │ ├── Frame.java
│ │ │ ├── Index.java
│ │ │ ├── JfrConverter.java
│ │ │ ├── JfrToFlame.java
│ │ │ ├── JfrToHeatmap.java
│ │ │ ├── JfrToOtlp.java
│ │ │ ├── JfrToPprof.java
│ │ │ ├── Main.java
│ │ │ ├── OtlpConstants.java
│ │ │ ├── ResourceProcessor.java
│ │ │ └── TimeIntervals.java
│ │ ├── heatmap/
│ │ │ ├── Heatmap.java
│ │ │ ├── HtmlOut.java
│ │ │ ├── HuffmanEncoder.java
│ │ │ ├── LzNodeTree.java
│ │ │ ├── Method.java
│ │ │ ├── SampleList.java
│ │ │ ├── StackStorage.java
│ │ │ └── SynonymTable.java
│ │ ├── jfr/
│ │ │ ├── ClassRef.java
│ │ │ ├── Dictionary.java
│ │ │ ├── DictionaryInt.java
│ │ │ ├── Element.java
│ │ │ ├── JfrClass.java
│ │ │ ├── JfrField.java
│ │ │ ├── JfrReader.java
│ │ │ ├── MethodRef.java
│ │ │ ├── StackTrace.java
│ │ │ └── event/
│ │ │ ├── AllocationSample.java
│ │ │ ├── CPULoad.java
│ │ │ ├── ContendedLock.java
│ │ │ ├── Event.java
│ │ │ ├── EventAggregator.java
│ │ │ ├── EventCollector.java
│ │ │ ├── ExecutionSample.java
│ │ │ ├── GCHeapSummary.java
│ │ │ ├── LiveObject.java
│ │ │ ├── MallocEvent.java
│ │ │ ├── MallocLeakAggregator.java
│ │ │ ├── MethodTrace.java
│ │ │ ├── NativeLockEvent.java
│ │ │ ├── ObjectCount.java
│ │ │ └── ProcessSample.java
│ │ └── proto/
│ │ └── Proto.java
│ ├── cpuEngine.cpp
│ ├── cpuEngine.h
│ ├── ctimer.h
│ ├── ctimer_linux.cpp
│ ├── demangle.cpp
│ ├── demangle.h
│ ├── dictionary.cpp
│ ├── dictionary.h
│ ├── dwarf.cpp
│ ├── dwarf.h
│ ├── engine.cpp
│ ├── engine.h
│ ├── event.h
│ ├── fdtransfer.h
│ ├── fdtransferClient.h
│ ├── fdtransferClient_linux.cpp
│ ├── flameGraph.cpp
│ ├── flameGraph.h
│ ├── flightRecorder.cpp
│ ├── flightRecorder.h
│ ├── frameName.cpp
│ ├── frameName.h
│ ├── helper/
│ │ └── one/
│ │ └── profiler/
│ │ ├── Instrument.java
│ │ ├── JfrSync.java
│ │ ├── LockTracer.java
│ │ └── Server.java
│ ├── hooks.cpp
│ ├── hooks.h
│ ├── incbin.h
│ ├── index.h
│ ├── instrument.cpp
│ ├── instrument.h
│ ├── itimer.cpp
│ ├── itimer.h
│ ├── j9Ext.cpp
│ ├── j9Ext.h
│ ├── j9ObjectSampler.cpp
│ ├── j9ObjectSampler.h
│ ├── j9StackTraces.cpp
│ ├── j9StackTraces.h
│ ├── j9WallClock.cpp
│ ├── j9WallClock.h
│ ├── jattach/
│ │ ├── jattach.c
│ │ ├── jattach_hotspot.c
│ │ ├── jattach_openj9.c
│ │ ├── psutil.c
│ │ └── psutil.h
│ ├── javaApi.cpp
│ ├── javaApi.h
│ ├── jfrMetadata.cpp
│ ├── jfrMetadata.h
│ ├── launcher/
│ │ └── launcher.sh
│ ├── linearAllocator.cpp
│ ├── linearAllocator.h
│ ├── lockTracer.cpp
│ ├── lockTracer.h
│ ├── log.cpp
│ ├── log.h
│ ├── lookup.cpp
│ ├── lookup.h
│ ├── main/
│ │ ├── fdtransferServer.h
│ │ ├── fdtransferServer_linux.cpp
│ │ └── main.cpp
│ ├── mallocTracer.cpp
│ ├── mallocTracer.h
│ ├── mutex.cpp
│ ├── mutex.h
│ ├── nativeLockTracer.cpp
│ ├── nativeLockTracer.h
│ ├── objectSampler.cpp
│ ├── objectSampler.h
│ ├── os.h
│ ├── os_linux.cpp
│ ├── os_macos.cpp
│ ├── otlp.cpp
│ ├── otlp.h
│ ├── perfEvents.h
│ ├── perfEvents_linux.cpp
│ ├── processSampler.cpp
│ ├── processSampler.h
│ ├── profiler.cpp
│ ├── profiler.h
│ ├── protobuf.cpp
│ ├── protobuf.h
│ ├── res/
│ │ ├── flame.html
│ │ ├── heatmap.html
│ │ └── tree.html
│ ├── rustDemangle.cpp
│ ├── rustDemangle.h
│ ├── safeAccess.cpp
│ ├── safeAccess.h
│ ├── spinLock.h
│ ├── stackFrame.h
│ ├── stackFrame_aarch64.cpp
│ ├── stackFrame_arm.cpp
│ ├── stackFrame_i386.cpp
│ ├── stackFrame_loongarch64.cpp
│ ├── stackFrame_ppc64.cpp
│ ├── stackFrame_riscv64.cpp
│ ├── stackFrame_x64.cpp
│ ├── stackWalker.cpp
│ ├── stackWalker.h
│ ├── symbols.h
│ ├── symbols_linux.cpp
│ ├── symbols_macos.cpp
│ ├── threadFilter.cpp
│ ├── threadFilter.h
│ ├── threadLocalData.cpp
│ ├── threadLocalData.h
│ ├── trap.cpp
│ ├── trap.h
│ ├── tsc.cpp
│ ├── tsc.h
│ ├── userEvents.cpp
│ ├── userEvents.h
│ ├── vmEntry.cpp
│ ├── vmEntry.h
│ ├── vmStructs.cpp
│ ├── vmStructs.h
│ ├── wallClock.cpp
│ ├── wallClock.h
│ ├── writer.cpp
│ ├── writer.h
│ └── zInit.cpp
└── test/
├── gen/
│ └── opentelemetry-gen-classes.jar
├── native/
│ ├── argumentsTest.cpp
│ ├── demangleTest.cpp
│ ├── instrumentTest.cpp
│ ├── libs/
│ │ ├── callsmalloc.c
│ │ ├── jnimalloc.c
│ │ ├── jninativelocks.c
│ │ ├── jninativestacks.c
│ │ ├── malloc.c
│ │ ├── multiplematching.s
│ │ ├── reladyn.c
│ │ ├── twiceatzero.s
│ │ ├── vaddrdif.c
│ │ └── vaddrdif.ld
│ ├── nativeLockTest.cpp
│ ├── perfEventsLinuxTest.cpp
│ ├── processInfoTest.cpp
│ ├── protobufBufferTest.cpp
│ ├── safeAccessTest.cpp
│ ├── symbolsTest.cpp
│ ├── testRunner.cpp
│ └── testRunner.hpp
├── one/
│ └── profiler/
│ └── test/
│ ├── Arch.java
│ ├── Assert.java
│ ├── Jvm.java
│ ├── Os.java
│ ├── Output.java
│ ├── RunnableTest.java
│ ├── Runner.java
│ ├── SourceCode.java
│ ├── Test.java
│ ├── TestDeclaration.java
│ ├── TestProcess.java
│ ├── TestResult.java
│ ├── TestStatus.java
│ └── Tests.java
├── stubs/
│ └── com/
│ └── google/
│ └── protobuf/
│ ├── ByteString.java
│ ├── CodedInputStream.java
│ ├── GeneratedMessageV3.java
│ ├── InvalidProtocolBufferException.java
│ ├── MessageOrBuilder.java
│ └── ProtocolStringList.java
└── test/
├── alloc/
│ ├── AllocTests.java
│ ├── Hello.java
│ ├── MapReader.java
│ ├── MapReaderOpt.java
│ └── RandomBlockRetainer.java
├── api/
│ ├── ApiTests.java
│ ├── BusyLoops.java
│ ├── DumpCollapsed.java
│ ├── DumpOtlp.java
│ ├── JavaAgent.java
│ ├── MetricsTest.java
│ └── StopResume.java
├── c/
│ ├── CTests.java
│ └── native_api.c
├── comptask/
│ ├── ComptaskTests.java
│ └── Main.java
├── cpu/
│ ├── CpuBurner.java
│ └── CpuTests.java
├── cstack/
│ ├── CstackTests.java
│ └── LongInitializer.java
├── instrument/
│ ├── CpuBurner.java
│ ├── CpuBurnerManyTargets.java
│ ├── InstrumentTests.java
│ ├── MethodTracingStop.java
│ └── Recursive.java
├── jfr/
│ ├── CpuLoad.java
│ ├── JfrCpuProfiling.java
│ ├── JfrMultiModeProfiling.java
│ ├── JfrTests.java
│ └── Ttsp.java
├── jfrconverter/
│ ├── JfrconverterTests.java
│ ├── Tracer.java
│ ├── sample1.collapsed
│ └── sample2.collapsed
├── kernel/
│ ├── KernelTests.java
│ └── ListFiles.java
├── lock/
│ ├── DatagramTest.java
│ └── LockTests.java
├── nativelock/
│ ├── AllNativeLocks.java
│ ├── NativeLock.java
│ ├── NativelockTests.java
│ └── native_lock_contention.c
├── nativemem/
│ ├── CallsAllNoLeak.java
│ ├── CallsMallocCalloc.java
│ ├── CallsRealloc.java
│ ├── Native.java
│ ├── NativememTests.java
│ ├── malloc_plt_dyn.c
│ ├── nativemem_known_lib_crash.c
│ ├── preload_malloc.c
│ └── profile_with_dlopen.c
├── nonjava/
│ ├── JavaClass.java
│ ├── NonjavaTests.java
│ └── non_java_app.cpp
├── otlp/
│ ├── CpuBurner.java
│ ├── OtlpProfileTimeTest.java
│ └── OtlpTests.java
├── pmu/
│ ├── Dictionary.java
│ └── PmuTests.java
├── proc/
│ ├── BasicApp.java
│ ├── CpuIntensiveApp.java
│ ├── IoIntensiveApp.java
│ ├── ManyProcessApp.java
│ ├── MemoryIntensiveApp.java
│ ├── MultiThreadApp.java
│ ├── ProcTests.java
│ └── ShortLivedApp.java
├── recovery/
│ ├── CodingIntrinsics.java
│ ├── Numbers.java
│ ├── RecoveryTests.java
│ ├── StringBuilderTest.java
│ ├── Suppliers.java
│ └── TimeLoop.java
├── smoke/
│ ├── Alloc.java
│ ├── Cpu.java
│ ├── LoadLibrary.java
│ ├── SmokeTests.java
│ └── Threads.java
├── stackwalker/
│ ├── StackGenerator.java
│ └── StackwalkerTests.java
├── vmstructs/
│ └── VmstructsTests.java
├── vtable/
│ └── VtableTests.java
└── wall/
├── BusyClient.java
├── IdleClient.java
├── SocketTest.java
└── WallTests.java
SYMBOL INDEX (2018 symbols across 289 files)
FILE: src/allocTracer.cpp
function Error (line 21) | Error AllocTracer::initialize() {
function Error (line 99) | Error AllocTracer::start(Arguments& args) {
FILE: src/allocTracer.h
function class (line 16) | class AllocTracer : public Engine {
FILE: src/api/one/profiler/Agent.java
class Agent (line 11) | public class Agent {
method premain (line 13) | public static void premain(String args) throws Exception {
method agentmain (line 17) | public static void agentmain(String args) throws Exception {
FILE: src/api/one/profiler/AsyncProfiler.java
class AsyncProfiler (line 19) | public class AsyncProfiler implements AsyncProfilerMXBean {
method AsyncProfiler (line 22) | private AsyncProfiler() {
method getInstance (line 25) | public static AsyncProfiler getInstance() {
method getInstance (line 29) | public static synchronized AsyncProfiler getInstance(String libPath) {
method extractEmbeddedLib (line 65) | private static File extractEmbeddedLib() {
method getPlatformTag (line 94) | private static String getPlatformTag() {
method start (line 122) | @Override
method resume (line 138) | @Override
method stop (line 151) | @Override
method getSamples (line 161) | @Override
method getVersion (line 169) | @Override
method execute (line 187) | @Override
method dumpCollapsed (line 201) | @Override
method dumpTraces (line 216) | @Override
method dumpFlat (line 231) | @Override
method dumpOtlp (line 247) | @Override
method addThread (line 262) | public void addThread(Thread thread) {
method removeThread (line 272) | public void removeThread(Thread thread) {
method filterThread (line 276) | private void filterThread(Thread thread, boolean enable) {
method start0 (line 290) | private native void start0(String event, long interval, boolean reset)...
method stop0 (line 292) | private native void stop0() throws IllegalStateException;
method execute0 (line 294) | private native String execute0(String command) throws IllegalArgumentE...
method execute1 (line 296) | private native byte[] execute1(String command) throws IllegalArgumentE...
method filterThread0 (line 298) | private native void filterThread0(Thread thread, boolean enable);
FILE: src/api/one/profiler/AsyncProfilerMXBean.java
type AsyncProfilerMXBean (line 19) | public interface AsyncProfilerMXBean {
method start (line 22) | void start(String event, long interval) throws IllegalStateException;
method resume (line 23) | void resume(String event, long interval) throws IllegalStateException;
method stop (line 24) | void stop() throws IllegalStateException;
method getSamples (line 26) | long getSamples();
method getVersion (line 27) | String getVersion();
method execute (line 29) | String execute(String command) throws IllegalArgumentException, Illega...
method dumpCollapsed (line 31) | String dumpCollapsed(Counter counter);
method dumpTraces (line 32) | String dumpTraces(int maxTraces);
method dumpFlat (line 33) | String dumpFlat(int maxMethods);
method dumpOtlp (line 34) | byte[] dumpOtlp();
FILE: src/api/one/profiler/Counter.java
type Counter (line 11) | public enum Counter {
FILE: src/api/one/profiler/Events.java
class Events (line 11) | public class Events {
FILE: src/arch.h
type u8 (line 25) | typedef unsigned char u8;
type u16 (line 26) | typedef unsigned short u16;
type u32 (line 27) | typedef unsigned int u32;
type u64 (line 28) | typedef unsigned long long u64;
function T (line 41) | inline T loadAcquire(T& var) {
function storeRelease (line 46) | inline void storeRelease(T& var, U value) {
type instruction_t (line 52) | typedef unsigned char instruction_t;
type instruction_t (line 72) | typedef unsigned int instruction_t;
type instruction_t (line 93) | typedef unsigned int instruction_t;
type instruction_t (line 113) | typedef unsigned int instruction_t;
type instruction_t (line 135) | typedef unsigned int instruction_t;
type instruction_t (line 159) | typedef unsigned int instruction_t;
FILE: src/arguments.cpp
function Error (line 41) | Error Arguments::parse(const char* args) {
type tm (line 470) | struct tm
function Output (line 507) | Output Arguments::detectOutputFormat(const char* file) {
FILE: src/arguments.h
type SHORT_ENUM (line 30) | enum SHORT_ENUM
type SHORT_ENUM (line 42) | enum SHORT_ENUM
type Style (line 47) | enum Style {
type SHORT_ENUM (line 58) | enum SHORT_ENUM
type SHORT_ENUM (line 66) | enum SHORT_ENUM
type SHORT_ENUM (line 72) | enum SHORT_ENUM
type JfrOption (line 83) | enum JfrOption {
type EventMask (line 96) | enum EventMask {
type StackWalkFeatures (line 107) | struct StackWalkFeatures {
type Multiplier (line 118) | struct Multiplier {
function class (line 128) | class Error {
function class (line 148) | class Arguments {
FILE: src/asprof.cpp
function asprof_error_t (line 13) | static asprof_error_t asprof_error(const char* msg) {
function DLLEXPORT (line 18) | DLLEXPORT void asprof_init() {
function DLLEXPORT (line 22) | DLLEXPORT const char* asprof_error_str(asprof_error_t err) {
function DLLEXPORT (line 26) | DLLEXPORT asprof_error_t asprof_execute(const char* command, asprof_writ...
function DLLEXPORT (line 55) | DLLEXPORT asprof_thread_local_data* asprof_get_thread_local_data(void) {
function DLLEXPORT (line 59) | DLLEXPORT asprof_jfr_event_key asprof_register_jfr_event(const char* nam...
function DLLEXPORT (line 65) | DLLEXPORT asprof_error_t asprof_emit_jfr_event(asprof_jfr_event_key type...
FILE: src/asprof.h
type asprof_error_t (line 39) | typedef asprof_error_t (*asprof_execute_t)(const char* command, asprof_w...
type asprof_thread_local_data (line 42) | typedef struct {
type asprof_thread_local_data (line 64) | typedef asprof_thread_local_data* (*asprof_get_thread_local_data_t)(void);
type asprof_jfr_event_key (line 67) | typedef int asprof_jfr_event_key;
type asprof_jfr_event_key (line 78) | typedef asprof_jfr_event_key (*asprof_register_jfr_event_t)(const char* ...
type asprof_error_t (line 100) | typedef asprof_error_t (*asprof_emit_jfr_event_t)(asprof_jfr_event_key t...
FILE: src/callTraceStorage.cpp
class LongHashTable (line 17) | class LongHashTable {
method getSize (line 26) | static size_t getSize(u32 capacity) {
method LongHashTable (line 32) | static LongHashTable* allocate(LongHashTable* prev, u32 capacity) {
method LongHashTable (line 42) | LongHashTable* destroy() {
method usedMemory (line 48) | size_t usedMemory() {
method LongHashTable (line 52) | LongHashTable* prev() {
method u32 (line 56) | u32 capacity() {
method u32 (line 60) | u32 size() {
method u32 (line 64) | u32 incSize() {
method u64 (line 68) | u64* keys() {
method CallTraceSample (line 72) | CallTraceSample* values() {
method clear (line 76) | void clear() {
function u32 (line 104) | u32 CallTraceStorage::capacity() {
function u64 (line 170) | u64 CallTraceStorage::calcHash(int num_frames, ASGCT_CallFrame* frames) {
function CallTrace (line 201) | CallTrace* CallTraceStorage::storeCallTrace(int num_frames, ASGCT_CallFr...
function CallTrace (line 214) | CallTrace* CallTraceStorage::findCallTrace(LongHashTable* table, u64 has...
function u32 (line 233) | u32 CallTraceStorage::put(int num_frames, ASGCT_CallFrame* frames, u64 c...
FILE: src/callTraceStorage.h
type CallTrace (line 18) | struct CallTrace {
function setTrace (line 23) | struct CallTraceSample {
function class (line 44) | class CallTraceStorage {
FILE: src/chk.cpp
function WEAK (line 17) | WEAK DLLEXPORT
FILE: src/codeCache.cpp
function CodeBlob (line 114) | CodeBlob* CodeCache::findBlob(const char* name) {
function CodeBlob (line 124) | CodeBlob* CodeCache::findBlobByAddress(const void* address) {
function FrameDesc (line 294) | FrameDesc* CodeCache::findFrameDesc(const void* pc) {
FILE: src/codeCache.h
type ImportId (line 20) | enum ImportId {
type ImportType (line 38) | enum ImportType {
type Mark (line 44) | enum Mark {
function class (line 52) | class NativeFunc {
function class (line 83) | class CodeBlob {
function class (line 107) | class CodeCache {
function class (line 219) | class CodeCacheArray {
FILE: src/converter/one/convert/Arguments.java
class Arguments (line 13) | public class Arguments {
method Arguments (line 51) | public Arguments(String... args) {
method alias (line 90) | private static String alias(char c) {
method toCamelCase (line 113) | private static String toCamelCase(String name) {
method parseRatio (line 121) | private static double parseRatio(String value) {
method parseTimestamp (line 129) | private static long parseTimestamp(String time) {
FILE: src/converter/one/convert/BidirectionalIndex.java
class BidirectionalIndex (line 10) | public class BidirectionalIndex<T> extends Index<T> {
method BidirectionalIndex (line 13) | public BidirectionalIndex(Class<T> cls, T empty) {
method BidirectionalIndex (line 17) | public BidirectionalIndex(Class<T> cls, T empty, int initialCapacity) {
method index (line 23) | @Override
method getKey (line 36) | public T getKey(int idx) {
FILE: src/converter/one/convert/CallStack.java
class CallStack (line 10) | public class CallStack {
method push (line 15) | public void push(String name, byte type) {
method pop (line 25) | public void pop() {
method clear (line 29) | public void clear() {
FILE: src/converter/one/convert/Classifier.java
class Classifier (line 12) | abstract class Classifier {
type Category (line 14) | enum Category {
method Category (line 33) | Category(String title, byte type) {
method getCategory (line 39) | public Category getCategory(StackTrace stackTrace) {
method detectGcJit (line 51) | private Category detectGcJit(long[] methods, byte[] types) {
method detectClassLoading (line 73) | private Category detectClassLoading(long[] methods, byte[] types) {
method detectOther (line 100) | private Category detectOther(long[] methods, byte[] types) {
method getMethodName (line 145) | protected abstract String getMethodName(long method, byte type);
FILE: src/converter/one/convert/FlameGraph.java
class FlameGraph (line 18) | public class FlameGraph implements Comparator<Frame> {
method FlameGraph (line 42) | public FlameGraph(Arguments args) {
method parseCollapsed (line 46) | public void parseCollapsed(Reader in) throws IOException {
method parseHtml (line 73) | public void parseHtml(Reader in) throws IOException {
method rebuild (line 144) | private void rebuild(Frame frame, CallStack stack, String[] strings) {
method addSample (line 157) | public void addSample(CallStack stack, long ticks) {
method diff (line 184) | public void diff(FlameGraph base) {
method diff (line 190) | private void diff(Frame base, Frame current) {
method translateKey (line 200) | private int translateKey(int key) {
method dump (line 204) | public void dump(OutputStream out) throws IOException {
method dump (line 210) | public void dump(PrintStream out) {
method printCpool (line 251) | private void printCpool(PrintStream out) {
method printFrame (line 268) | private void printFrame(PrintStream out, Frame frame, int level, long ...
method printFrameCollapsed (line 323) | private void printFrameCollapsed(PrintStream out, Frame frame, String[...
method excludeStack (line 351) | private boolean excludeStack(CallStack stack) {
method fillFrameCounters (line 371) | private static void fillFrameCounters(Frame frame, byte type, long tic...
method addChild (line 386) | private Frame addChild(Frame frame, String title, byte type, long tick...
method detectType (line 408) | private static byte detectType(String title) {
method isThreadFrame (line 429) | private static boolean isThreadFrame(String name, byte type) {
method getCommonPrefix (line 433) | private static int getCommonPrefix(String a, String b) {
method escape (line 443) | private static String escape(String s) {
method unescape (line 449) | private static String unescape(String s) {
method compare (line 455) | @Override
method parse (line 460) | public static FlameGraph parse(String input, Arguments args) throws IO...
method convert (line 472) | public static void convert(String input, String output, Arguments args...
FILE: src/converter/one/convert/Frame.java
class Frame (line 10) | public class Frame extends HashMap<Integer, Frame> {
method Frame (line 28) | private Frame(int key) {
method Frame (line 32) | Frame(int titleIndex, byte type) {
method getChild (line 36) | Frame getChild(int titleIndex, byte type) {
method getTitleIndex (line 40) | int getTitleIndex() {
method getType (line 44) | byte getType() {
method depth (line 56) | int depth(long cutoff) {
FILE: src/converter/one/convert/Index.java
class Index (line 21) | public class Index<T> extends HashMap<T, Integer> {
method Index (line 24) | public Index(Class<T> cls, T empty) {
method Index (line 28) | public Index(Class<T> cls, T empty, int initialCapacity) {
method index (line 34) | public int index(T key) {
method keys (line 45) | @SuppressWarnings("unchecked")
FILE: src/converter/one/convert/JfrConverter.java
class JfrConverter (line 19) | public abstract class JfrConverter extends Classifier {
method JfrConverter (line 25) | public JfrConverter(JfrReader jfr, Arguments args) {
method convert (line 33) | public void convert() throws IOException {
method readLatencyTimeIntervals (line 53) | protected final TimeIntervals readLatencyTimeIntervals() throws IOExce...
method createCollector (line 78) | protected EventCollector createCollector(Arguments args) {
method collectEvents (line 82) | protected void collectEvents(TimeIntervals timeIntervals) throws IOExc...
method convertChunk (line 121) | protected void convertChunk() {
method excludeStack (line 125) | protected boolean excludeStack(int stackId, int threadId, long classId) {
method toThreadState (line 168) | protected int toThreadState(String name) {
method getThreadStates (line 180) | protected BitSet getThreadStates(boolean cpu) {
method toTicks (line 192) | protected long toTicks(long millis) {
method getMethodName (line 202) | @Override
method resolveMethodName (line 211) | private String resolveMethodName(long methodId, byte methodType) {
method getClassName (line 233) | public String getClassName(long classId) {
method toJavaClassName (line 252) | private String toJavaClassName(byte[] symbol, int start, boolean dotte...
method getStackTraceElement (line 307) | public StackTraceElement getStackTraceElement(long methodId, byte meth...
method getThreadName (line 324) | public String getThreadName(int tid) {
method isNativeFrame (line 330) | protected boolean isNativeFrame(byte methodType) {
method getValueType (line 338) | public String getValueType() {
method getSampleUnits (line 345) | public String getSampleUnits() {
method getTotalUnits (line 349) | public String getTotalUnits() {
method counterFactor (line 354) | public double counterFactor() {
class AggregatedEventVisitor (line 360) | protected abstract class AggregatedEventVisitor implements EventCollec...
method visit (line 363) | @Override
method visit (line 368) | protected abstract void visit(Event event, long value);
FILE: src/converter/one/convert/JfrToFlame.java
class JfrToFlame (line 22) | public class JfrToFlame extends JfrConverter {
method JfrToFlame (line 25) | public JfrToFlame(JfrReader jfr, Arguments args) {
method convertChunk (line 30) | @Override
method dump (line 74) | public void dump(OutputStream out) throws IOException {
method parse (line 78) | public static FlameGraph parse(String input, Arguments args) throws IO...
method convert (line 86) | public static void convert(String input, String output, Arguments args...
FILE: src/converter/one/convert/JfrToHeatmap.java
class JfrToHeatmap (line 22) | public class JfrToHeatmap extends JfrConverter {
method JfrToHeatmap (line 25) | public JfrToHeatmap(JfrReader jfr, Arguments args) {
method createCollector (line 30) | @Override
method dump (line 80) | public void dump(OutputStream out) throws IOException {
method convert (line 86) | public static void convert(String input, String output, Arguments args...
FILE: src/converter/one/convert/JfrToOtlp.java
class JfrToOtlp (line 24) | public class JfrToOtlp extends JfrConverter {
method JfrToOtlp (line 43) | public JfrToOtlp(JfrReader jfr, Arguments args) {
method dump (line 47) | public void dump(OutputStream out) throws IOException {
method createCollector (line 51) | @Override
method convert (line 95) | @Override
method convertChunk (line 106) | @Override
method makeStack (line 128) | private IntArray makeStack(int stackTraceId) {
method makeLine (line 137) | private Line makeLine(StackTrace stackTrace, int i) {
method writeSample (line 144) | private void writeSample(int stackTraceId, int tid, AggregatedEvent ae) {
method varintSize (line 173) | private static int varintSize(long value) {
method writeProfileDictionary (line 177) | private void writeProfileDictionary() {
method convert (line 230) | public static void convert(String input, String output, Arguments args...
class Line (line 241) | private static final class Line {
method Line (line 247) | Line(int functionIdx, int lineNumber) {
method equals (line 252) | @Override
method hashCode (line 260) | @Override
class KeyValue (line 268) | private static final class KeyValue {
method KeyValue (line 275) | KeyValue(int keyStrindex, String value) {
method equals (line 280) | @Override
method hashCode (line 288) | @Override
class IntArray (line 296) | private static final class IntArray {
method IntArray (line 302) | IntArray(int[] array) {
method equals (line 307) | @Override
method hashCode (line 312) | @Override
class AggregatedEvent (line 318) | private static final class AggregatedEvent {
method recordEvent (line 323) | public void recordEvent(long timestamp, long value) {
FILE: src/converter/one/convert/JfrToPprof.java
class JfrToPprof (line 21) | public class JfrToPprof extends JfrConverter {
method JfrToPprof (line 27) | public JfrToPprof(JfrReader jfr, Arguments args) {
method convertChunk (line 34) | @Override
method dump (line 50) | public void dump(OutputStream out) throws IOException {
method sample (line 74) | private Proto sample(Proto s, Event event, long value) {
method valueType (line 108) | private Proto valueType(String type, String unit) {
method label (line 114) | private Proto label(String key, String str) {
method mapping (line 120) | private Proto mapping(int id, long start, long limit, String fileName) {
method location (line 128) | private Proto location(int id, long location) {
method line (line 134) | private Proto line(int functionId, int line) {
method function (line 140) | private Proto function(int id, String name) {
method convert (line 146) | public static void convert(String input, String output, Arguments args...
FILE: src/converter/one/convert/Main.java
class Main (line 13) | public class Main {
method main (line 15) | public static void main(String[] argv) throws Exception {
method convert (line 82) | public static void convert(String input, String output, Arguments args...
method parseFlameGraph (line 100) | public static FlameGraph parseFlameGraph(String input, Arguments args)...
method getFileName (line 108) | private static String getFileName(String fileName) {
method replaceExt (line 112) | private static String replaceExt(String fileName, String output) {
method isJfr (line 119) | private static boolean isJfr(String fileName) throws IOException {
method usage (line 131) | private static void usage() {
FILE: src/converter/one/convert/OtlpConstants.java
class OtlpConstants (line 8) | final class OtlpConstants {
FILE: src/converter/one/convert/ResourceProcessor.java
class ResourceProcessor (line 13) | public class ResourceProcessor {
method getResource (line 15) | public static String getResource(String name) {
method printTill (line 32) | public static String printTill(PrintStream out, String data, String ti...
FILE: src/converter/one/convert/TimeIntervals.java
class TimeIntervals (line 13) | public final class TimeIntervals {
method TimeIntervals (line 17) | private TimeIntervals(long[] startIntervals, long[] endIntervals) {
method contains (line 22) | public boolean contains(long instant) {
class Builder (line 36) | public static final class Builder {
method add (line 40) | public void add(long startInstant, long endInstant) {
method build (line 67) | public TimeIntervals build() {
FILE: src/converter/one/heatmap/Heatmap.java
class Heatmap (line 16) | public class Heatmap {
method Heatmap (line 26) | public Heatmap(Arguments args, JfrConverter converter) {
method addEvent (line 31) | public void addEvent(int stackTraceId, int threadId, int classId, byte...
method addStack (line 35) | public void addStack(long id, long[] methods, int[] locations, byte[] ...
method beforeChunk (line 39) | public void beforeChunk() {
method finish (line 44) | public void finish(long startMs) {
method evaluate (line 51) | private EvaluationContext evaluate() {
method compressMethods (line 62) | private void compressMethods(HtmlOut out, Method[] methods) {
method dump (line 73) | public void dump(PrintStream stream) throws IOException {
method printHeatmap (line 108) | private void printHeatmap(final HtmlOut out, EvaluationContext context) {
method writeSamples (line 155) | private void writeSamples(HtmlOut out, SynonymTable synonymTable, Eval...
method calculateSamplesSynonyms (line 168) | private int calculateSamplesSynonyms(SynonymTable synonymTable, Evalua...
method writeTree (line 187) | private void writeTree(HtmlOut out, SynonymTable synonymTable, Evaluat...
method writeSynonymsTable (line 200) | private void writeSynonymsTable(HtmlOut out, SynonymTable synonymTable) {
method writeStartMethods (line 207) | private void writeStartMethods(HtmlOut out, EvaluationContext context) {
method renameMethodsByFrequency (line 222) | private void renameMethodsByFrequency(EvaluationContext context) {
method buildLz78TreeAndPrepareData (line 237) | private int[] buildLz78TreeAndPrepareData(EvaluationContext context) {
method writeBlockSizes (line 300) | private void writeBlockSizes(HtmlOut out, EvaluationContext context) {
method printConstantPool (line 338) | private void printConstantPool(PrintStream out, EvaluationContext eval...
method printMethods (line 346) | private void printMethods(HtmlOut out, EvaluationContext evaluationCon...
method debugStep (line 359) | private int debugStep(String step, HtmlOut out, int wasPos, int verySt...
method debug (line 366) | private void debug(String text) {
class EvaluationContext (line 371) | private static class EvaluationContext {
method EvaluationContext (line 380) | EvaluationContext(SampleList.Result sampleList, Index<Method> method...
class State (line 388) | private static class State {
method State (line 409) | State(JfrConverter converter, Arguments args, long blockDurationMs) {
method resolveFrameName (line 415) | private String resolveFrameName(Method method) {
method includeStack (line 425) | private boolean includeStack(int prototypeId) {
method applyIncludeExcludeFilter (line 433) | private boolean applyIncludeExcludeFilter(int stackId) {
method addEvent (line 451) | public void addEvent(int stackTraceId, int threadId, int classId, by...
method addStack (line 488) | public void addStack(long id, long[] methods, int[] locations, byte[...
method getMethodIndex (line 511) | private int getMethodIndex(MethodKey key) {
class MethodKey (line 520) | private static final class MethodKey {
method MethodKey (line 529) | public MethodKey(MethodKeyType keyType, long methodId, int locatio...
method getLocation (line 535) | public int getLocation() {
method getType (line 539) | public byte getType() {
method getFirstInStack (line 543) | public boolean getFirstInStack() {
method makeMethod (line 547) | public Method makeMethod(JfrConverter converter, Index<String> sym...
method equals (line 568) | @Override
method hashCode (line 575) | @Override
type MethodKeyType (line 581) | private enum MethodKeyType {
FILE: src/converter/one/heatmap/HtmlOut.java
class HtmlOut (line 10) | public class HtmlOut {
method HtmlOut (line 16) | public HtmlOut(PrintStream out) {
method pos (line 20) | public int pos() {
method reset (line 24) | public void reset() {
method nextByte (line 28) | public void nextByte(int c) {
method writeVar (line 50) | public void writeVar(long v) {
method write6 (line 59) | public void write6(int v) {
method write18 (line 66) | public void write18(int v) {
method write30 (line 76) | public void write30(int v) {
FILE: src/converter/one/heatmap/HuffmanEncoder.java
class HuffmanEncoder (line 11) | public class HuffmanEncoder {
method HuffmanEncoder (line 24) | public HuffmanEncoder(int[] frequencies, int maxFrequencyIndex) {
method append (line 74) | public boolean append(int value) {
method flushIfNeed (line 90) | public boolean flushIfNeed() {
method flush (line 99) | public void flush() {
method calculateOutputTable (line 114) | public long[] calculateOutputTable() {
class Node (line 118) | private static class Node implements Comparable<Node> {
method Node (line 124) | Node(int frequency, int value) {
method Node (line 129) | public Node(Node left, Node right) {
method fillTable (line 136) | public void fillTable(long[] table, long bitsCount) {
method compareTo (line 145) | @Override
FILE: src/converter/one/heatmap/LzNodeTree.java
class LzNodeTree (line 10) | public class LzNodeTree {
method LzNodeTree (line 29) | public LzNodeTree() {
method appendChild (line 38) | public int appendChild(int parentNode, int methodId) {
method treeData (line 76) | public long[] treeData() {
method treeDataSize (line 80) | public int treeDataSize() {
method extractParentId (line 84) | public int extractParentId(long treeElement) {
method extractMethodId (line 88) | public int extractMethodId(long treeElement) {
method markNodeAsLastlyUsed (line 92) | public void markNodeAsLastlyUsed(int nodeId) {
method compactTree (line 106) | public void compactTree(int[] remapAsWell, int fromIndex, int toIndex) {
method extractSynonymTable (line 136) | public SynonymTable extractSynonymTable() {
method storageSize (line 140) | public int storageSize() {
method nodesCount (line 144) | public int nodesCount() {
method resize (line 148) | private void resize(int newCapacity) {
method hashCode (line 169) | private static int hashCode(long key) {
FILE: src/converter/one/heatmap/Method.java
class Method (line 10) | public class Method {
method Method (line 25) | Method(int className, int methodName, int location, byte type, boolean...
method equals (line 33) | @Override
method hashCode (line 47) | @Override
FILE: src/converter/one/heatmap/SampleList.java
class SampleList (line 10) | public class SampleList {
method SampleList (line 22) | public SampleList(long blockDurationMs) {
method add (line 26) | public void add(int stackId, long timeMs) {
method samples (line 40) | public Result samples() {
method getRecordsCount (line 80) | public int getRecordsCount() {
class Result (line 84) | public static class Result {
method Result (line 88) | public Result(int[] blockSizes, int[] stackIds) {
FILE: src/converter/one/heatmap/StackStorage.java
class StackStorage (line 10) | public final class StackStorage {
method StackStorage (line 22) | public StackStorage() {
method StackStorage (line 26) | public StackStorage(int initialCapacity) {
method get (line 31) | public int[] get(int id) {
method index (line 35) | public int index(int[] input, int inputSize) {
method orderedTraces (line 60) | public int[][] orderedTraces() {
method resize (line 64) | private void resize(int newCapacity) {
method equals (line 84) | private boolean equals(int[] a, int size, int[] b) {
method murmur (line 92) | private static int murmur(int[] data, int size) {
FILE: src/converter/one/heatmap/SynonymTable.java
class SynonymTable (line 10) | public class SynonymTable {
method SynonymTable (line 18) | public SynonymTable(long[] synonyms, int[] childrenCount, int nodesCou...
method calculateSynonyms (line 24) | public void calculateSynonyms() {
method synonymsCount (line 43) | public int synonymsCount() {
method synonymAt (line 47) | public int synonymAt(int synonymIndex) {
method nodeIdOrSynonym (line 51) | public int nodeIdOrSynonym(int node) {
method reset (line 55) | public int[] reset() {
FILE: src/converter/one/jfr/ClassRef.java
class ClassRef (line 8) | public class ClassRef {
method ClassRef (line 11) | public ClassRef(long name) {
FILE: src/converter/one/jfr/Dictionary.java
class Dictionary (line 13) | public class Dictionary<T> {
method Dictionary (line 21) | public Dictionary() {
method Dictionary (line 25) | public Dictionary(int initialCapacity) {
method clear (line 30) | public void clear() {
method size (line 36) | public int size() {
method remapKey (line 42) | private static long remapKey(long key) {
method put (line 49) | public void put(long key, T value) {
method get (line 69) | @SuppressWarnings("unchecked")
method forEach (line 81) | @SuppressWarnings("unchecked")
method preallocate (line 91) | public int preallocate(int count) {
method resize (line 98) | private void resize(int newCapacity) {
method hashCode (line 119) | private static int hashCode(long key) {
type Visitor (line 124) | public interface Visitor<T> {
method visit (line 125) | void visit(long key, T value);
FILE: src/converter/one/jfr/DictionaryInt.java
class DictionaryInt (line 13) | public class DictionaryInt {
method DictionaryInt (line 20) | public DictionaryInt() {
method DictionaryInt (line 24) | public DictionaryInt(int initialCapacity) {
method clear (line 29) | public void clear() {
method put (line 35) | public void put(long key, int value) {
method get (line 57) | public int get(long key) {
method get (line 69) | public int get(long key, int notFound) {
method forEach (line 81) | public void forEach(Visitor visitor) {
method preallocate (line 89) | public int preallocate(int count) {
method resize (line 96) | private void resize(int newCapacity) {
method hashCode (line 117) | private static int hashCode(long key) {
type Visitor (line 122) | public interface Visitor {
method visit (line 123) | void visit(long key, int value);
FILE: src/converter/one/jfr/Element.java
class Element (line 8) | class Element {
method addChild (line 10) | void addChild(Element e) {
FILE: src/converter/one/jfr/JfrClass.java
class JfrClass (line 12) | public class JfrClass extends Element {
method JfrClass (line 18) | JfrClass(Map<String, String> attributes) {
method addChild (line 25) | @Override
method field (line 32) | public JfrField field(String name) {
FILE: src/converter/one/jfr/JfrField.java
class JfrField (line 10) | public class JfrField extends Element {
method JfrField (line 15) | JfrField(Map<String, String> attributes) {
FILE: src/converter/one/jfr/JfrReader.java
class JfrReader (line 28) | public class JfrReader implements Closeable {
method JfrReader (line 85) | public JfrReader(String fileName) throws IOException {
method JfrReader (line 97) | public JfrReader(ByteBuffer buf) throws IOException {
method close (line 108) | @Override
method eof (line 115) | public boolean eof() {
method incomplete (line 119) | public boolean incomplete() {
method durationNanos (line 123) | public long durationNanos() {
method chunkDurationNanos (line 127) | public long chunkDurationNanos() {
method registerEvent (line 131) | public <E extends Event> void registerEvent(String name, Class<E> even...
method hasMoreChunks (line 143) | public boolean hasMoreChunks() throws IOException {
method readAllEvents (line 147) | public List<Event> readAllEvents() throws IOException {
method readAllEvents (line 151) | public <E extends Event> List<E> readAllEvents(Class<E> cls) throws IO...
method readEvent (line 160) | public Event readEvent() throws IOException {
method readEvent (line 164) | @SuppressWarnings("unchecked")
method readExecutionSample (line 231) | private ExecutionSample readExecutionSample(boolean wall) {
method readMethodTrace (line 241) | private MethodTrace readMethodTrace() {
method readAllocationSample (line 250) | private AllocationSample readAllocationSample(boolean tlab) {
method readCPUTimeSample (line 260) | private ExecutionSample readCPUTimeSample() {
method readNativeLockEvent (line 270) | private NativeLockEvent readNativeLockEvent() {
method readMallocEvent (line 279) | private MallocEvent readMallocEvent(boolean hasSize) {
method readLiveObject (line 288) | private LiveObject readLiveObject() {
method readContendedLock (line 298) | private ContendedLock readContendedLock(boolean hasTimeout) {
method readActiveSetting (line 310) | private void readActiveSetting() {
method readChunk (line 322) | private boolean readChunk(int pos) throws IOException {
method readMeta (line 368) | private void readMeta(long metaOffset) throws IOException {
method readElement (line 386) | private Element readElement(String[] strings) {
method createElement (line 403) | private Element createElement(String name, Map<String, String> attribu...
method readConstantPool (line 420) | private void readConstantPool(long cpOffset) throws IOException {
method readConstants (line 442) | private void readConstants(JfrClass type) {
method readThreads (line 474) | private void readThreads(int fieldCount) {
method readClasses (line 490) | private void readClasses(int fieldCount) {
method readMethods (line 503) | private void readMethods() {
method readStackTraces (line 516) | private void readStackTraces() {
method readStackTrace (line 526) | private StackTrace readStackTrace() {
method readStrings (line 541) | private void readStrings() {
method readSymbols (line 548) | private void readSymbols() {
method readEnumValues (line 559) | private void readEnumValues(String typeName) {
method readOtherConstants (line 568) | private void readOtherConstants(List<JfrField> fields) {
method readFields (line 584) | private void readFields(boolean[] numeric) {
method readFields (line 594) | private void readFields(int count) {
method cacheEventTypes (line 600) | private void cacheEventTypes() {
method getTypeId (line 627) | private int getTypeId(String typeName) {
method getEnumKey (line 632) | public int getEnumKey(String typeName, String value) {
method getEnumValue (line 644) | public String getEnumValue(String typeName, int key) {
method getVarint (line 648) | public int getVarint() {
method getVarlong (line 659) | public long getVarlong() {
method getFloat (line 671) | public float getFloat() {
method getDouble (line 675) | public double getDouble() {
method getByte (line 679) | public byte getByte() {
method getBoolean (line 683) | public boolean getBoolean() {
method getString (line 687) | public String getString() {
method getBytes (line 711) | public byte[] getBytes() {
method seek (line 717) | private void seek(long pos) throws IOException {
method rewind (line 728) | public void rewind() throws IOException {
method ensureBytes (line 734) | private boolean ensureBytes(int needed) throws IOException {
method eventTimeToNanos (line 760) | public long eventTimeToNanos(long time) {
FILE: src/converter/one/jfr/MethodRef.java
class MethodRef (line 8) | public class MethodRef {
method MethodRef (line 13) | public MethodRef(long cls, long name, long sig) {
FILE: src/converter/one/jfr/StackTrace.java
class StackTrace (line 8) | public class StackTrace {
method StackTrace (line 13) | public StackTrace(long[] methods, byte[] types, int[] locations) {
FILE: src/converter/one/jfr/event/AllocationSample.java
class AllocationSample (line 8) | public class AllocationSample extends Event {
method AllocationSample (line 13) | public AllocationSample(long time, int tid, int stackTraceId, int clas...
method hashCode (line 20) | @Override
method sameGroup (line 25) | @Override
method classId (line 34) | @Override
method value (line 39) | @Override
FILE: src/converter/one/jfr/event/CPULoad.java
class CPULoad (line 10) | public class CPULoad extends Event {
method CPULoad (line 15) | public CPULoad(JfrReader jfr) {
FILE: src/converter/one/jfr/event/ContendedLock.java
class ContendedLock (line 8) | public class ContendedLock extends Event {
method ContendedLock (line 12) | public ContendedLock(long time, int tid, int stackTraceId, long durati...
method hashCode (line 18) | @Override
method sameGroup (line 23) | @Override
method classId (line 32) | @Override
method value (line 37) | @Override
FILE: src/converter/one/jfr/event/Event.java
class Event (line 10) | public abstract class Event implements Comparable<Event> {
method Event (line 15) | protected Event(long time, int tid, int stackTraceId) {
method compareTo (line 21) | @Override
method hashCode (line 26) | @Override
method toString (line 31) | @Override
method sameGroup (line 47) | public boolean sameGroup(Event o) {
method classId (line 51) | public long classId() {
method samples (line 55) | public long samples() {
method value (line 59) | public long value() {
FILE: src/converter/one/jfr/event/EventAggregator.java
class EventAggregator (line 8) | public class EventAggregator implements EventCollector {
method EventAggregator (line 19) | public EventAggregator(boolean threads, double grain) {
method size (line 26) | public int size() {
method collect (line 30) | @Override
method collect (line 35) | public void collect(Event e, long samples, long value) {
method beforeChunk (line 56) | @Override
method afterChunk (line 66) | @Override
method finish (line 73) | @Override
method forEach (line 81) | @Override
method coarsen (line 92) | public void coarsen(double grain) {
method round (line 109) | private long round(double d) {
method hashCode (line 118) | private int hashCode(Event e) {
method sameGroup (line 122) | private boolean sameGroup(Event e1, Event e2) {
method resize (line 126) | private void resize(int newCapacity) {
FILE: src/converter/one/jfr/event/EventCollector.java
type EventCollector (line 8) | public interface EventCollector {
method collect (line 10) | void collect(Event e);
method beforeChunk (line 12) | void beforeChunk();
method afterChunk (line 14) | void afterChunk();
method finish (line 17) | boolean finish();
method forEach (line 19) | void forEach(Visitor visitor);
type Visitor (line 21) | interface Visitor {
method visit (line 22) | void visit(Event event, long samples, long value);
FILE: src/converter/one/jfr/event/ExecutionSample.java
class ExecutionSample (line 8) | public class ExecutionSample extends Event {
method ExecutionSample (line 16) | public ExecutionSample(long time, int tid, int stackTraceId, int threa...
method samples (line 22) | @Override
method value (line 27) | @Override
FILE: src/converter/one/jfr/event/GCHeapSummary.java
class GCHeapSummary (line 10) | public class GCHeapSummary extends Event {
method GCHeapSummary (line 17) | public GCHeapSummary(JfrReader jfr) {
FILE: src/converter/one/jfr/event/LiveObject.java
class LiveObject (line 8) | public class LiveObject extends Event {
method LiveObject (line 13) | public LiveObject(long time, int tid, int stackTraceId, int classId, l...
method hashCode (line 20) | @Override
method sameGroup (line 25) | @Override
method classId (line 34) | @Override
method value (line 39) | @Override
FILE: src/converter/one/jfr/event/MallocEvent.java
class MallocEvent (line 8) | public class MallocEvent extends Event {
method MallocEvent (line 12) | public MallocEvent(long time, int tid, int stackTraceId, long address,...
method value (line 18) | @Override
FILE: src/converter/one/jfr/event/MallocLeakAggregator.java
class MallocLeakAggregator (line 13) | public class MallocLeakAggregator implements EventCollector {
method MallocLeakAggregator (line 21) | public MallocLeakAggregator(EventCollector wrapped, double tail) {
method collect (line 30) | @Override
method beforeChunk (line 37) | @Override
method afterChunk (line 42) | @Override
method finish (line 57) | @Override
method forEach (line 76) | @Override
FILE: src/converter/one/jfr/event/MethodTrace.java
class MethodTrace (line 8) | public class MethodTrace extends Event {
method MethodTrace (line 12) | public MethodTrace(long time, int tid, int stackTraceId, int method, l...
method hashCode (line 18) | @Override
method sameGroup (line 23) | @Override
method value (line 32) | @Override
FILE: src/converter/one/jfr/event/NativeLockEvent.java
class NativeLockEvent (line 8) | public class NativeLockEvent extends Event {
method NativeLockEvent (line 12) | public NativeLockEvent(long time, int tid, int stackTraceId, long addr...
method value (line 18) | @Override
FILE: src/converter/one/jfr/event/ObjectCount.java
class ObjectCount (line 10) | public class ObjectCount extends Event {
method ObjectCount (line 16) | public ObjectCount(JfrReader jfr) {
FILE: src/converter/one/jfr/event/ProcessSample.java
class ProcessSample (line 10) | public class ProcessSample extends Event {
method ProcessSample (line 32) | public ProcessSample(JfrReader jfr) {
FILE: src/converter/one/proto/Proto.java
class Proto (line 15) | public class Proto {
method Proto (line 19) | public Proto(int capacity) {
method buffer (line 23) | public byte[] buffer() {
method size (line 27) | public int size() {
method reset (line 31) | public void reset() {
method field (line 35) | public Proto field(int index, int n) {
method field (line 41) | public Proto field(int index, long n) {
method fieldFixed64 (line 47) | public Proto fieldFixed64(int index, long n) {
method field (line 53) | public Proto field(int index, double d) {
method field (line 59) | public Proto field(int index, String s) {
method field (line 66) | public Proto field(int index, byte[] bytes) {
method field (line 72) | public Proto field(int index, Proto proto) {
method startField (line 80) | public long startField(int index, int maxLenByteCount) {
method commitField (line 87) | public void commitField(long mark) {
method writeInt (line 104) | public void writeInt(int n) {
method writeLong (line 115) | public void writeLong(long n) {
method writeDouble (line 126) | public void writeDouble(double d) {
method writeFixed64 (line 130) | public void writeFixed64(long n) {
method writeBytes (line 143) | public void writeBytes(byte[] bytes, int offset, int length) {
method tag (line 150) | private void tag(int index, int type) {
method ensureCapacity (line 155) | private void ensureCapacity(int length) {
FILE: src/cpuEngine.cpp
function pthread_setspecific_hook (line 26) | static int pthread_setspecific_hook(pthread_key_t key, const void* value) {
FILE: src/cpuEngine.h
function class (line 14) | class CpuEngine : public Engine {
FILE: src/ctimer.h
function class (line 13) | class CTimer : public CpuEngine {
function class (line 36) | class CTimer : public CpuEngine {
FILE: src/ctimer_linux.cpp
function clockid_t (line 23) | static inline clockid_t thread_cpu_clock(unsigned int tid) {
type sigevent (line 37) | struct sigevent
type itimerspec (line 57) | struct itimerspec
function Error (line 76) | Error CTimer::start(Arguments& args) {
FILE: src/demangle.cpp
type demangle (line 58) | struct demangle
type demangle (line 90) | struct demangle
FILE: src/demangle.h
type demangle (line 9) | struct demangle
function class (line 11) | class Demangle {
FILE: src/dictionary.cpp
function keyEquals (line 19) | static inline bool keyEquals(const char* candidate, const char* key, siz...
FILE: src/dictionary.h
type DictTable (line 19) | struct DictTable
type DictRow (line 21) | struct DictRow {
type DictTable (line 26) | struct DictTable {
function class (line 36) | class Dictionary {
FILE: src/dwarf.cpp
function FrameDesc (line 345) | FrameDesc* DwarfParser::addRecordRaw(u32 loc, int cfa, int fp_off, int p...
FILE: src/dwarf.h
type FrameDesc (line 69) | struct FrameDesc {
function class (line 86) | class DwarfParser {
FILE: src/engine.cpp
function Error (line 11) | Error Engine::start(Arguments& args) {
FILE: src/engine.h
function class (line 12) | class Engine {
FILE: src/event.h
type EventType (line 15) | enum EventType {
function class (line 32) | class Event {
function class (line 35) | class EventWithClassId : public Event {
function class (line 40) | class ExecutionEvent : public Event {
function class (line 56) | class WallClockEvent : public Event {
function class (line 64) | class AllocEvent : public EventWithClassId {
function class (line 71) | class LockEvent : public EventWithClassId {
function class (line 79) | class NativeLockEvent : public Event {
function class (line 86) | class LiveObject : public EventWithClassId {
function class (line 93) | class ProfilingWindow : public Event {
function class (line 99) | class MallocEvent : public Event {
function class (line 106) | class UserEvent : public Event {
FILE: src/fdtransfer.h
type request_type (line 24) | enum request_type {
type fd_request (line 29) | struct fd_request {
type perf_fd_request (line 34) | struct perf_fd_request {
type fd_response (line 42) | struct fd_response {
type perf_fd_response (line 49) | struct perf_fd_response {
function socketPath (line 54) | static inline bool socketPath(const char *path, struct sockaddr_un *sun,...
FILE: src/fdtransferClient.h
function class (line 13) | class FdTransferClient {
function class (line 35) | class FdTransferClient {
FILE: src/fdtransferClient_linux.cpp
type sockaddr_un (line 32) | struct sockaddr_un
type timeval (line 39) | struct timeval
type sockaddr (line 42) | struct sockaddr
type perf_event_attr (line 50) | struct perf_event_attr
type perf_fd_request (line 51) | struct perf_fd_request
type perf_fd_response (line 64) | struct perf_fd_response
type fd_request (line 79) | struct fd_request
type fd_response (line 87) | struct fd_response
type fd_response (line 96) | struct fd_response
type msghdr (line 97) | struct msghdr
type iovec (line 99) | struct iovec
type cmsghdr (line 108) | struct cmsghdr
type cmsghdr (line 125) | struct cmsghdr
FILE: src/flameGraph.cpp
class StringUtils (line 21) | class StringUtils {
method replace (line 23) | static void replace(std::string& s, char c, const char* replacement, s...
method getCommonPrefix (line 29) | static size_t getCommonPrefix(const std::string& a, const std::string&...
class Format (line 41) | class Format {
class Node (line 68) | class Node {
method Node (line 74) | Node(u32 key, u32 order, const Trie* trie) : _key(key), _order(order),...
method orderByName (line 77) | static bool orderByName(const Node& a, const Node& b) {
method orderByTotal (line 81) | static bool orderByTotal(const Node& a, const Node& b) {
function Trie (line 87) | Trie* FlameGraph::addChild(Trie* f, const char* name, FrameTypeId type, ...
FILE: src/flameGraph.h
function class (line 17) | class Trie {
FILE: src/flightRecorder.cpp
function JfrSync_stopProfiler (line 36) | static void JNICALL JfrSync_stopProfiler(JNIEnv* env, jclass cls) {
type GCWhen (line 49) | enum GCWhen {
type CpuTime (line 66) | struct CpuTime {
type CpuTimes (line 72) | struct CpuTimes {
class Buffer (line 77) | class Buffer {
method Buffer (line 83) | Buffer() : _offset(0) {
method offset (line 91) | int offset() const {
method skip (line 95) | int skip(int delta) {
method reset (line 101) | void reset() {
method put (line 105) | void put(const char* v, u32 len) {
method put8 (line 110) | void put8(char v) {
method put16 (line 114) | void put16(short v) {
method put32 (line 119) | void put32(int v) {
method put64 (line 124) | void put64(u64 v) {
method putFloat (line 129) | void putFloat(float v) {
method putVar32 (line 139) | void putVar32(u32 v) {
method putVar64 (line 147) | void putVar64(u64 v) {
method putUtf8 (line 162) | void putUtf8(const char* v) {
method putUtf8 (line 171) | void putUtf8(const char* v, u32 len) {
method putByteString (line 177) | void putByteString(const char* v, u32 len) {
method putByteString (line 183) | void putByteString(const char* v) {
method put8 (line 192) | void put8(int offset, char v) {
method putVar32 (line 196) | void putVar32(int offset, u32 v) {
class SmallBuffer (line 205) | class SmallBuffer : public Buffer {
method SmallBuffer (line 210) | SmallBuffer() : Buffer() {
class RecordingBuffer (line 214) | class RecordingBuffer : public Buffer {
method RecordingBuffer (line 219) | RecordingBuffer() : Buffer() {
class Recording (line 224) | class Recording {
method ratio (line 261) | static float ratio(float value) {
method Recording (line 266) | Recording(int fd, const char* master_recording_file, Arguments& args) ...
method off_t (line 333) | off_t finishChunk() {
method switchChunk (line 388) | void switchChunk() {
method needSwitchChunk (line 406) | bool needSwitchChunk(u64 wall_time) {
method usedMemory (line 410) | size_t usedMemory() {
method cpuMonitorCycle (line 415) | void cpuMonitorCycle() {
method heapMonitorCycle (line 445) | void heapMonitorCycle(u32 gc_id) {
method processMonitorCycle (line 454) | void processMonitorCycle(const u64 wall_time) {
method hasMasterRecording (line 474) | bool hasMasterRecording() const {
method appendRecording (line 478) | void appendRecording(const char* target_file, size_t size) {
method Buffer (line 489) | Buffer* buffer(int lock_index) {
method parseAgentProperties (line 493) | bool parseAgentProperties() {
method flush (line 553) | void flush(Buffer* buf) {
method flushIfNeeded (line 561) | void flushIfNeeded(Buffer* buf, int limit = RECORDING_BUFFER_LIMIT) {
method writeHeader (line 567) | void writeHeader(Buffer* buf) {
method writeMetadata (line 583) | void writeMetadata(Buffer* buf) {
method writeElement (line 601) | void writeElement(Buffer* buf, const Element* e) {
method writeRecordingInfo (line 616) | void writeRecordingInfo(Buffer* buf) {
method writeSettings (line 630) | void writeSettings(Buffer* buf, Arguments& args) {
method writeStringSetting (line 691) | void writeStringSetting(Buffer* buf, int category, const char* key, co...
method writeBoolSetting (line 702) | void writeBoolSetting(Buffer* buf, int category, const char* key, bool...
method writeIntSetting (line 706) | void writeIntSetting(Buffer* buf, int category, const char* key, long ...
method writeListSetting (line 712) | void writeListSetting(Buffer* buf, int category, const char* key, cons...
method writeOsCpuInfo (line 718) | void writeOsCpuInfo(Buffer* buf) {
method writeJvmInfo (line 745) | void writeJvmInfo(Buffer* buf) {
method writeSystemProperties (line 774) | void writeSystemProperties(Buffer* buf) {
method writeNativeLibraries (line 801) | void writeNativeLibraries(Buffer* buf) {
method writeCpool (line 822) | void writeCpool(Buffer* buf) {
method writePoolHeader (line 851) | void writePoolHeader(Buffer* buf, JfrType type, u32 size) {
method writeFrameTypes (line 865) | void writeFrameTypes(Buffer* buf) {
method writeThreadStates (line 877) | void writeThreadStates(Buffer* buf) {
method writeGCWhen (line 885) | void writeGCWhen(Buffer* buf) {
method writeThreads (line 892) | void writeThreads(Buffer* buf) {
method writeStackTraces (line 930) | void writeStackTraces(Buffer* buf, Lookup* lookup) {
method writeMethods (line 961) | void writeMethods(Buffer* buf, Lookup* lookup) {
method writeClasses (line 987) | void writeClasses(Buffer* buf, Lookup* lookup) {
method writePackages (line 1002) | void writePackages(Buffer* buf, Lookup* lookup) {
method writeSymbols (line 1011) | void writeSymbols(Buffer* buf, Lookup* lookup) {
method writeLogLevels (line 1020) | void writeLogLevels(Buffer* buf) {
method writeUserEventTypes (line 1029) | void writeUserEventTypes(Buffer* buf) {
method recordExecutionSample (line 1041) | void recordExecutionSample(Buffer* buf, int tid, u32 call_trace_id, Ex...
method recordMethodTrace (line 1051) | void recordMethodTrace(Buffer* buf, int tid, u32 call_trace_id, Method...
method recordWallClockSample (line 1062) | void recordWallClockSample(Buffer* buf, int tid, u32 call_trace_id, Wa...
method recordAllocationInNewTLAB (line 1074) | void recordAllocationInNewTLAB(Buffer* buf, int tid, u32 call_trace_id...
method recordAllocationOutsideTLAB (line 1086) | void recordAllocationOutsideTLAB(Buffer* buf, int tid, u32 call_trace_...
method recordMallocSample (line 1097) | void recordMallocSample(Buffer* buf, int tid, u32 call_trace_id, Mallo...
method recordUserEvent (line 1110) | void recordUserEvent(Buffer* buf, int tid, UserEvent* event) {
method recordProcessSample (line 1128) | void recordProcessSample(Buffer* buf, const ProcessInfo* info) {
method recordLiveObject (line 1163) | void recordLiveObject(Buffer* buf, int tid, u32 call_trace_id, LiveObj...
method recordMonitorBlocked (line 1175) | void recordMonitorBlocked(Buffer* buf, int tid, u32 call_trace_id, Loc...
method recordThreadPark (line 1188) | void recordThreadPark(Buffer* buf, int tid, u32 call_trace_id, LockEve...
method recordNativeLockSample (line 1202) | void recordNativeLockSample(Buffer* buf, int tid, u32 call_trace_id, N...
method recordWindow (line 1213) | void recordWindow(Buffer* buf, int tid, ProfilingWindow* event) {
method recordCpuLoad (line 1222) | void recordCpuLoad(Buffer* buf, float proc_user, float proc_system, fl...
method recordHeapSummary (line 1232) | void recordHeapSummary(Buffer* buf, u32 id, GCWhen when, u64 total_mem...
method addThread (line 1251) | void addThread(int tid) {
function Error (line 1264) | Error FlightRecorder::start(Arguments& args, bool reset) {
function Error (line 1349) | Error FlightRecorder::startMasterRecording(Arguments& args, const char* ...
FILE: src/flightRecorder.h
function class (line 16) | class FlightRecorder {
FILE: src/frameName.cpp
function isDigit (line 16) | static inline bool isDigit(char c) {
function Matcher (line 47) | Matcher& Matcher::operator=(const Matcher& m) {
function FrameTypeId (line 328) | FrameTypeId FrameName::type(ASGCT_CallFrame& frame) {
FILE: src/frameName.h
type std (line 23) | typedef std::map<jmethodID, std::string> JMethodCache;
type std (line 24) | typedef std::map<int, std::string> ThreadMap;
type std (line 25) | typedef std::map<unsigned int, const
type MatchType (line 29) | enum MatchType {
function class (line 37) | class Matcher {
function class (line 54) | class FrameName {
FILE: src/helper/one/profiler/Instrument.java
class Instrument (line 11) | public class Instrument {
method Instrument (line 13) | private Instrument() {
method recordEntry (line 16) | public static native void recordEntry();
method recordExit (line 18) | public static void recordExit(long startTimeNs, long minLatency) {
method recordExit (line 27) | public static void recordExit(long startTimeNs) {
method recordExit0 (line 31) | public static native void recordExit0(long startTimeNs);
FILE: src/helper/one/profiler/JfrSync.java
class JfrSync (line 23) | class JfrSync implements FlightRecorderListener {
method JfrSync (line 41) | private JfrSync() {
method recordingStateChanged (line 48) | @Override
method start (line 56) | public static void start(String fileName, String settings, int eventMa...
method stop (line 80) | public static void stop() {
method disableBuiltinEvents (line 89) | private static void disableBuiltinEvents(Recording recording, int even...
method stopProfiler (line 130) | private static native void stopProfiler();
method box (line 133) | static Integer box(int n) {
FILE: src/helper/one/profiler/LockTracer.java
class LockTracer (line 11) | class LockTracer {
method LockTracer (line 13) | private LockTracer() {
method setEntry (line 18) | static void setEntry(long entry) {
method setEntry0 (line 22) | private static native void setEntry0(long entry);
FILE: src/helper/one/profiler/Server.java
class Server (line 19) | class Server extends Thread implements Executor, HttpHandler {
method Server (line 25) | private Server(String address) throws IOException {
method start (line 39) | public static void start(String address) throws IOException {
method run (line 43) | @Override
method execute (line 48) | @Override
method handle (line 55) | @Override
method getCommand (line 76) | private String getCommand(URI uri) {
method sendResponse (line 92) | private void sendResponse(HttpExchange exchange, int code, String body...
method execute0 (line 101) | private native String execute0(String command) throws IllegalArgumentE...
FILE: src/hooks.cpp
type ThreadEntry (line 27) | struct ThreadEntry {
function unblock_signals (line 38) | static void unblock_signals() {
function pthread_create_hook (line 72) | static int pthread_create_hook(pthread_t* thread, const pthread_attr_t* ...
function pthread_exit_hook (line 84) | static void pthread_exit_hook(void* retval) {
function WEAK (line 116) | WEAK DLLEXPORT
function WEAK (line 127) | WEAK DLLEXPORT
function WEAK (line 140) | WEAK DLLEXPORT
FILE: src/hooks.h
function class (line 12) | class Hooks {
FILE: src/index.h
function class (line 16) | class Index {
function indexOf (line 32) | size_t indexOf(const char* value) {
function indexOf (line 36) | size_t indexOf(const char* value, size_t len) {
function indexOf (line 40) | size_t indexOf(const std::string& value) {
function indexOf (line 44) | size_t indexOf(std::string&& value) {
function forEachOrdered (line 56) | void forEachOrdered(const std::function<void(size_t idx, const std::stri...
FILE: src/instrument.cpp
type Result (line 29) | enum class Result {
function u16 (line 38) | static inline u16 alignUp4(u16 i) {
function matchesPattern (line 42) | static bool matchesPattern(const char* value, size_t len, const std::str...
function MethodTargets (line 56) | static const MethodTargets* findMethodTargets(const Targets* targets, co...
type ConstantTag (line 65) | enum ConstantTag {
class Constant (line 73) | class Constant {
method u8 (line 79) | u8 tag() const {
method slots (line 83) | int slots() const {
method u16 (line 87) | u16 info() const {
method toString (line 96) | std::string toString() const {
method length (line 100) | int length() const {
method equals (line 129) | bool equals(const char* value, u16 len) const {
method u8 (line 133) | static u8 parameterSlots(const char* method_sig) {
type Scope (line 153) | enum Scope {
type PatchConstants (line 159) | enum PatchConstants {
class BytecodeRewriter (line 168) | class BytecodeRewriter {
method u8 (line 200) | const u8* get(int bytes) {
method u8 (line 206) | u8 get8() {
method u16 (line 210) | u16 get16() {
method u32 (line 214) | u32 get32() {
method u64 (line 218) | u64 get64() {
method u16 (line 222) | static u16 get16(const u8* ptr) {
method u32 (line 226) | static u32 get32(const u8* ptr) {
method Constant (line 230) | Constant* getConstant() {
method u8 (line 238) | u8* alloc(int bytes) {
method grow (line 247) | void grow(int new_capacity) {
method put (line 257) | void put(const u8* src, int bytes) {
method put8 (line 261) | void put8(u8 v) {
method put16 (line 265) | void put16(u16 v) {
method put32 (line 269) | void put32(u32 v) {
method put64 (line 273) | void put64(u64 v) {
method put16 (line 277) | static void put16(u8* ptr, u16 v) {
method put32 (line 281) | static void put32(u8* ptr, u32 v) {
method putConstant (line 287) | void putConstant(const char* value) {
method putConstant (line 294) | void putConstant(u8 tag, u16 ref) {
method putConstant (line 299) | void putConstant(u8 tag, u16 ref1, u16 ref2) {
method putLongConstant (line 305) | void putLongConstant(u64 l) {
method BytecodeRewriter (line 326) | BytecodeRewriter(const u8* class_data, int class_data_len, const Targe...
method rewrite (line 342) | void rewrite(u8** new_class_data, int* new_class_data_len) {
method u16 (line 379) | static u16 instructionBytes(const u8* code, u16 index) {
method u16 (line 404) | static u16 updateCurrentFrame(int32_t& current_frame_old, int32_t& cur...
function isFunctionExit (line 413) | static inline bool isFunctionExit(u8 opcode) {
function isNarrowJump (line 417) | static inline bool isNarrowJump(u8 opcode) {
function isWideJump (line 422) | static inline bool isWideJump(u8 opcode) {
function Result (line 426) | Result BytecodeRewriter::rewriteCode(u16 access_flags, u16 descriptor_in...
function Result (line 508) | Result BytecodeRewriter::rewriteCodeForLatency(const u8* code, u16 code_...
function Result (line 716) | Result BytecodeRewriter::rewriteStackMapTable(const u16* relocation_tabl...
function u8 (line 819) | u8 BytecodeRewriter::rewriteVerificationTypeInfo(const u16* relocation_t...
function Result (line 833) | Result BytecodeRewriter::rewriteMethod(u16 access_flags, u16 descriptor_...
function Result (line 855) | Result BytecodeRewriter::rewriteAttributes(u16 access_flags, u16 descrip...
function Result (line 870) | Result BytecodeRewriter::rewriteCodeAttributes(const u16* relocation_tab...
function findLatency (line 899) | static bool findLatency(const MethodTargets* method_targets, const std::...
function Result (line 922) | Result BytecodeRewriter::rewriteMembers(Scope scope) {
function Result (line 955) | Result BytecodeRewriter::rewriteClass() {
function Error (line 1062) | Error Instrument::initialize() {
function Error (line 1085) | Error Instrument::start(Arguments& args) {
function Error (line 1116) | Error addTarget(Targets& targets, const char* s, Latency default_latency) {
function Error (line 1165) | Error Instrument::setupTargetClassAndMethod(const Arguments& args) {
FILE: src/instrument.h
type std (line 15) | typedef std::string ClassName;
type std (line 16) | typedef std::string Method;
type Latency (line 17) | typedef long Latency;
type std (line 19) | typedef std::map<Method, Latency> MethodTargets;
type std (line 20) | typedef std::map<ClassName, MethodTargets> Targets;
function class (line 22) | class Instrument : public Engine {
FILE: src/itimer.cpp
function Error (line 13) | Error ITimer::start(Arguments& args) {
type itimerval (line 44) | struct itimerval
FILE: src/itimer.h
function class (line 12) | class ITimer : public CpuEngine {
FILE: src/j9Ext.h
type jvmtiFrameInfoExtended (line 14) | struct jvmtiFrameInfoExtended {
type jvmtiStackInfoExtended (line 22) | struct jvmtiStackInfoExtended {
function class (line 35) | class J9Ext {
FILE: src/j9ObjectSampler.cpp
function Error (line 25) | Error J9ObjectSampler::start(Arguments& args) {
FILE: src/j9ObjectSampler.h
function class (line 12) | class J9ObjectSampler : public ObjectSampler {
FILE: src/j9StackTraces.cpp
class J9VMThread (line 24) | class J9VMThread {
method getAndSetFlag (line 32) | uintptr_t getAndSetFlag(uintptr_t flag) {
method clearFlag (line 36) | void clearFlag(uintptr_t flag) {
method setOverflowMark (line 40) | void setOverflowMark() {
function Error (line 53) | Error J9StackTraces::start(Arguments& args) {
FILE: src/j9StackTraces.h
type J9StackTraceNotification (line 16) | struct J9StackTraceNotification {
function class (line 29) | class J9StackTraces {
FILE: src/j9WallClock.cpp
function Error (line 15) | Error J9WallClock::start(Arguments& args) {
FILE: src/j9WallClock.h
function class (line 13) | class J9WallClock : public Engine {
FILE: src/jattach/jattach.c
function jattach (line 20) | __attribute__((visibility("default")))
function main (line 60) | int main(int argc, char** argv) {
FILE: src/jattach/jattach_hotspot.c
function check_socket (line 22) | static int check_socket(int pid) {
function uid_t (line 31) | static uid_t get_file_owner(const char* path) {
function start_attach_mechanism (line 38) | static int start_attach_mechanism(int pid, int nspid) {
function connect_socket (line 73) | static int connect_socket(int pid) {
function write_command (line 95) | static int write_command(int fd, int argc, char** argv) {
function read_response (line 126) | static int read_response(int fd, int argc, char** argv, int print_output) {
function jattach_hotspot (line 189) | int jattach_hotspot(int pid, int nspid, int argc, char** argv, int print...
FILE: src/jattach/jattach_openj9.c
function translate_command (line 28) | static void translate_command(char* buf, size_t bufsize, int argc, char*...
function print_unescaped (line 71) | static void print_unescaped(char* str) {
function write_command (line 105) | static int write_command(int fd, const char* cmd) {
function read_response (line 119) | static int read_response(int fd, const char* cmd, int print_output) {
function detach (line 177) | static void detach(int fd) {
function close_with_errno (line 189) | static void close_with_errno(int fd) {
function acquire_lock (line 195) | static int acquire_lock(const char* subdir, const char* filename) {
function release_lock (line 212) | static void release_lock(int lock_fd) {
function create_attach_socket (line 217) | static int create_attach_socket(int* port) {
function close_attach_socket (line 244) | static void close_attach_socket(int s, int pid) {
function random_key (line 252) | static unsigned long long random_key() {
function write_reply_info (line 265) | static int write_reply_info(int pid, int port, unsigned long long key) {
function notify_semaphore (line 282) | static int notify_semaphore(int value, int notif_count) {
function accept_client (line 300) | static int accept_client(int s, unsigned long long key) {
function lock_notification_files (line 337) | static int lock_notification_files() {
function unlock_notification_files (line 358) | static void unlock_notification_files(int count) {
function is_openj9_process (line 367) | int is_openj9_process(int pid) {
function jattach_openj9 (line 375) | int jattach_openj9(int pid, int nspid, int argc, char** argv, int print_...
FILE: src/jattach/psutil.c
function get_tmp_path (line 21) | void get_tmp_path(int pid) {
function sched_get_host_pid (line 40) | static int sched_get_host_pid(const char* path) {
function alt_lookup_nspid (line 62) | static int alt_lookup_nspid(int pid) {
function get_tmp_path_r (line 96) | int get_tmp_path_r(int pid, char* buf, size_t bufsize) {
function get_process_info (line 106) | int get_process_info(int pid, uid_t* uid, gid_t* gid, int* nspid) {
function enter_ns (line 146) | int enter_ns(int pid, const char* type) {
function get_tmp_path_r (line 177) | int get_tmp_path_r(int pid, char* buf, size_t bufsize) {
function get_process_info (line 182) | int get_process_info(int pid, uid_t* uid, gid_t* gid, int* nspid) {
function enter_ns (line 198) | int enter_ns(int pid, const char* type) {
function get_tmp_path_r (line 208) | int get_tmp_path_r(int pid, char* buf, size_t bufsize) {
function get_process_info (line 212) | int get_process_info(int pid, uid_t* uid, gid_t* gid, int* nspid) {
function enter_ns (line 228) | int enter_ns(int pid, const char* type) {
FILE: src/javaApi.cpp
function throwNew (line 19) | static void throwNew(JNIEnv* env, const char* exception_class, const cha...
function DLLEXPORT (line 27) | DLLEXPORT void JNICALL
function DLLEXPORT (line 48) | DLLEXPORT void JNICALL
function DLLEXPORT (line 57) | DLLEXPORT jstring JNICALL
function DLLEXPORT (line 98) | DLLEXPORT jbyteArray JNICALL
function DLLEXPORT (line 129) | DLLEXPORT jlong JNICALL
function DLLEXPORT (line 134) | DLLEXPORT void JNICALL
FILE: src/javaApi.h
function class (line 12) | class JavaAPI {
FILE: src/jfrMetadata.h
type JfrType (line 16) | enum JfrType {
function class (line 88) | class Attribute {
function Element (line 231) | static Element* root() {
function Index (line 235) | static const Index& strings() {
FILE: src/linearAllocator.cpp
function Chunk (line 60) | Chunk* LinearAllocator::allocateChunk(Chunk* current) {
function Chunk (line 81) | Chunk* LinearAllocator::getNextChunk(Chunk* current) {
FILE: src/linearAllocator.h
type Chunk (line 12) | struct Chunk {
function class (line 19) | class LinearAllocator {
FILE: src/lockTracer.cpp
function Error (line 38) | Error LockTracer::start(Arguments& args) {
function Error (line 77) | Error LockTracer::initialize(jvmtiEnv* jvmti, JNIEnv* env) {
function jint (line 187) | jint JNICALL LockTracer::RegisterNativesHook(JNIEnv* env, jclass cls, co...
function jobject (line 230) | jobject LockTracer::getParkBlocker(jvmtiEnv* jvmti, JNIEnv* env) {
FILE: src/lockTracer.h
type JNINativeMethod (line 15) | typedef jint (JNICALL *RegisterNativesFunc)(JNIEnv*, jclass, const JNINa...
function class (line 18) | class LockTracer : public Engine {
FILE: src/log.h
type LogLevel (line 19) | enum LogLevel {
function class (line 31) | class Log {
FILE: src/lookup.cpp
function jint (line 14) | jint MethodInfo::getLineNumber(jint bci) {
function MethodInfo (line 45) | MethodInfo* Lookup::resolveMethod(ASGCT_CallFrame& frame) {
function u32 (line 83) | u32 Lookup::getPackage(const char* class_name) {
FILE: src/lookup.h
function class (line 18) | class MethodInfo {
function class (line 41) | class Lookup {
FILE: src/main/fdtransferServer.h
function class (line 13) | class FdTransferServer {
function class (line 34) | class FdTransferServer {
FILE: src/main/fdtransferServer_linux.cpp
type sockaddr_un (line 31) | struct sockaddr_un
type timeval (line 40) | struct timeval
type sockaddr (line 48) | struct sockaddr
type ucred (line 70) | struct ucred
type fd_request (line 101) | struct fd_request
type fd_request (line 101) | struct fd_request
type perf_fd_request (line 115) | struct perf_fd_request
type perf_fd_request (line 115) | struct perf_fd_request
type perf_fd_response (line 153) | struct perf_fd_response
type fd_response (line 181) | struct fd_response
type fd_response (line 224) | struct fd_response
type msghdr (line 225) | struct msghdr
type iovec (line 227) | struct iovec
type cmsghdr (line 235) | struct cmsghdr
type cmsghdr (line 242) | struct cmsghdr
type sockaddr_un (line 268) | struct sockaddr_un
type sockaddr_un (line 304) | struct sockaddr_un
type sigaction (line 307) | struct sigaction
FILE: src/main/main.cpp
function error (line 115) | static void error(const char* msg) {
function error (line 120) | static void error(const char* msg, int errnum) {
class Args (line 126) | class Args {
method Args (line 132) | Args(int argc, const char** argv) : _argc(argc - 1), _argv(argv) {
method count (line 135) | int count() const { return _argc; }
class String (line 150) | class String {
method String (line 155) | String(const char* str = "") {
method String (line 159) | String(const String& other) {
method String (line 167) | String& operator=(const String& other) {
method String (line 187) | String& operator<<(const char* tail) {
method String (line 194) | String& operator<<(String& tail) {
method String (line 198) | String& operator<<(int n) {
method String (line 204) | String& replace(char c, const char* rep) {
function sigint_handler (line 229) | static void sigint_handler(int sig) {
function time_micros (line 233) | static unsigned long long time_micros() {
function setup_output_files (line 239) | static void setup_output_files(int pid) {
function setup_lib_path (line 254) | static void setup_lib_path() {
function print_file (line 290) | static void print_file(String file, int dst) {
function wait_for_exit (line 307) | static int wait_for_exit(int pid) {
function jps (line 313) | static int jps(const char* cmd, const char* app_name = NULL) {
function run_fdtransfer (line 345) | static void run_fdtransfer(int pid, String& fdtransfer) {
function run_jattach (line 363) | static void run_jattach(int pid, String& cmd) {
function get_tracepoint_id (line 385) | static int get_tracepoint_id(const char* dir, const char* name) {
function main (line 413) | int main(int argc, const char** argv) {
FILE: src/mallocTracer.cpp
function NO_OPTIMIZE (line 52) | NO_OPTIMIZE
function free_hook (line 70) | void free_hook(void* addr) {
function posix_memalign_hook (line 77) | int posix_memalign_hook(void** memptr, size_t alignment, size_t size) {
function NO_OPTIMIZE (line 86) | NO_OPTIMIZE
function detectNestedMalloc (line 121) | static void detectNestedMalloc() {
function resolveMallocSymbols (line 136) | static void resolveMallocSymbols() {
function Error (line 234) | Error MallocTracer::start(Arguments& args) {
FILE: src/mallocTracer.h
function class (line 15) | class MallocTracer : public Engine {
FILE: src/mutex.cpp
type timespec (line 33) | struct timespec
FILE: src/mutex.h
function class (line 13) | class Mutex {
function class (line 25) | class WaitableMutex : public Mutex {
function class (line 36) | class MutexLocker {
FILE: src/nativeLockTracer.cpp
function pthread_mutex_lock_hook (line 15) | int pthread_mutex_lock_hook(pthread_mutex_t* mutex) {
function pthread_rwlock_rdlock_hook (line 35) | int pthread_rwlock_rdlock_hook(pthread_rwlock_t* rwlock) {
function pthread_rwlock_wrlock_hook (line 55) | int pthread_rwlock_wrlock_hook(pthread_rwlock_t* rwlock) {
function Error (line 134) | Error NativeLockTracer::start(Arguments& args) {
FILE: src/nativeLockTracer.h
function class (line 14) | class NativeLockTracer : public Engine {
FILE: src/objectSampler.cpp
function u32 (line 17) | static u32 lookupClassId(jvmtiEnv* jvmti, jclass cls) {
class LiveRefs (line 32) | class LiveRefs {
method collected (line 45) | static inline bool collected(jweak w) {
method LiveRefs (line 50) | LiveRefs() : _lock(1) {
method init (line 53) | void init() {
method gc (line 60) | void gc() {
method add (line 64) | void add(JNIEnv* jni, jobject object, jlong size, u64 trace) {
method dump (line 97) | void dump(JNIEnv* jni) {
function Error (line 172) | Error ObjectSampler::start(Arguments& args) {
FILE: src/objectSampler.h
function class (line 15) | class ObjectSampler : public Engine {
FILE: src/os.h
type ThreadState (line 22) | enum ThreadState {
type ProcessInfo (line 28) | struct ProcessInfo {
function class (line 60) | class ThreadList {
function class (line 84) | class JitWriteProtection {
function class (line 95) | class OS {
FILE: src/os_linux.cpp
class LinuxThreadList (line 39) | class LinuxThreadList : public ThreadList {
method addThread (line 45) | void addThread(int thread_id) {
method fillThreadArray (line 53) | void fillThreadArray() {
method LinuxThreadList (line 66) | LinuxThreadList() : ThreadList() {
method next (line 80) | int next() {
method update (line 84) | void update() {
function u64 (line 107) | u64 OS::nanotime() {
function u64 (line 113) | u64 OS::micros() {
function u64 (line 119) | u64 OS::processStartTime() {
type timespec (line 136) | struct timespec
type timespec (line 143) | struct timespec
function u64 (line 147) | u64 OS::overrun(siginfo_t* siginfo) {
function u64 (line 151) | u64 OS::hton64(u64 x) {
function u64 (line 155) | u64 OS::ntoh64(u64 x) {
function ThreadState (line 206) | ThreadState OS::threadState(int thread_id) {
function u64 (line 224) | u64 OS::threadCpuTime(int thread_id) {
function ThreadList (line 239) | ThreadList* OS::listThreads() {
function SigAction (line 254) | SigAction OS::installSignalHandler(int signo, SigAction action, SigHandl...
function restoreSignalHandler (line 274) | static void restoreSignalHandler(int signo, siginfo_t* siginfo, void* uc...
function SigAction (line 278) | SigAction OS::replaceCrashHandler(SigAction action) {
type sigaction (line 300) | struct sigaction
function u64 (line 355) | u64 OS::getProcessCpuTime(u64* utime, u64* stime) {
function u64 (line 363) | u64 OS::getTotalCpuTime(u64* utime, u64* stime) {
function checkPreloadedCallback (line 407) | static int checkPreloadedCallback(dl_phdr_info* info, size_t size, void*...
function u64 (line 447) | u64 OS::getRamSize() {
function u64 (line 468) | u64 OS::getSystemBootTime() {
function readProcessCmdline (line 505) | static bool readProcessCmdline(int pid, ProcessInfo* info) {
function readProcessStats (line 549) | static bool readProcessStats(int pid, ProcessInfo* info) {
function readProcessStatus (line 616) | static bool readProcessStatus(int pid, ProcessInfo* info) {
function readProcessIO (line 658) | static bool readProcessIO(int pid, ProcessInfo* info) {
FILE: src/os_macos.cpp
class MacThreadList (line 29) | class MacThreadList : public ThreadList {
method deallocate (line 34) | void deallocate() {
method MacThreadList (line 45) | MacThreadList() {
method next (line 55) | int next() {
method update (line 59) | void update() {
function u64 (line 110) | u64 OS::nanotime() {
function u64 (line 117) | u64 OS::micros() {
type timespec (line 124) | struct timespec
type timespec (line 129) | struct timespec
function u64 (line 133) | u64 OS::overrun(siginfo_t* siginfo) {
function u64 (line 137) | u64 OS::processStartTime() {
function u64 (line 150) | u64 OS::hton64(u64 x) {
function u64 (line 154) | u64 OS::ntoh64(u64 x) {
function ThreadState (line 186) | ThreadState OS::threadState(int thread_id) {
function u64 (line 195) | u64 OS::threadCpuTime(int thread_id) {
function ThreadList (line 207) | ThreadList* OS::listThreads() {
function SigAction (line 219) | SigAction OS::installSignalHandler(int signo, SigAction action, SigHandl...
function restoreSignalHandler (line 239) | static void restoreSignalHandler(int signo, siginfo_t* siginfo, void* uc...
function SigAction (line 243) | SigAction OS::replaceCrashHandler(SigAction action) {
type sigaction (line 280) | struct sigaction
function u64 (line 335) | u64 OS::getProcessCpuTime(u64* utime, u64* stime) {
function u64 (line 343) | u64 OS::getTotalCpuTime(u64* utime, u64* stime) {
function u64 (line 438) | u64 OS::getSystemBootTime() {
function u64 (line 442) | u64 OS::getRamSize() {
FILE: src/otlp.cpp
type Otlp (line 9) | namespace Otlp {
FILE: src/otlp.h
type CallTraceSample (line 16) | struct CallTraceSample
function namespace (line 18) | namespace Otlp {
FILE: src/perfEvents.h
function class (line 18) | class PerfEvents : public CpuEngine {
function class (line 59) | class PerfEvents : public CpuEngine {
FILE: src/perfEvents_linux.cpp
type f_owner_ex (line 43) | struct f_owner_ex {
type PerfCounter (line 61) | struct PerfCounter {
type MultiplexState (line 68) | struct MultiplexState {
function fetchInt (line 78) | static int fetchInt(const char* file_name) {
function findTracepointId (line 94) | static int findTracepointId(const char* dir, const char* name) {
function findDeviceType (line 107) | static int findDeviceType(const char* name) {
function resolvePmuEventName (line 116) | static void resolvePmuEventName(const char* device, char* event, size_t ...
function setPmuConfig (line 135) | static bool setPmuConfig(const char* device, const char* param, __u64* c...
function adjustFDLimit (line 166) | static void adjustFDLimit() {
function hasPerfEventRefreshBug (line 177) | static bool hasPerfEventRefreshBug() {
type FunctionWithCounter (line 185) | struct FunctionWithCounter {
type PerfEventType (line 190) | struct PerfEventType {
method findCounterArg (line 217) | static int findCounterArg(const char* name) {
method PerfEventType (line 227) | static PerfEventType* getBreakpoint(const char* name, __u32 bp_type, _...
method PerfEventType (line 303) | static PerfEventType* getTracepoint(int tracepoint_id) {
method PerfEventType (line 309) | static PerfEventType* getProbe(PerfEventType* probe, const char* type,...
method PerfEventType (line 334) | static PerfEventType* getRawEvent(__u64 config) {
method PerfEventType (line 340) | static PerfEventType* getPmuEvent(const char* name) {
method PerfEventType (line 398) | static PerfEventType* forName(const char* name) {
class RingBuffer (line 526) | class RingBuffer {
method RingBuffer (line 532) | RingBuffer(struct perf_event_mmap_page* page) {
type perf_event_header (line 536) | struct perf_event_header
type perf_event_header (line 538) | struct perf_event_header
method u64 (line 541) | u64 next() {
method u64 (line 546) | u64 peek(unsigned long words) {
class PerfEvent (line 553) | class PerfEvent : public SpinLock {
type perf_event_mmap_page (line 556) | struct perf_event_mmap_page
type perf_event_attr (line 585) | struct perf_event_attr
type perf_event_mmap_page (line 659) | struct perf_event_mmap_page
type f_owner_ex (line 666) | struct f_owner_ex
function u64 (line 711) | u64 PerfEvents::readCounter(siginfo_t* siginfo, void* ucontext) {
function Error (line 812) | Error PerfEvents::start(Arguments& args) {
type perf_event_mmap_page (line 907) | struct perf_event_mmap_page
type perf_event_header (line 916) | struct perf_event_header
type perf_event_mmap_page (line 962) | struct perf_event_mmap_page
type perf_event_attr (line 975) | struct perf_event_attr
FILE: src/processSampler.h
type ProcessHistory (line 16) | struct ProcessHistory {
function class (line 22) | class ProcessSampler {
FILE: src/profiler.cpp
type MethodSample (line 71) | struct MethodSample {
method add (line 75) | void add(u64 add_samples, u64 add_counter) {
function sortByCounter (line 83) | static bool sortByCounter(const NamedMethodSample& a, const NamedMethodS...
function hasNativeStack (line 88) | static inline int hasNativeStack(EventType event_type) {
function makeFrame (line 100) | static inline int makeFrame(ASGCT_CallFrame* frames, jint type, jmethodI...
function makeFrame (line 106) | static inline int makeFrame(ASGCT_CallFrame* frames, jint type, uintptr_...
function makeFrame (line 110) | static inline int makeFrame(ASGCT_CallFrame* frames, jint type, const ch...
function u32 (line 184) | inline u32 Profiler::getLockIndex(int tid) {
function CodeCache (line 255) | CodeCache* Profiler::findJvmLibrary(const char* lib_name) {
function CodeCache (line 259) | CodeCache* Profiler::findLibraryByName(const char* lib_name) {
function CodeCache (line 274) | CodeCache* Profiler::findLibraryByAddress(const void* address) {
function CodeBlob (line 289) | CodeBlob* Profiler::findRuntimeStub(const void* address) {
function u64 (line 392) | u64 Profiler::recordSample(void* ucontext, u64 counter, EventType event_...
function Error (line 580) | Error Profiler::installTraps(const char* begin, const char* end, bool no...
function Engine (line 743) | Engine* Profiler::selectEngine(Arguments& args) {
function Engine (line 773) | Engine* Profiler::selectAllocEngine(bool tlab) {
function Engine (line 783) | Engine* Profiler::activeEngine() {
function Error (line 802) | Error Profiler::checkJvmCapabilities() {
function Error (line 827) | Error Profiler::start(Arguments& args, bool reset) {
function Error (line 1063) | Error Profiler::stop(bool restart) {
function Error (line 1104) | Error Profiler::flushJfr() {
function Error (line 1120) | Error Profiler::dump(Writer& out, Arguments& args) {
function u64 (line 1404) | u64 Profiler::addTimeout(u64 start_micros, int timeout) {
function Error (line 1526) | Error Profiler::runInternal(Arguments& args, Writer& out) {
function Error (line 1608) | Error Profiler::run(Arguments& args) {
function Error (line 1623) | Error Profiler::expire(Arguments& args, bool restart) {
FILE: src/profiler.h
type State (line 42) | enum State {
function class (line 49) | class Profiler {
function Profiler (line 176) | static Profiler* instance() {
function u64 (line 180) | u64 total_samples() { return _total_samples; }
function uptime (line 181) | long uptime() { return (OS::micros() - _start_time) / 1000000ULL; }
function Dictionary (line 183) | Dictionary* classMap() { return &_class_map; }
function ThreadFilter (line 184) | ThreadFilter* threadFilter() { return &_thread_filter; }
function CodeCacheArray (line 185) | CodeCacheArray* nativeLibs() { return &_native_libs; }
function CompiledMethodLoad (line 222) | static void JNICALL CompiledMethodLoad(jvmtiEnv* jvmti, jmethodID method,
function DynamicCodeGenerated (line 229) | static void JNICALL DynamicCodeGenerated(jvmtiEnv* jvmti, const char* name,
function ThreadStart (line 234) | static void JNICALL ThreadStart(jvmtiEnv* jvmti, JNIEnv* jni, jthread th...
function ThreadEnd (line 238) | static void JNICALL ThreadEnd(jvmtiEnv* jvmti, JNIEnv* jni, jthread thre...
function GarbageCollectionFinish (line 242) | static void JNICALL GarbageCollectionFinish(jvmtiEnv* jvmti) {
FILE: src/protobuf.cpp
function protobuf_mark_t (line 80) | protobuf_mark_t ProtoBuffer::startMessage(protobuf_index_t index, size_t...
FILE: src/protobuf.h
type u32 (line 12) | typedef const u32 protobuf_t;
type u32 (line 17) | typedef u32 protobuf_index_t;
type u64 (line 20) | typedef u64 protobuf_mark_t;
function class (line 25) | class ProtoBuffer {
FILE: src/rustDemangle.cpp
type demangle_v0 (line 35) | struct demangle_v0 {
type demangle_legacy (line 40) | struct demangle_legacy {
function unicode_iscontrol (line 58) | static bool unicode_iscontrol(uint32_t ch) {
function unicode_isprint (line 69) | static bool unicode_isprint(uint32_t ch) {
function unicode_isgraphemextend (line 79) | static bool unicode_isgraphemextend(uint32_t ch) {
function str_isascii (line 84) | static bool str_isascii(const char *s, size_t s_len) {
type parser (line 99) | struct parser {
type printer (line 108) | struct printer {
type parser (line 110) | struct parser
type printer (line 117) | struct printer
type parser (line 110) | struct parser
type printer (line 118) | struct printer
type parser (line 110) | struct parser
type printer (line 119) | struct printer
type parser (line 110) | struct parser
function NODISCARD (line 121) | static NODISCARD demangle_status try_parse_path(struct parser *parser) {
function NODISCARD (line 136) | NODISCARD static demangle_status rust_demangle_v0_demangle(const char *s...
function NODISCARD (line 191) | NODISCARD static overflow_status rust_demangle_v0_display_demangle(struc...
function code_to_utf8 (line 215) | static size_t code_to_utf8(unsigned char *buffer, uint32_t code)
function NODISCARD (line 244) | static NODISCARD size_t utf8_next_char(uint8_t *s, uint32_t *ch) {
function NODISCARD (line 292) | static NODISCARD bool validate_char(uint32_t n) {
function NODISCARD (line 298) | static NODISCARD punycode_status punycode_decode(const char *start, size...
type ident (line 392) | struct ident {
function NODISCARD (line 399) | static NODISCARD overflow_status display_ident(const char *ascii_start, ...
function NODISCARD (line 450) | static NODISCARD bool try_parse_uint(const char *buf, size_t len, uint64...
function NODISCARD (line 470) | static NODISCARD bool dinibble2int(const char *buf, uint8_t *result) {
function NODISCARD (line 497) | static NODISCARD size_t char_to_string(uint32_t ch, uint8_t quote, bool ...
function NODISCARD (line 539) | static NODISCARD nibbles_to_string_status nibbles_to_string(const char *...
function NODISCARD (line 659) | static NODISCARD demangle_status parser_push_depth(struct parser *parser) {
function demangle_status (line 668) | static demangle_status parser_pop_depth(struct parser *parser) {
function parser_peek (line 673) | static uint8_t parser_peek(struct parser const *parser) {
function parser_eat (line 681) | static bool parser_eat(struct parser *parser, uint8_t ch) {
function parser_next (line 692) | static uint8_t parser_next(struct parser *parser) {
function NODISCARD (line 701) | static NODISCARD demangle_status parser_ch(struct parser *parser, uint8_...
type buf (line 711) | struct buf {
function NODISCARD (line 716) | static NODISCARD demangle_status parser_hex_nibbles(struct parser *parse...
function NODISCARD (line 732) | static NODISCARD demangle_status parser_digit_10(struct parser *parser, ...
function NODISCARD (line 743) | static NODISCARD demangle_status parser_digit_62(struct parser *parser, ...
function NODISCARD (line 762) | static NODISCARD demangle_status parser_integer_62(struct parser *parser...
function NODISCARD (line 791) | static NODISCARD demangle_status parser_opt_integer_62(struct parser *pa...
function NODISCARD (line 808) | static NODISCARD demangle_status parser_disambiguator(struct parser *par...
function NODISCARD (line 814) | static NODISCARD demangle_status parser_namespace(struct parser *parser,...
function NODISCARD (line 827) | static NODISCARD demangle_status parser_backref(struct parser *parser, s...
function NODISCARD (line 855) | static NODISCARD demangle_status parser_ident(struct parser *parser, str...
function printer_eat (line 992) | static bool printer_eat(struct printer *printer, uint8_t b) {
function printer_pop_depth (line 1000) | static void printer_pop_depth(struct printer *printer) {
function NODISCARD (line 1006) | static NODISCARD overflow_status printer_print_buf(struct printer *print...
function NODISCARD (line 1020) | static NODISCARD overflow_status printer_print_str(struct printer *print...
function NODISCARD (line 1024) | static NODISCARD overflow_status printer_print_ch(struct printer *printe...
function NODISCARD (line 1028) | static NODISCARD overflow_status printer_print_u64(struct printer *print...
function NODISCARD (line 1034) | static NODISCARD overflow_status printer_print_ident(struct printer *pri...
type printer (line 1049) | struct printer
type parser (line 110) | struct parser
type printer (line 1050) | struct printer
type parser (line 110) | struct parser
function NODISCARD (line 1052) | static NODISCARD overflow_status printer_print_backref(struct printer *p...
function NODISCARD (line 1071) | static NODISCARD overflow_status printer_print_lifetime_from_index(struc...
function NODISCARD (line 1098) | static NODISCARD overflow_status printer_in_binder(struct printer *print...
function NODISCARD (line 1125) | static NODISCARD overflow_status printer_print_generic_arg(struct printe...
function NODISCARD (line 1137) | static NODISCARD overflow_status printer_print_generic_args(struct print...
function NODISCARD (line 1144) | static NODISCARD overflow_status printer_print_path_out_of_value(struct ...
function NODISCARD (line 1149) | static NODISCARD overflow_status printer_print_path_in_value(struct prin...
function NODISCARD (line 1154) | static NODISCARD overflow_status printer_print_path(struct printer *prin...
function NODISCARD (line 1260) | static NODISCARD overflow_status printer_print_const_uint(struct printer...
function NODISCARD (line 1282) | static NODISCARD overflow_status printer_print_const_str_literal(struct ...
function NODISCARD (line 1311) | static NODISCARD overflow_status printer_print_const_struct(struct print...
function NODISCARD (line 1321) | static NODISCARD overflow_status printer_print_const_out_of_value(struct...
function NODISCARD (line 1326) | static NODISCARD overflow_status printer_print_const_in_value(struct pri...
function NODISCARD (line 1331) | static NODISCARD overflow_status printer_print_const(struct printer *pri...
function NODISCARD (line 1476) | static NODISCARD overflow_status printer_print_maybe_open_generics(struc...
function NODISCARD (line 1495) | static NODISCARD overflow_status printer_print_dyn_trait(struct printer ...
function NODISCARD (line 1522) | static NODISCARD overflow_status printer_print_object_bounds(struct prin...
function NODISCARD (line 1527) | static NODISCARD overflow_status printer_print_function_type(struct prin...
function NODISCARD (line 1588) | static NODISCARD overflow_status printer_print_type_backref(struct print...
function NODISCARD (line 1593) | static NODISCARD overflow_status printer_print_type(struct printer *prin...
function NODISCARD (line 1682) | NODISCARD static demangle_status rust_demangle_legacy_demangle(const cha...
function is_rust_hash (line 1756) | static bool is_rust_hash(const char *s, size_t len) {
function NODISCARD (line 1770) | NODISCARD static overflow_status rust_demangle_legacy_display_demangle(s...
function is_symbol_like (line 1895) | static bool is_symbol_like(const char *s, size_t len) {
function rust_demangle_demangle (line 1906) | void rust_demangle_demangle(const char *s, struct demangle *res)
function rust_demangle_is_known (line 1986) | bool rust_demangle_is_known(struct demangle *res) {
function overflow_status (line 1990) | overflow_status rust_demangle_display_demangle(struct demangle const *re...
FILE: src/rustDemangle.h
type overflow_status (line 17) | typedef enum {
type demangle_style (line 22) | enum demangle_style {
type demangle (line 29) | struct demangle {
type demangle (line 56) | struct demangle
type demangle (line 70) | struct demangle
type demangle (line 73) | struct demangle
FILE: src/safeAccess.cpp
function NOINLINE (line 25) | NOINLINE
function NOINLINE (line 44) | NOINLINE
FILE: src/safeAccess.h
function class (line 13) | class SafeAccess {
FILE: src/spinLock.h
function class (line 14) | class SpinLock {
FILE: src/stackFrame.h
function class (line 16) | class StackFrame {
FILE: src/stackFrame_aarch64.cpp
function isSTP (line 75) | static inline bool isSTP(instruction_t insn) {
function isFixedSizeFrame (line 82) | static inline bool isFixedSizeFrame(const char* name) {
function isZeroSizeFrame (line 99) | static inline bool isZeroSizeFrame(const char* name) {
function isFrameComplete (line 179) | static inline bool isFrameComplete(instruction_t* entry, instruction_t* ...
function isPollReturn (line 228) | static inline bool isPollReturn(instruction_t* ip) {
FILE: src/stackFrame_x64.cpp
function isFrameComplete (line 105) | static inline bool isFrameComplete(instruction_t* entry, instruction_t* ...
function isPollReturn (line 141) | static inline bool isPollReturn(instruction_t* ip) {
FILE: src/stackWalker.cpp
function aligned (line 24) | static inline bool aligned(uintptr_t ptr) {
function inDeadZone (line 28) | static inline bool inDeadZone(const void* ptr) {
function defaultSenderSP (line 34) | static inline uintptr_t defaultSenderSP(uintptr_t sp, uintptr_t fp) {
function fillFrame (line 42) | static inline void fillFrame(ASGCT_CallFrame& frame, ASGCT_CallFrameType...
function fillFrame (line 47) | static inline void fillFrame(ASGCT_CallFrame& frame, ASGCT_CallFrameType...
function fillFrame (line 52) | static inline void fillFrame(ASGCT_CallFrame& frame, FrameTypeId type, i...
function jmethodID (line 57) | static jmethodID getMethodId(VMMethod* method) {
FILE: src/stackWalker.h
function class (line 17) | class StackWalker {
FILE: src/symbols.h
function class (line 13) | class Symbols {
function class (line 28) | class UnloadProtection {
FILE: src/symbols_linux.cpp
function poll_hook (line 38) | static int poll_hook(struct pollfd* fds, nfds_t nfds, int timeout) {
function applyPatch (line 49) | static void applyPatch(CodeCache* cc) {
function applyPatch (line 66) | static void applyPatch(CodeCache* cc) {}
type dl_phdr_info (line 72) | struct dl_phdr_info
function isMainExecutable (line 82) | static bool isMainExecutable(const char* image_base, const void* map_end) {
function isLoader (line 86) | static bool isLoader(const char* image_base) {
class SymbolDesc (line 90) | class SymbolDesc {
method SymbolDesc (line 96) | SymbolDesc(const char* s) {
method type (line 102) | char type() { return _desc != NULL ? _desc[1] : 0; }
class MemoryMapDesc (line 106) | class MemoryMapDesc {
method MemoryMapDesc (line 117) | MemoryMapDesc(const char* s) {
method isReadable (line 132) | bool isReadable() { return _perm[0] == 'r'; }
method isExecutable (line 133) | bool isExecutable() { return _perm[2] == 'x'; }
method offs (line 136) | unsigned long offs() { return strtoul(_offs, NULL, 16); }
method inode (line 137) | unsigned long inode() { return strtoul(_inode, NULL, 10); }
method dev (line 139) | unsigned long dev() {
type SharedLibrary (line 147) | struct SharedLibrary {
class ElfParser (line 211) | class ElfParser {
method ElfParser (line 221) | ElfParser(CodeCache* cc, const char* base, const void* addr, const cha...
method validHeader (line 230) | bool validHeader() {
method ElfSection (line 237) | ElfSection* section(int index) {
function ElfSection (line 285) | ElfSection* ElfParser::findSection(uint32_t type, const char* name) {
function ElfProgramHeader (line 300) | ElfProgramHeader* ElfParser::findProgramHeader(uint32_t type) {
function collectSharedLibraries (line 724) | static void collectSharedLibraries(std::unordered_map<u64, SharedLibrary...
function verifyBaseAddress (line 842) | static bool verifyBaseAddress(const CodeCache* cc, void* lib_handle) {
FILE: src/symbols_macos.cpp
class MachOParser (line 30) | class MachOParser {
method findSymbolPtrSection (line 40) | void findSymbolPtrSection(const segment_command_64* sc, const section_...
method section_64 (line 53) | const section_64* findSection(const segment_command_64* sc, const char...
method loadSymbols (line 64) | void loadSymbols(const symtab_command* symtab, const char* link_base) {
method loadStubSymbols (line 83) | void loadStubSymbols(const symtab_command* symtab, const dysymtab_comm...
method loadImports (line 106) | void loadImports(const symtab_command* symtab, const dysymtab_command*...
method MachOParser (line 125) | MachOParser(CodeCache* cc, const mach_header* image_base, const char* ...
method parse (line 128) | bool parse() {
FILE: src/threadFilter.h
function class (line 23) | class ThreadFilter {
FILE: src/threadLocalData.cpp
function pthread_key_t (line 9) | static pthread_key_t init_profiler_data_key() {
function asprof_thread_local_data (line 24) | asprof_thread_local_data* ThreadLocalData::initThreadLocalData(pthread_k...
FILE: src/threadLocalData.h
function class (line 12) | class ThreadLocalData {
FILE: src/trap.h
function class (line 16) | class Trap {
function covers (line 37) | bool covers(uintptr_t pc) {
function install (line 45) | bool install() {
function uninstall (line 49) | bool uninstall() {
FILE: src/tsc.h
function u64 (line 22) | static inline u64 rdtsc() {
function cpuHasGoodTimestampCounter (line 35) | static bool cpuHasGoodTimestampCounter() {
function u64 (line 55) | static inline u64 rdtsc() {
function cpuHasGoodTimestampCounter (line 61) | static bool cpuHasGoodTimestampCounter() {
function cpuHasGoodTimestampCounter (line 71) | static bool cpuHasGoodTimestampCounter() {
function class (line 78) | class TSC {
FILE: src/userEvents.h
function class (line 12) | class UserEvents {
FILE: src/vmEntry.cpp
function isVmRuntimeEntry (line 50) | static bool isVmRuntimeEntry(const char* blob_name) {
function isZingRuntimeEntry (line 59) | static bool isZingRuntimeEntry(const char* blob_name) {
function isZeroInterpreterMethod (line 64) | static bool isZeroInterpreterMethod(const char* blob_name) {
function isOpenJ9InterpreterMethod (line 69) | static bool isOpenJ9InterpreterMethod(const char* blob_name) {
function isOpenJ9JitStub (line 76) | static bool isOpenJ9JitStub(const char* blob_name) {
function isOpenJ9Resolve (line 87) | static bool isOpenJ9Resolve(const char* blob_name) {
function isOpenJ9JitAlloc (line 91) | static bool isOpenJ9JitAlloc(const char* blob_name) {
function isOpenJ9GcAlloc (line 95) | static bool isOpenJ9GcAlloc(const char* blob_name) {
function isOpenJ9JvmtiAlloc (line 99) | static bool isOpenJ9JvmtiAlloc(const char* blob_name) {
function isCompilerEntry (line 104) | static bool isCompilerEntry(const char* blob_name) {
function jvmtiError (line 441) | jvmtiError VM::RedefineClassesHook(jvmtiEnv* jvmti, jint class_count, co...
function jvmtiError (line 457) | jvmtiError VM::RetransformClassesHook(jvmtiEnv* jvmti, jint class_count,...
function DLLEXPORT (line 474) | DLLEXPORT jint JNICALL
function DLLEXPORT (line 495) | DLLEXPORT jint JNICALL
function DLLEXPORT (line 527) | DLLEXPORT jint JNICALL
function DLLEXPORT (line 537) | DLLEXPORT void JNICALL
FILE: src/vmEntry.h
type FrameTypeId (line 12) | enum FrameTypeId {
function class (line 29) | class FrameType {
type ASGCT_CallFrameType (line 42) | enum ASGCT_CallFrameType {
type ASGCT_Failure (line 56) | enum ASGCT_Failure {
type ASGCT_CallFrame (line 72) | typedef struct {
type ASGCT_CallTrace (line 78) | typedef struct {
type jlong (line 86) | typedef jlong (*JVM_MemoryFunc)();
type jint (line 88) | typedef jint (*GetCreatedJavaVMs)(JavaVM**, jsize, jsize*);
type JVMTIFunctions (line 90) | typedef struct {
function class (line 98) | class VM {
FILE: src/vmStructs.cpp
function VMThread (line 627) | VMThread* VMThread::current() {
function JNIEnv (line 648) | JNIEnv* VMThread::jni() {
function jmethodID (line 655) | jmethodID VMMethod::id() {
function jmethodID (line 676) | jmethodID VMMethod::validatedId() {
function NMethod (line 684) | NMethod* CodeHeap::findNMethod(char* heap, const void* pc) {
function JVMFlag (line 700) | JVMFlag* JVMFlag::find(const char* name) {
FILE: src/vmStructs.h
function class (line 18) | class VMStructs {
function class (line 189) | class MethodList {
function class (line 207) | class VMSymbol : VMStructs {
function class (line 222) | class ClassLoaderData : VMStructs {
function class (line 242) | class VMKlass : VMStructs {
function class (line 300) | class JavaFrameAnchor : VMStructs {
function class (line 353) | class VMThread : VMStructs {
function class (line 413) | class VMMethod : VMStructs {
function class (line 436) | class NMethod : VMStructs {
function class (line 552) | class CodeHeap : VMStructs {
function class (line 593) | class CollectedHeap : VMStructs {
function class (line 612) | class JVMFlag : VMStructs {
function class (line 650) | class PcDesc {
function class (line 658) | class ScopeDesc : VMStructs {
function class (line 691) | class InterpreterFrame : VMStructs {
FILE: src/wallClock.cpp
type ThreadSleepState (line 33) | struct ThreadSleepState {
type ThreadCpuTime (line 43) | struct ThreadCpuTime {
class ThreadCpuTimeBuffer (line 49) | class ThreadCpuTimeBuffer {
method ThreadCpuTimeBuffer (line 64) | ThreadCpuTimeBuffer() : _ringbuf(), _write_ptr(0), _read_ptr(0) {
method reset (line 67) | void reset() {
method add (line 73) | void add(u64 trace) {
method drain (line 79) | void drain(ThreadSleepMap& thread_sleep_state) {
function ThreadState (line 108) | ThreadState WallClock::getThreadState(void* ucontext) {
function Error (line 156) | Error WallClock::start(Arguments& args) {
FILE: src/wallClock.h
type ThreadSleepState (line 15) | struct ThreadSleepState
function class (line 17) | class WallClock : public Engine {
FILE: src/writer.cpp
function Writer (line 15) | Writer& Writer::operator<<(char c) {
function Writer (line 20) | Writer& Writer::operator<<(const char* s) {
function Writer (line 25) | Writer& Writer::operator<<(int n) {
function Writer (line 31) | Writer& Writer::operator<<(long n) {
function Writer (line 37) | Writer& Writer::operator<<(u64 n) {
FILE: src/writer.h
function class (line 13) | class Writer {
function class (line 34) | class FileWriter : public Writer {
function class (line 56) | class LogWriter : public Writer {
function class (line 66) | class BufferWriter : public Writer {
function class (line 87) | class CallbackWriter : public Writer {
FILE: src/zInit.cpp
class LateInitializer (line 15) | class LateInitializer {
method LateInitializer (line 17) | LateInitializer() {
method checkJvmLoaded (line 35) | bool checkJvmLoaded() {
method startProfiler (line 53) | void startProfiler(const char* command) {
FILE: test/native/argumentsTest.cpp
function TEST_CASE (line 10) | TEST_CASE(Parse_all_mode_no_override) {
function TEST_CASE (line 26) | TEST_CASE(Parse_all_mode_event_override) {
function TEST_CASE (line 41) | TEST_CASE(Parse_all_mode_event_and_threshold_override) {
function TEST_CASE (line 56) | TEST_CASE(Parse_override_before_all_mode) {
function TEST_CASE (line 71) | TEST_CASE(Parse_proc_standalone) {
function TEST_CASE (line 79) | TEST_CASE(Parse_proc_default_value) {
function TEST_CASE (line 86) | TEST_CASE(Parse_proc_with_units) {
FILE: test/native/demangleTest.cpp
function TEST_CASE (line 10) | TEST_CASE(Demangle_test_needs_demangling) {
function TEST_CASE (line 22) | TEST_CASE(Demangle_test_demangle_cpp) {
function TEST_CASE (line 33) | TEST_CASE(Demangle_test_demangle_cpp_rust_like) {
function TEST_CASE (line 39) | TEST_CASE(Demangle_test_demangle_cpp_rust_like_2) {
function TEST_CASE (line 45) | TEST_CASE(Demangle_test_demangle_cpp_full_signature) {
function TEST_CASE (line 56) | TEST_CASE(Demangle_test_demangle_rust_legacy) {
function TEST_CASE (line 62) | TEST_CASE(Demangle_test_demangle_rust_legacy_dot_lto) {
function TEST_CASE (line 68) | TEST_CASE(Demangle_test_demangle_rust_legacy_full_signature) {
function TEST_CASE (line 74) | TEST_CASE(Demangle_test_demangle_rust_legacy_full_signature_dot_lto) {
function TEST_CASE (line 80) | TEST_CASE(Demangle_test_demangle_rust_v0) {
function TEST_CASE (line 86) | TEST_CASE(Demangle_test_demangle_rust_v0_full_signature) {
function TEST_CASE (line 92) | TEST_CASE(Demangle_test_demangle_rust_v0_dot_lto) {
function TEST_CASE (line 98) | TEST_CASE(Demangle_test_demangle_rust_v0_full_signature_dot_lto) {
function TEST_CASE (line 104) | TEST_CASE(Demangle_test_demangle_rust_v0_punycode) {
function TEST_CASE (line 114) | TEST_CASE(Demangle_test_demangle_rust_v0_consts) {
function TEST_CASE (line 121) | TEST_CASE(Demangle_test_demangle_rust_v0_consts_full_signature) {
function TEST_CASE (line 128) | TEST_CASE(Demangle_test_demangle_rust_v0_const_string) {
function TEST_CASE (line 136) | TEST_CASE(Demangle_test_demangle_rust_v0_invalid_backref) {
function TEST_CASE (line 142) | TEST_CASE(Demangle_test_demangle_rust_v0_expanding) {
function TEST_CASE (line 156) | TEST_CASE(Demangle_test_demangle_rust_v0_infinite) {
FILE: test/native/instrumentTest.cpp
function TEST_CASE (line 13) | TEST_CASE(Instrument_test_updateCurrentFrame_start) {
function TEST_CASE (line 26) | TEST_CASE(Instrument_test_updateCurrentFrame_newEntry) {
function TEST_CASE (line 40) | TEST_CASE(Instrument_test_updateCurrentFrame_mid) {
function TEST_CASE (line 53) | TEST_CASE(Instrument_test_parametersSlots_reference) {
function TEST_CASE (line 57) | TEST_CASE(Instrument_test_parametersSlots_referenceArray) {
function TEST_CASE (line 61) | TEST_CASE(Instrument_test_parametersSlots_2darray) {
function TEST_CASE (line 65) | TEST_CASE(Instrument_test_parametersSlots_2slots) {
function TEST_CASE (line 70) | TEST_CASE(Instrument_test_parametersSlots_1slot) {
function TEST_CASE (line 76) | TEST_CASE(Instrument_test_parametersSlots_doubleArray) {
function TEST_CASE (line 80) | TEST_CASE(Instrument_test_parametersSlots_mix) {
function TEST_CASE (line 84) | TEST_CASE(Instrument_test_instructionBytes) {
function TEST_CASE (line 96) | TEST_CASE(Instrument_test_instructionBytes_lookupswitch) {
function TEST_CASE (line 106) | TEST_CASE(Instrument_test_instructionBytes_largeLookupswitch) {
function TEST_CASE (line 116) | TEST_CASE(Instrument_test_instructionBytes_tableswitch) {
function TEST_CASE (line 128) | TEST_CASE(Instrument_test_instructionBytes_largeTableswitch) {
function TEST_CASE (line 140) | TEST_CASE(Instrument_test_addTarget_default) {
function TEST_CASE (line 150) | TEST_CASE(Instrument_test_addTarget_latency) {
function TEST_CASE (line 160) | TEST_CASE(Instrument_test_addTarget_signatureAndLatency) {
function TEST_CASE (line 170) | TEST_CASE(Instrument_test_addTarget_manyClasses) {
function TEST_CASE (line 184) | TEST_CASE(Instrument_test_addTarget_manyMethods) {
function TEST_CASE (line 198) | TEST_CASE(Instrument_test_addTarget_manySignatures) {
function TEST_CASE (line 212) | TEST_CASE(Instrument_test_addTarget_wrongSignature) {
function TEST_CASE (line 218) | TEST_CASE(Instrument_test_matchesPattern) {
function TEST_CASE (line 229) | TEST_CASE(Instrument_test_matchesPattern_empty) {
function TEST_CASE (line 234) | TEST_CASE(Instrument_test_findLatency) {
FILE: test/native/libs/jnimalloc.c
function JNICALL (line 15) | JNICALL Java_test_nativemem_Native_malloc(JNIEnv* env, jclass clazz, jlo...
function JNICALL (line 20) | JNICALL Java_test_nativemem_Native_calloc(JNIEnv* env, jclass clazz, jlo...
function JNICALL (line 25) | JNICALL Java_test_nativemem_Native_realloc(JNIEnv* env, jclass clazz, jl...
function JNICALL (line 30) | JNICALL Java_test_nativemem_Native_free(JNIEnv* env, jclass clazz, jlong...
function JNICALL (line 34) | JNICALL Java_test_nativemem_Native_posixMemalign(JNIEnv* env, jclass cla...
function JNICALL (line 40) | JNICALL Java_test_nativemem_Native_alignedAlloc(JNIEnv* env, jclass claz...
FILE: test/native/libs/jninativelocks.c
function JNICALL (line 13) | JNICALL Java_test_nativelock_NativeLock_mutexContentionThread(JNIEnv *en...
function JNICALL (line 22) | JNICALL Java_test_nativelock_NativeLock_rdlockContentionThread(JNIEnv *e...
function JNICALL (line 31) | JNICALL Java_test_nativelock_NativeLock_wrlockContentionThread(JNIEnv *e...
FILE: test/native/libs/jninativestacks.c
function JNIEXPORT (line 9) | JNIEXPORT double largeInnerFrameFinal(int i) {
function JNIEXPORT (line 17) | JNIEXPORT double largeInnerFrameIntermediate(int i) {
function JNIEXPORT (line 21) | JNIEXPORT double doCpuTask() {
function JNIEXPORT (line 33) | JNIEXPORT double generateDeepStack(int count) {
function JNICALL (line 45) | JNICALL Java_test_stackwalker_StackGenerator_largeFrame(JNIEnv* env, jcl...
function JNICALL (line 52) | JNICALL Java_test_stackwalker_StackGenerator_deepFrame(JNIEnv* env, jcla...
function JNICALL (line 59) | JNICALL Java_test_stackwalker_StackGenerator_leafFrame(JNIEnv* env, jcla...
function JNICALL (line 63) | JNICALL Java_test_stackwalker_StackGenerator_largeInnerFrame(JNIEnv* env...
FILE: test/native/libs/reladyn.c
function reladyn (line 21) | int reladyn() {
FILE: test/native/libs/vaddrdif.c
function vaddrdif_square (line 6) | int vaddrdif_square(int x) {
FILE: test/native/nativeLockTest.cpp
function TEST_CASE (line 11) | TEST_CASE(NativeLockTracer_start_with_valid_interval) {
function TEST_CASE (line 25) | TEST_CASE(NativeLockTracer_start_with_zero_interval) {
FILE: test/native/perfEventsLinuxTest.cpp
function TEST_CASE (line 49) | TEST_CASE(ForName_Predefined_cpu) {
function TEST_CASE (line 54) | TEST_CASE(ForName_Predefined_cpu_clock) {
function TEST_CASE (line 59) | TEST_CASE(ForName_Invalid_space) {
function TEST_CASE (line 64) | TEST_CASE(ForName_Breakpoint_Invalid_Zero) {
function TEST_CASE (line 69) | TEST_CASE(ForName_Breakpoint_Invalid) {
function TEST_CASE (line 74) | TEST_CASE(ForName_Breakpoint_InvalidColon2) {
function TEST_CASE (line 79) | TEST_CASE(ForName_Breakpoint_InvalidColon) {
function TEST_CASE (line 84) | TEST_CASE(ForName_Breakpoint_HexAddr) {
function TEST_CASE (line 89) | TEST_CASE(ForName_Breakpoint_DecAddr) {
function TEST_CASE (line 94) | TEST_CASE(ForName_Breakpoint_Addr_DecOffset) {
function TEST_CASE (line 99) | TEST_CASE(ForName_Breakpoint_Addr_HexOffset) {
function TEST_CASE (line 104) | TEST_CASE(ForName_Breakpoint_Addr_HexOffset_DecLen) {
function TEST_CASE (line 109) | TEST_CASE(ForName_Breakpoint_Addr_HexOffset_HexLen) {
function TEST_CASE (line 114) | TEST_CASE(ForName_Breakpoint_Addr_HexOffset_HexLen_R) {
function TEST_CASE (line 119) | TEST_CASE(ForName_Breakpoint_Addr_HexOffset_HexLen_W) {
function TEST_CASE (line 124) | TEST_CASE(ForName_Breakpoint_Addr_HexOffset_HexLen_X) {
function TEST_CASE (line 132) | TEST_CASE(ForName_Breakpoint_Addr_HexOffset_HexLen_InvalidDefaultRW) {
function TEST_CASE (line 137) | TEST_CASE(ForName_Breakpoint_Addr_HexOffset_HexLen_X_Arg) {
function TEST_CASE (line 145) | TEST_CASE(ForName_Breakpoint_Addr_HexOffset_HexLen_RW) {
function TEST_CASE (line 150) | TEST_CASE(ForName_Breakpoint_Addr_HexOffset_HexLen_RX) {
function TEST_CASE (line 155) | TEST_CASE(ForName_Breakpoint_Addr_HexOffset_HexLen_WX) {
function TEST_CASE (line 160) | TEST_CASE(ForName_Breakpoint_Addr_HexOffset_HexLen_X_Known) {
function TEST_CASE (line 170) | TEST_CASE(ForName_Breakpoint_Symbol) {
function TEST_CASE (line 178) | TEST_CASE(ForName_Tracepoint_Invalid) {
function TEST_CASE (line 183) | TEST_CASE(ForName_Tracepoint_Id) {
function TEST_CASE (line 188) | TEST_CASE(ForName_Tracepoint_Zero) {
function TEST_CASE (line 193) | TEST_CASE(ForName_kprobe_Invalid) {
function TEST_CASE (line 238) | TEST_CASE(ForName_raw_pmu_0) {
function TEST_CASE (line 243) | TEST_CASE(ForName_raw_pmu_33) {
function TEST_CASE (line 248) | TEST_CASE(ForName_raw_pmu_033) {
function TEST_CASE (line 253) | TEST_CASE(ForName_raw_pmu_u64) {
function TEST_CASE (line 258) | TEST_CASE(ForName_symbol) {
function TEST_CASE (line 266) | TEST_CASE(ForName_symbol_private) {
FILE: test/native/processInfoTest.cpp
function TEST_CASE (line 11) | TEST_CASE(ProcessInfo_initialization) {
function TEST_CASE (line 35) | TEST_CASE(GetProcessIds_returns_valid_pids) {
function TEST_CASE (line 55) | TEST_CASE(GetProcessIds_respects_max_limit) {
function TEST_CASE (line 62) | TEST_CASE(GetBasicProcessInfo_self_process) {
function TEST_CASE (line 82) | TEST_CASE(GetBasicProcessInfo_invalid_pid) {
function TEST_CASE (line 88) | TEST_CASE(GetBasicProcessInfo_nonexistent_pid) {
function TEST_CASE (line 94) | TEST_CASE(GetDetailedProcessInfo_self_process) {
function TEST_CASE (line 111) | TEST_CASE(GetSysBootTime_returns_valid_time) {
function TEST_CASE (line 121) | TEST_CASE(ClockTicksPerSec_is_valid) {
function TEST_CASE (line 128) | TEST_CASE(ProcessInfo_functions_not_implemented_on_non_linux) {
FILE: test/native/protobufBufferTest.cpp
function u64 (line 10) | static u64 readVarInt(const unsigned char* data) {
function TEST_CASE (line 20) | TEST_CASE(Buffer_test_varint_0) {
function TEST_CASE (line 30) | TEST_CASE(Buffer_test_varint_150) {
function TEST_CASE (line 40) | TEST_CASE(Buffer_test_varint_LargeNumber) {
function TEST_CASE (line 50) | TEST_CASE(Buffer_test_var32_bool) {
function TEST_CASE (line 66) | TEST_CASE(Buffer_test_repeated_u64) {
function TEST_CASE (line 79) | TEST_CASE(Buffer_test_string) {
function TEST_CASE (line 90) | TEST_CASE(Buffer_test_nestedField) {
function TEST_CASE (line 109) | TEST_CASE(Buffer_test_nestedMessageWithString) {
function TEST_CASE (line 132) | TEST_CASE(Buffer_test_maxTag) {
function TEST_CASE (line 150) | TEST_CASE(Buffer_test_relocation) {
function TEST_CASE (line 173) | TEST_CASE(Buffer_test_VarIntByteSize) {
function TEST_CASE (line 187) | TEST_CASE(Buffer_test_string_with_explicit_length) {
FILE: test/native/safeAccessTest.cpp
function TEST_CASE (line 10) | TEST_CASE(SafeAccess_load) {
FILE: test/native/symbolsTest.cpp
function TEST_CASE (line 38) | TEST_CASE(ResolveFromRela_plt) {
function TEST_CASE (line 42) | TEST_CASE(ResolveFromRela_dyn_R_GLOB_DAT) {
function TEST_CASE (line 48) | TEST_CASE(ResolveFromRela_dyn_R_ABS64) {
function TEST_CASE (line 52) | TEST_CASE(VirtAddrDifferentLoadAddr) {
function TEST_CASE (line 60) | TEST_CASE(MappedTwiceAtZeroOffset) {
function TEST_CASE (line 69) | TEST_CASE(MultipleMatchingSymbols) {
FILE: test/native/testRunner.cpp
function main (line 12) | int main() {
function TestRunner (line 16) | TestRunner* TestRunner::instance() {
function fileReadable (line 21) | bool fileReadable(const char* filename) {
FILE: test/native/testRunner.hpp
type TestCase (line 17) | struct TestCase
method TestCase (line 49) | TestCase(const std::string& name, std::function<void()> test_function,...
class TestRunner (line 19) | class TestRunner {
method TestRunner (line 23) | TestRunner(const TestRunner&) = delete;
method TestRunner (line 24) | TestRunner& operator=(const TestRunner&) = delete;
method TestRunner (line 27) | TestRunner() : _test_cases() {
type TestCase (line 39) | struct TestCase {
method TestCase (line 49) | TestCase(const std::string& name, std::function<void()> test_function,...
type TestRegistrar (line 150) | struct TestRegistrar {
method TestRegistrar (line 151) | TestRegistrar(const std::string& name, std::function<void()> test_func...
FILE: test/one/profiler/test/Arch.java
type Arch (line 8) | public enum Arch {
FILE: test/one/profiler/test/Assert.java
class Assert (line 12) | public class Assert {
type Comparison (line 13) | enum Comparison {
method Comparison (line 24) | Comparison(String operator, BiPredicate<Double, Double> comparator) {
method assertComparison (line 32) | private static void assertComparison(Comparison comparison, double lef...
method isEqual (line 43) | public static void isEqual(double left, double right) {
method isEqual (line 47) | public static void isEqual(double left, double right, String message) {
method isNotEqual (line 51) | public static void isNotEqual(double left, double right) {
method isNotEqual (line 55) | public static void isNotEqual(double left, double right, String messag...
method isGreater (line 59) | public static void isGreater(double left, double right) {
method isGreater (line 63) | public static void isGreater(double left, double right, String message) {
method isGreaterOrEqual (line 67) | public static void isGreaterOrEqual(double left, double right) {
method isGreaterOrEqual (line 71) | public static void isGreaterOrEqual(double left, double right, String ...
method isLess (line 75) | public static void isLess(double left, double right) {
method isLess (line 79) | public static void isLess(double left, double right, String message) {
method isLessOrEqual (line 83) | public static void isLessOrEqual(double left, double right) {
method isLessOrEqual (line 87) | public static void isLessOrEqual(double left, double right, String mes...
FILE: test/one/profiler/test/Jvm.java
type Jvm (line 8) | public enum Jvm {
FILE: test/one/profiler/test/Os.java
type Os (line 8) | public enum Os {
method getLibExt (line 13) | public String getLibExt() {
FILE: test/one/profiler/test/Output.java
class Output (line 17) | public class Output {
method Output (line 20) | public Output(String[] lines) {
method toString (line 24) | @Override
method stream (line 29) | public Stream<String> stream() {
method stream (line 33) | public Stream<String> stream(String regex) {
method contains (line 38) | public boolean contains(String regex) {
method containsExact (line 42) | public boolean containsExact(String string) {
method samples (line 46) | public long samples(String regex) {
method total (line 50) | public long total() {
method ratio (line 54) | public double ratio(String regex) {
method convertFlameToCollapsed (line 67) | public Output convertFlameToCollapsed() throws IOException {
method convertJfrToCollapsed (line 79) | public static Output convertJfrToCollapsed(String input, String... arg...
method filter (line 90) | public Output filter(String regex) {
method extractSamples (line 94) | private static long extractSamples(String s) {
FILE: test/one/profiler/test/RunnableTest.java
class RunnableTest (line 10) | public class RunnableTest {
method RunnableTest (line 14) | RunnableTest(Method m, Test test) {
method method (line 19) | public Method method() {
method test (line 23) | public Test test() {
method testName (line 27) | public String testName() {
method className (line 33) | public String className() {
method testInfo (line 37) | public String testInfo() {
FILE: test/one/profiler/test/Runner.java
class Runner (line 27) | public class Runner {
method detectOs (line 37) | private static Os detectOs() {
method detectArch (line 49) | private static Arch detectArch() {
method detectJvm (line 69) | private static Jvm detectJvm() {
method detectJvmVersion (line 105) | private static int detectJvmVersion() {
method applicable (line 113) | private static boolean applicable(Test test) {
method runTest (line 124) | private static TestResult runTest(RunnableTest rt, TestDeclaration dec...
method configureLogging (line 151) | private static void configureLogging() {
method printSummary (line 170) | private static void printSummary(AtomicIntegerArray statusCounts, Set<...
method waitForExecutorTermination (line 190) | private static void waitForExecutorTermination(ThreadPoolExecutor exec...
method main (line 205) | public static void main(String[] args) throws Exception {
FILE: test/one/profiler/test/SourceCode.java
class SourceCode (line 12) | public class SourceCode {
method tryGet (line 13) | public static String tryGet(int ignoreFrames) {
method tryGet (line 17) | public static String tryGet(Throwable e, int ignoreFrames) {
method getFilePath (line 30) | private static String getFilePath(String className) {
method getSourceCodeAt (line 38) | private static String getSourceCodeAt(String filePath, int lineNumber) {
FILE: test/one/profiler/test/TestDeclaration.java
class TestDeclaration (line 21) | public class TestDeclaration {
method TestDeclaration (line 28) | public TestDeclaration(List<String> allDirs, List<String> globs, List<...
method parse (line 38) | public static TestDeclaration parse(String[] args) {
method getRunnableTests (line 61) | private List<RunnableTest> getRunnableTests(String dir) {
method getRunnableTests (line 78) | public List<RunnableTest> getRunnableTests() {
method includes (line 85) | public boolean includes(Method m) {
method skips (line 89) | public boolean skips(Method m) {
method matches (line 93) | private static boolean matches(Method m, List<Pattern> patterns) {
method filterFrom (line 98) | private static Pattern filterFrom(String s) {
method filterFromGlobs (line 116) | private List<Pattern> filterFromGlobs(List<String> globs) {
FILE: test/one/profiler/test/TestProcess.java
class TestProcess (line 26) | public class TestProcess implements Closeable {
method getPidHandle (line 43) | private static MethodHandle getPidHandle() {
method TestProcess (line 70) | public TestProcess(Test test, Os currentOs, Jvm currentJvm, String log...
method test (line 104) | public Test test() {
method inputs (line 108) | public String[] inputs() {
method currentOs (line 112) | public Os currentOs() {
method currentJvm (line 116) | public Jvm currentJvm() {
method profilerLibPath (line 120) | public String profilerLibPath() {
method testBinPath (line 124) | public String testBinPath() {
method testLibPath (line 128) | public String testLibPath() {
method buildCommandLine (line 132) | private List<String> buildCommandLine(Test test) {
method getExtFromFile (line 164) | private String getExtFromFile(File file) {
method addArgs (line 180) | private void addArgs(List<String> cmd, String args) {
method substituteFiles (line 189) | private String substituteFiles(String s) {
method substituteFile (line 204) | private String substituteFile(String fileId, String ext) {
method createTempFile (line 217) | private File createTempFile(String fileId) {
method createTempFile (line 221) | private File createTempFile(String fileId, String ext) {
method clearTempFiles (line 231) | private void clearTempFiles() {
method moveLog (line 237) | private void moveLog(File file, String name, boolean autoExtension) th...
method moveLogs (line 244) | private void moveLogs() {
method isRoot (line 265) | private boolean isRoot() {
method close (line 273) | @Override
method pid (line 289) | public long pid() {
method exitCode (line 297) | public int exitCode() {
method waitForExit (line 301) | public void waitForExit() throws TimeoutException, InterruptedException {
method waitForExit (line 305) | public Output waitForExit(String fileId) throws TimeoutException, Inte...
method waitForExit (line 310) | private void waitForExit(Process p, int seconds) throws TimeoutExcepti...
method profile (line 317) | public Output profile(String args) throws IOException, TimeoutExceptio...
method profile (line 321) | public Output profile(String args, boolean sudo) throws IOException, T...
method profile (line 325) | public Output profile(String args, boolean sudo, int timeout) throws I...
method getFile (line 349) | public File getFile(String fileId) {
method getFilePath (line 353) | public String getFilePath(String fileId) {
method readFile (line 357) | public Output readFile(String fileId) {
FILE: test/one/profiler/test/TestResult.java
class TestResult (line 8) | public class TestResult {
method TestResult (line 12) | private TestResult(TestStatus status, Throwable throwable) {
method status (line 21) | public TestStatus status() {
method throwable (line 25) | public Throwable throwable() {
method skipConfigMismatch (line 29) | public static TestResult skipConfigMismatch() {
method skipDisabled (line 33) | public static TestResult skipDisabled() {
method skipMissingJar (line 37) | public static TestResult skipMissingJar() {
method pass (line 41) | public static TestResult pass() {
method fail (line 45) | public static TestResult fail(Throwable t) {
FILE: test/one/profiler/test/TestStatus.java
type TestStatus (line 8) | public enum TestStatus {
FILE: test/stubs/com/google/protobuf/ByteString.java
class ByteString (line 8) | public abstract class ByteString {}
FILE: test/stubs/com/google/protobuf/CodedInputStream.java
class CodedInputStream (line 8) | public abstract class CodedInputStream {}
FILE: test/stubs/com/google/protobuf/GeneratedMessageV3.java
class GeneratedMessageV3 (line 8) | public abstract class GeneratedMessageV3 {}
FILE: test/stubs/com/google/protobuf/InvalidProtocolBufferException.java
class InvalidProtocolBufferException (line 8) | public class InvalidProtocolBufferException extends java.io.IOException {}
FILE: test/stubs/com/google/protobuf/MessageOrBuilder.java
type MessageOrBuilder (line 8) | public interface MessageOrBuilder {}
FILE: test/stubs/com/google/protobuf/ProtocolStringList.java
type ProtocolStringList (line 8) | public interface ProtocolStringList extends java.util.List<String> {}
FILE: test/test/alloc/AllocTests.java
class AllocTests (line 21) | public class AllocTests {
method alloc (line 23) | @Test(mainClass = MapReader.class, jvmArgs = "-XX:+UseG1GC -Xmx1g -Xms...
method allocTotal (line 35) | @Test(mainClass = MapReaderOpt.class, jvmArgs = "-XX:+UseParallelGC -X...
method startup (line 46) | @Test(mainClass = Hello.class, agentArgs = "start,event=alloc,alloc=1,...
method humongous (line 58) | @Test(mainClass = MapReaderOpt.class, agentArgs = "start,event=G1Colle...
method tlabAllocSampler (line 66) | @Test(mainClass = MapReaderOpt.class)
method objectSamplerWtihDifferentAsprofs (line 85) | @Test(mainClass = MapReaderOpt.class, jvmVer = {11, Integer.MAX_VALUE})
method liveness (line 99) | @Test(mainClass = RandomBlockRetainer.class, jvmVer = {11, Integer.MAX...
method livenessJfrHasStacks (line 120) | @Test(mainClass = RandomBlockRetainer.class, jvmVer = {11, Integer.MAX...
FILE: test/test/alloc/Hello.java
class Hello (line 18) | public class Hello {
method main (line 20) | public static void main(String[] args) {
FILE: test/test/alloc/MapReader.java
class MapReader (line 20) | public class MapReader {
method MapReader (line 23) | public MapReader(int size) throws IOException {
method generate (line 27) | private static byte[] generate(int size) throws IOException {
method readMap (line 40) | public Map<String, Long> readMap(InputStream in) throws IOException {
method benchmark (line 55) | public void benchmark() throws IOException {
method main (line 64) | public static void main(String[] args) throws Exception {
FILE: test/test/alloc/MapReaderOpt.java
class MapReaderOpt (line 15) | public class MapReaderOpt extends MapReader {
method MapReaderOpt (line 17) | public MapReaderOpt(int size) throws IOException {
method readMap (line 21) | @Override
method trim (line 37) | private static String trim(String line, int from, int to) {
method main (line 47) | public static void main(String[] args) throws Exception {
FILE: test/test/alloc/RandomBlockRetainer.java
class RandomBlockRetainer (line 11) | public class RandomBlockRetainer {
method main (line 12) | public static void main(String[] args) throws Exception {
method alloc1 (line 40) | private static byte[] alloc1(int size) {
method alloc2 (line 44) | private static byte[] alloc2(int size) {
FILE: test/test/api/ApiTests.java
class ApiTests (line 12) | public class ApiTests {
method flat (line 14) | @Test(mainClass = DumpCollapsed.class, output = true)
method otlp (line 22) | @Test(mainClass = DumpOtlp.class)
method stopResume (line 28) | @Test(mainClass = StopResume.class, output = true)
method metrics (line 36) | @Test(mainClass = MetricsTest.class)
method javaAgent (line 42) | @Test(
FILE: test/test/api/BusyLoops.java
class BusyLoops (line 11) | class BusyLoops {
method method1 (line 13) | static long method1() {
method method2 (line 21) | static long method2() {
method method3 (line 30) | static long method3() {
FILE: test/test/api/DumpCollapsed.java
class DumpCollapsed (line 12) | public class DumpCollapsed extends BusyLoops {
method main (line 14) | public static void main(String[] args) throws Exception {
FILE: test/test/api/DumpOtlp.java
class DumpOtlp (line 13) | public class DumpOtlp extends BusyLoops {
method main (line 15) | public static void main(String[] args) throws Exception {
FILE: test/test/api/JavaAgent.java
class JavaAgent (line 14) | public class JavaAgent {
method main (line 16) | public static void main(String[] args) throws Exception {
FILE: test/test/api/MetricsTest.java
class MetricsTest (line 10) | public class MetricsTest {
method doStuff (line 12) | static void doStuff() {}
method main (line 14) | public static void main(String[] args) throws Exception {
FILE: test/test/api/StopResume.java
class StopResume (line 11) | public class StopResume extends BusyLoops {
method main (line 13) | public static void main(String[] args) throws Exception {
FILE: test/test/c/CTests.java
class CTests (line 14) | public class CTests {
method nativeApi (line 16) | @Test(sh = "%testbin/native_api %api_file.jfr", output = true)
FILE: test/test/c/native_api.c
function fail (line 21) | static void fail(const char* msg) {
function uninterruptible_sleep (line 26) | static void uninterruptible_sleep(unsigned long ms) {
function main (line 32) | int main(int argc, char** argv) {
FILE: test/test/comptask/ComptaskTests.java
class ComptaskTests (line 10) | public class ComptaskTests {
method testCompTask (line 11) | @Test(
FILE: test/test/comptask/Main.java
class Main (line 8) | public class Main {
method main (line 11) | public static void main(String[] args) throws Exception {
FILE: test/test/cpu/CpuBurner.java
class CpuBurner (line 10) | public class CpuBurner {
method burn (line 13) | static void burn() {
method main (line 20) | public static void main(String[] args) {
FILE: test/test/cpu/CpuTests.java
class CpuTests (line 18) | public class CpuTests {
method assertCloseTo (line 20) | private static void assertCloseTo(long value, long target, String mess...
method pinCpu (line 25) | private static void pinCpu(TestProcess p, int cpu) throws Exception {
method ctimerTotal (line 35) | @Test(mainClass = CpuBurner.class, os = Os.LINUX, runIsolated = true)
method itimerTotal (line 44) | @Test(mainClass = CpuBurner.class, runIsolated = true)
method perfEventsTargetCpuEventsCount (line 50) | @Test(mainClass = CpuBurner.class, os = Os.LINUX, runIsolated = true)
method perfEventsRecordCpuEventsCount (line 61) | @Test(mainClass = CpuBurner.class, os = Os.LINUX)
method perfEventsTargetCpuWithFdtransferEventsCount (line 74) | @Test(mainClass = CpuBurner.class, os = Os.LINUX, runIsolated = true)
method itimerDoesNotSupportTargetCpu (line 85) | @Test(mainClass = CpuBurner.class, os = Os.LINUX)
method ctimerDoesNotSupportTargetCpu (line 93) | @Test(mainClass = CpuBurner.class, os = Os.LINUX)
method itimerDoesNotSupportRecordCpu (line 101) | @Test(mainClass = CpuBurner.class, os = Os.LINUX)
method ctimerDoesNotSupportRecordCpu (line 109) | @Test(mainClass = CpuBurner.class, os = Os.LINUX)
FILE: test/test/cstack/CstackTests.java
class CstackTests (line 15) | public class CstackTests {
method asyncGetCallTrace (line 18) | @Test(mainClass = LongInitializer.class)
method vmStructs (line 29) | @Test(mainClass = LongInitializer.class, jvm = Jvm.HOTSPOT, os = Os.LI...
method saneNativeStack (line 46) | @Test(mainClass = Cpu.class, jvm = Jvm.HOTSPOT, agentArgs = "start,eve...
FILE: test/test/cstack/LongInitializer.java
class LongInitializer (line 11) | public class LongInitializer {
class InnerClass (line 13) | static class InnerClass {
method main (line 29) | public static void main(String[] args) throws Exception {
FILE: test/test/instrument/CpuBurner.java
class CpuBurner (line 11) | public class CpuBurner {
method burn (line 14) | static void burn(Duration duration) {
method main (line 24) | public static void main(String[] args) throws InterruptedException {
FILE: test/test/instrument/CpuBurnerManyTargets.java
class CpuBurnerManyTargets (line 11) | public class CpuBurnerManyTargets {
method burn1 (line 13) | static void burn1(Duration duration) {
method burn2 (line 17) | static void burn2(Duration duration) {
method main (line 21) | public static void main(String[] args) throws InterruptedException {
FILE: test/test/instrument/InstrumentTests.java
class InstrumentTests (line 20) | public class InstrumentTests {
method instrument (line 25) | @Test(
method instrumentSignature (line 40) | @Test(
method instrumentWrongSignature (line 55) | @Test(
method instrumentAll (line 71) | @Test(
method instrumentAllInit (line 87) | @Test(
method instrumentAllJavaLangInit (line 104) | @Test(
method instrumentThreadInitWildcard (line 121) | @Test(
method instrumentAllMethodsInClass (line 138) | @Test(
method instrumentJfr (line 155) | @Test(
method latency (line 180) | @Test(
method latencyAndInterval (line 198) | @Test(
method latencyZero (line 213) | @Test(
method latencySignature (line 228) | @Test(
method latencyWrongSignature (line 243) | @Test(
method manyEngines (line 258) | @Test(
method manyTraceTargets (line 282) | @Test(
method manyTraceTargetsSameClass (line 299) | @Test(
method manyTraceTargetsSameClassOneOut (line 315) | @Test(
method manyEnginesManyTraceTargets (line 332) | @Test(
method latencyJfr (line 356) | @Test(
method latencyAll (line 383) | @Test(
method latencyDuration (line 403) | @Test(
method recursive (line 421) | @Test(
method stop (line 453) | @Test(
method assertNoVerificationErrors (line 464) | private static void assertNoVerificationErrors(TestProcess p) throws I...
method assertAllCallsRecorded (line 473) | private static void assertAllCallsRecorded(Output out) {
FILE: test/test/instrument/MethodTracingStop.java
class MethodTracingStop (line 13) | public class MethodTracingStop {
method func1 (line 15) | private static void func1() {}
method main (line 17) | public static void main(String[] args) throws Exception {
FILE: test/test/instrument/Recursive.java
class Recursive (line 11) | public class Recursive {
method recursive (line 14) | static void recursive(long recursionCount) throws InterruptedException {
method main (line 20) | public static void main(String[] args) throws InterruptedException {
FILE: test/test/jfr/CpuLoad.java
class CpuLoad (line 8) | public class CpuLoad {
method sleep (line 10) | private static void sleep(long millis) {
method cpuLoad (line 18) | private static long cpuLoad() {
method normalCpuLoad (line 26) | private static void normalCpuLoad() {
method cpuSpike (line 35) | private static void cpuSpike() {
method main (line 43) | public static void main(String[] args) throws Exception {
FILE: test/test/jfr/JfrCpuProfiling.java
class JfrCpuProfiling (line 8) | public class JfrCpuProfiling {
method method1 (line 11) | private static void method1() {
method main (line 18) | public static void main(String[] args) throws Exception {
FILE: test/test/jfr/JfrMultiModeProfiling.java
class JfrMultiModeProfiling (line 27) | public class JfrMultiModeProfiling {
method main (line 41) | public static void main(String[] args) throws InterruptedException {
method cpuIntensiveIncrement (line 58) | private static void cpuIntensiveIncrement() {
method allocate (line 68) | private static void allocate() {
FILE: test/test/jfr/JfrTests.java
class JfrTests (line 21) | public class JfrTests {
method cpuLoad (line 23) | @Test(mainClass = CpuLoad.class, agentArgs = "start,event=cpu,file=%pr...
method recordCpuMultiEngine (line 45) | @Test(mainClass = CpuLoad.class, agentArgs = "start,event=cpu,alluser,...
method parseRecording (line 63) | @Test(mainClass = JfrCpuProfiling.class)
method parseMultiModeRecording (line 85) | @Test(mainClass = JfrMultiModeProfiling.class, agentArgs = "start,even...
method allModeNoEventOverride (line 117) | @Test(mainClass = JfrMultiModeProfiling.class, agentArgs = "start,all,...
method allModeEventOverride (line 154) | @Test(mainClass = JfrMultiModeProfiling.class, agentArgs = "start,all,...
method jfrSyncSmoke (line 186) | @Test(mainClass = JfrCpuProfiling.class)
method ttsp (line 211) | @Test(mainClass = Ttsp.class, agentArgs = "start,event=cpu,ttsp,interv...
method ttspNostop (line 227) | @Test(mainClass = Ttsp.class, agentArgs = "start,event=cpu,ttsp,nostop...
method beginEnd (line 234) | @Test(mainClass = Hello.class, agentArgs = "start,begin=write,end=writ...
method containsSamplesOutsideWindow (line 242) | private boolean containsSamplesOutsideWindow(TestProcess p) throws Exc...
method checkJdkVersionEarlierThan11 (line 264) | private static boolean checkJdkVersionEarlierThan11(String vmSpecifica...
FILE: test/test/jfr/Ttsp.java
class Ttsp (line 12) | public class Ttsp {
method requestSafepoint (line 17) | static void requestSafepoint() {
method getUnsafe (line 21) | static Unsafe getUnsafe() {
method delaySafepoint (line 31) | static void delaySafepoint() {
method main (line 43) | public static void main(String[] args) throws Exception {
FILE: test/test/jfrconverter/JfrconverterTests.java
class JfrconverterTests (line 24) | public class JfrconverterTests {
method heatmapConversion (line 26) | @Test(mainClass = CpuBurner.class, agentArgs = "start,jfr,all,file=%f")
method flamegraphConversion (line 34) | @Test(mainClass = CpuBurner.class, agentArgs = "start,jfr,all,file=%f")
method latencyFilter (line 42) | @Test(mainClass = Tracer.class, agentArgs = "start,jfr,wall,trace=test...
method diffCollapsed (line 82) | @Test(mainClass = Main.class, args = "--diff test/test/jfrconverter/sa...
method diffHtml (line 91) | @Test(mainClass = Main.class, args = "--diff test/test/jfrconverter/sa...
method buildFlameGraph (line 104) | private static byte[] buildFlameGraph(String input) throws IOException {
FILE: test/test/jfrconverter/Tracer.java
class Tracer (line 10) | final class Tracer {
method traceMethod (line 15) | private static void traceMethod(CountDownLatch latch) throws Interrupt...
method showcase1 (line 19) | private static void showcase1() throws InterruptedException {
method showcase2 (line 23) | private static void showcase2() throws InterruptedException {
method showcase3 (line 27) | private static void showcase3() throws InterruptedException {
method main (line 31) | public static void main(String[] args) throws InterruptedException {
FILE: test/test/kernel/KernelTests.java
class KernelTests (line 15) | public class KernelTests {
method kernel (line 17) | @Test(mainClass = ListFiles.class, os = Os.LINUX)
method fdtransfer (line 30) | @Test(mainClass = ListFiles.class, os = Os.LINUX)
method kprobe (line 38) | @Test(mainClass = ListFiles.class, os = Os.LINUX)
method notLinux (line 45) | @Test(mainClass = ListFiles.class, os = {Os.MACOS, Os.WINDOWS})
FILE: test/test/kernel/ListFiles.java
class ListFiles (line 10) | public class ListFiles {
method listFiles (line 13) | private static void listFiles() {
method main (line 19) | public static void main(String[] args) {
FILE: test/test/lock/DatagramTest.java
class DatagramTest (line 26) | public class DatagramTest {
method sendLoop (line 30) | public static void sendLoop() {
method main (line 48) | public static void main(String[] args) throws Exception {
FILE: test/test/lock/LockTests.java
class LockTests (line 12) | public class LockTests {
method datagramSocketLock (line 14) | @Test(mainClass = DatagramTest.class, debugNonSafepoints = true, jvmVe...
FILE: test/test/nativelock/AllNativeLocks.java
class AllNativeLocks (line 11) | public class AllNativeLocks {
method main (line 13) | public static void main(String[] args) throws InterruptedException {
method runAllLockTypesOnce (line 29) | private static void runAllLockTypesOnce() throws InterruptedException {
FILE: test/test/nativelock/NativeLock.java
class NativeLock (line 8) | public class NativeLock {
method mutexContentionThread (line 13) | public static native void mutexContentionThread();
method rdlockContentionThread (line 14) | public static native void rdlockContentionThread();
method wrlockContentionThread (line 15) | public static native void wrlockContentionThread();
FILE: test/test/nativelock/NativelockTests.java
class NativelockTests (line 13) | public class NativelockTests {
method canAsprofTraceAllLockTypes (line 15) | @Test(mainClass = AllNativeLocks.class)
method canAgentTraceAllLockTypes (line 23) | @Test(mainClass = AllNativeLocks.class, agentArgs = "start,nativelock,...
method ldpreloadAllLockTypes (line 31) | @Test(mainClass = AllNativeLocks.class, os = Os.LINUX, args = "once", ...
method nativeAllLockContention (line 40) | @Test(sh = "LD_PRELOAD=%lib ASPROF_COMMAND=start,nativelock,file=%f.jf...
FILE: test/test/nativelock/native_lock_contention.c
function main (line 44) | int main(int argc, char* argv[]) {
FILE: test/test/nativemem/CallsAllNoLeak.java
class CallsAllNoLeak (line 8) | public class CallsAllNoLeak {
method doMallocRealloc (line 18) | private static void doMallocRealloc() {
method doCalloc (line 24) | private static void doCalloc() {
method doPosixMemalign (line 29) | private static void doPosixMemalign() {
method doAlignedAlloc (line 34) | private static void doAlignedAlloc() {
method do_work (line 39) | private static void do_work(boolean once) {
method main (line 55) | public static void main(String[] args) throws InterruptedException {
FILE: test/test/nativemem/CallsMallocCalloc.java
class CallsMallocCalloc (line 8) | public class CallsMallocCalloc {
method main (line 13) | public static void main(String[] args) throws InterruptedException {
FILE: test/test/nativemem/CallsRealloc.java
class CallsRealloc (line 8) | public class CallsRealloc {
method main (line 13) | public static void main(String[] args) throws InterruptedException {
FILE: test/test/nativemem/Native.java
class Native (line 8) | public class Native {
method malloc (line 13) | public static native long malloc(long size);
method realloc (line 15) | public static native long realloc(long addr, long size);
method calloc (line 17) | public static native long calloc(long num, long size);
method free (line 19) | public static native long free(long addr);
method posixMemalign (line 21) | public static native long posixMemalign(long alignment, long size);
method alignedAlloc (line 23) | public static native long alignedAlloc(long alignment, long size);
FILE: test/test/nativemem/NativememTests.java
class NativememTests (line 22) | public class NativememTests {
method canAgentTraceMallocCalloc (line 31) | @Test(mainClass = CallsMallocCalloc.class, agentArgs = "start,nativeme...
method canAgentFilterMallocCalloc (line 40) | @Test(mainClass = CallsMallocCalloc.class, agentArgs = "start,nativeme...
method canAsprofTraceMallocCalloc (line 47) | @Test(mainClass = CallsMallocCalloc.class)
method canAgentTraceRealloc (line 59) | @Test(mainClass = CallsRealloc.class, agentArgs = "start,nativemem,tot...
method canAsprofTraceRealloc (line 67) | @Test(mainClass = CallsRealloc.class)
method canAsprofTraceAllNoLeak (line 79) | @Test(mainClass = CallsAllNoLeak.class)
method assertNoLeaks (line 102) | private static Map<Long, Long> assertNoLeaks(TestProcess p) throws Exc...
method jfrNoLeaks (line 150) | @Test(mainClass = CallsAllNoLeak.class, args = "once", agentArgs = "st...
method jfrNoFree (line 159) | @Test(mainClass = CallsAllNoLeak.class, args = "once", inputs = "nofre...
method ldpreload (line 165) | @Test(mainClass = CallsAllNoLeak.class, os = Os.LINUX, args = "once", ...
method malloc_plt_dyn (line 175) | @Test(sh = "LD_PRELOAD=%lib ASPROF_COMMAND=start,nativemem,file=%f.jfr...
method dlopenCustomLib (line 183) | @Test(sh = "%testbin/profile_with_dlopen dlopen_first %f.jfr", nameSuf...
method preloadMalloc (line 193) | @Test(os = Os.LINUX, sh = "LD_PRELOAD=\"%lib %testlib/libmalloc.so\" A...
method nativememKnownLibCrash (line 204) | @Test(sh = "%testbin/nativemem_known_lib_crash %f.jfr")
FILE: test/test/nativemem/malloc_plt_dyn.c
function main (line 15) | int main(void) {
FILE: test/test/nativemem/nativemem_known_lib_crash.c
function outputCallback (line 32) | void outputCallback(const char* buffer, size_t size) {
function main (line 52) | int main() {
FILE: test/test/nativemem/preload_malloc.c
function outputCallback (line 35) | void outputCallback(const char* buffer, size_t size) {
function executeAsyncProfilerCommand (line 39) | void executeAsyncProfilerCommand(char* cmd) {
function initAsyncProfiler (line 47) | void initAsyncProfiler() {
function preloadOrderTest (line 57) | void preloadOrderTest() {
function apiTest (line 70) | void apiTest(char* filename) {
function main (line 82) | int main(int argc, char** args) {
FILE: test/test/nativemem/profile_with_dlopen.c
function outputCallback (line 35) | void outputCallback(const char* buffer, size_t size) {
function main (line 39) | int main(int argc, char** argv) {
FILE: test/test/nonjava/JavaClass.java
class JavaClass (line 8) | public class JavaClass {
method cpuHeavyTask (line 10) | public static double cpuHeavyTask() {
FILE: test/test/nonjava/NonjavaTests.java
class NonjavaTests (line 12) | public class NonjavaTests {
method jvmFirst (line 15) | @Test(sh = "%testbin/non_java_app 1 %s.collapsed", output = true)
method profilerFirst (line 25) | @Test(sh = "%testbin/non_java_app 2 %s.collapsed", output = true)
method jvmInBetween (line 35) | @Test(sh = "%testbin/non_java_app 3 %f.collapsed %s.collapsed", output...
method differentThread (line 50) | @Test(sh = "%testbin/non_java_app 4 %s.collapsed", output = true)
FILE: test/test/nonjava/non_java_app.cpp
function outputCallback (line 37) | void outputCallback(const char* buffer, size_t size) {
function nativeBurnCpu (line 43) | double nativeBurnCpu() {
function loadProfiler (line 55) | void loadProfiler() {
function startProfiler (line 69) | void startProfiler() {
function stopProfiler (line 77) | void stopProfiler(char* output_file) {
function loadJvmLib (line 87) | void loadJvmLib() {
function startJvm (line 131) | void startJvm() {
function executeJvmTask (line 158) | void executeJvmTask() {
function stopJvm (line 183) | void stopJvm() {
function validateArgsCount (line 191) | void validateArgsCount(int argc, int expected) {
function testFlow1 (line 215) | void testFlow1(int argc, char** argv) {
function testFlow2 (line 248) | void testFlow2(int argc, char** argv) {
function testFlow3 (line 285) | void testFlow3(int argc, char** argv) {
function testFlow4 (line 337) | void testFlow4(int argc, char** argv) {
function main (line 354) | int main(int argc, char** argv) {
FILE: test/test/otlp/CpuBurner.java
class CpuBurner (line 13) | public class CpuBurner {
method burn (line 17) | static void burn() {
method main (line 24) | public static void main(String[] args) throws InterruptedException {
FILE: test/test/otlp/OtlpProfileTimeTest.java
class OtlpProfileTimeTest (line 11) | public class OtlpProfileTimeTest {
method main (line 13) | public static void main(String[] args) throws Exception {
method dumpAndGetProfile (line 41) | public static Profile dumpAndGetProfile(AsyncProfiler profiler) throws...
FILE: test/test/otlp/OtlpTests.java
class OtlpTests (line 23) | public class OtlpTests {
method sampleType (line 24) | @Test(mainClass = CpuBurner.class, agentArgs = "start,otlp,event=itime...
method sampleTypeTotal (line 33) | @Test(mainClass = CpuBurner.class, agentArgs = "start,otlp,event=itime...
method assertString (line 42) | private static void assertString(String actual, String expected) {
method threadName (line 46) | @Test(mainClass = CpuBurner.class, agentArgs = "start,otlp,threads,fil...
method threadNameFromJfr (line 52) | @Test(mainClass = CpuBurner.class, agentArgs = "start,jfr,file=%f")
method checkThreadNames (line 61) | private static void checkThreadNames(Profile profile, ProfilesDictiona...
method samples (line 71) | @Test(mainClass = CpuBurner.class, agentArgs = "start,otlp,file=%f.pb")
method samplesFromJfr (line 77) | @Test(mainClass = CpuBurner.class, agentArgs = "start,jfr,file=%f")
method checkSamples (line 86) | private static void checkSamples(Profile profile, ProfilesDictionary d...
method nonAggregatedSamplesFromJfr (line 91) | @Test(mainClass = CpuBurner.class, agentArgs = "start,jfr,file=%f")
method profileTime (line 105) | @Test(mainClass = OtlpProfileTimeTest.class)
method profileTimeFromJfr (line 113) | @Test(mainClass = CpuBurner.class, agentArgs = "start,jfr,file=%f")
method waitAndGetProfilesData (line 127) | private static ProfilesData waitAndGetProfilesData(TestProcess p) thro...
method profilesDataFromJfr (line 134) | private static ProfilesData profilesDataFromJfr(String jfrPath, Argume...
method toCollapsed (line 145) | private static Output toCollapsed(Profile profile, ProfilesDictionary ...
method toCollapsed (line 149) | private static Output toCollapsed(Profile profile, ProfilesDictionary ...
method getFrameName (line 165) | private static String getFrameName(int locationIndex, ProfilesDictiona...
method getProfile (line 172) | private static Profile getProfile(ProfilesData profilesData, int index) {
method getAttribute (line 182) | private static Optional<AnyValue> getAttribute(Sample sample, Profiles...
method classpathCheck (line 205) | private static void classpathCheck() {
FILE: test/test/pmu/Dictionary.java
class Dictionary (line 19) | public class Dictionary {
method testRandomRead (line 21) | private static void testRandomRead(long[] array, int bound) {
method test16K (line 33) | public static void test16K() {
method test8M (line 38) | public static void test8M() {
method main (line 43) | public static void main(String[] args) {
FILE: test/test/pmu/PmuTests.java
class PmuTests (line 18) | public class PmuTests {
method cycles (line 20) | @Test(mainClass = Dictionary.class, os = Os.LINUX)
method cacheMisses (line 42) | @Test(mainClass = Dictionary.class, os = Os.LINUX, arch = {Arch.X64, A...
method pmuIncompatible (line 63) | @Test(mainClass = Dictionary.class, os = Os.MACOS)
FILE: test/test/proc/BasicApp.java
class BasicApp (line 13) | public class BasicApp {
method fibUpToLongMax (line 16) | public static long[] fibUpToLongMax() {
method main (line 42) | public static void main(String[] args) throws Exception {
FILE: test/test/proc/CpuIntensiveApp.java
class CpuIntensiveApp (line 8) | public class CpuIntensiveApp {
method main (line 10) | public static void main(String[] args) throws Exception {
FILE: test/test/proc/IoIntensiveApp.java
class IoIntensiveApp (line 18) | public class IoIntensiveApp {
method main (line 22) | public static void main(String[] args) throws Exception {
FILE: test/test/proc/ManyProcessApp.java
class ManyProcessApp (line 11) | public class ManyProcessApp {
method main (line 13) | public static void main(String[] args) throws Exception {
FILE: test/test/proc/MemoryIntensiveApp.java
class MemoryIntensiveApp (line 11) | public class MemoryIntensiveApp {
method main (line 13) | public static void main(String[] args) throws Exception {
FILE: test/test/proc/MultiThreadApp.java
class MultiThreadApp (line 10) | public class MultiThreadApp {
method main (line 11) | public static void main(String[] args) throws Exception {
FILE: test/test/proc/ProcTests.java
class ProcTests (line 17) | public class ProcTests {
method basicProcessSampling (line 19) | @Test(mainClass = BasicApp.class, os = Os.LINUX)
method processSamplingWithZeroSamplingPeriod (line 36) | public void processSamplingWithZeroSamplingPeriod(TestProcess p) throw...
method processEvenSamplingInterval (line 46) | public void processEvenSamplingInterval(TestProcess p) throws Exception {
method processSamplingWithAllMode (line 62) | public void processSamplingWithAllMode(TestProcess p) throws Exception {
method validateProcessFields (line 71) | public void validateProcessFields(TestProcess p) throws Exception {
method validateIoStats (line 108) | public void validateIoStats(TestProcess p) throws Exception {
method validateThreadCounts (line 127) | public void validateThreadCounts(TestProcess p) throws Exception {
method processSamplingWithHigherSampling (line 143) | public void processSamplingWithHigherSampling(TestProcess p) throws Ex...
method shortLivedProcesses (line 153) | public void shortLivedProcesses(TestProcess p) throws Exception {
method highProcessCount (line 169) | public void highProcessCount(TestProcess p) throws Exception {
method processSamplingNotSupportedOnMacOS (line 178) | @Test(mainClass = BasicApp.class, os = Os.MACOS)
method processSamplingRequiresJfr (line 190) | @Test(mainClass = BasicApp.class, os = Os.LINUX)
method processSamplingWithCpuThreshold (line 200) | @Test(mainClass = CpuIntensiveApp.class, os = Os.LINUX)
method processSamplingWithMemoryThreshold (line 219) | @Test(mainClass = MemoryIntensiveApp.class, jvmVer = {11, Integer.MAX_...
method customSamplingInterval (line 240) | public void customSamplingInterval(TestProcess p) throws Exception {
method validateMemoryBreakdown (line 250) | public void validateMemoryBreakdown(TestProcess p) throws Exception {
FILE: test/test/proc/ShortLivedApp.java
class ShortLivedApp (line 11) | public class ShortLivedApp {
method main (line 15) | public static void main(String[] args) throws Exception {
FILE: test/test/recovery/CodingIntrinsics.java
class CodingIntrinsics (line 23) | public class CodingIntrinsics {
method main (line 26) | public static void main(String[] args) {
method runTest (line 40) | static void runTest(byte[] input) {
method runTestWithCodec (line 46) | static long runTestWithCodec(Codec codec, byte[] input, int count) {
type Codec (line 58) | interface Codec {
method encode (line 59) | byte[] encode(byte[] input);
method isArm64 (line 73) | static boolean isArm64() {
method checksum (line 78) | static byte[] checksum(byte[] input, Checksum checksum) {
method digest (line 89) | static byte[] digest(byte[] input, String algorithm) {
FILE: test/test/recovery/Numbers.java
class Numbers (line 16) | public class Numbers {
method main (line 19) | public static void main(String[] args) {
method loop (line 23) | private static void loop(Number... numbers) {
method avg (line 29) | private static double avg(Number... numbers) {
FILE: test/test/recovery/RecoveryTests.java
class RecoveryTests (line 15) | public class RecoveryTests {
method stringBuilder (line 17) | @Test(mainClass = StringBuilderTest.class, jvmArgs = "-XX:UseAVX=2", a...
method stringBuilderArm (line 25) | @Test(
method numbers (line 41) | @Test(mainClass = Numbers.class, jvm = Jvm.HOTSPOT, debugNonSafepoints...
method suppliers (line 50) | @Test(mainClass = Suppliers.class, jvm = Jvm.HOTSPOT, debugNonSafepoin...
method intrinsics (line 58) | @Test(mainClass = CodingIntrinsics.class, debugNonSafepoints = true, a...
method currentTimeMillis (line 67) | @Test(mainClass = TimeLoop.class, jvm = Jvm.HOTSPOT, jvmVer = {17, Int...
FILE: test/test/recovery/StringBuilderTest.java
class StringBuilderTest (line 19) | public class StringBuilderTest {
method main (line 21) | public static void main(String[] args) {
FILE: test/test/recovery/Suppliers.java
class Suppliers (line 17) | public class Suppliers {
method main (line 19) | public static void main(String[] args) {
method loop (line 32) | private static void loop(Supplier[] suppliers) {
FILE: test/test/recovery/TimeLoop.java
class TimeLoop (line 8) | public class TimeLoop {
method main (line 10) | public static void main(String[] args) throws InterruptedException {
FILE: test/test/smoke/Alloc.java
class Alloc (line 11) | public class Alloc implements Runnable {
method main (line 14) | public static void main(String[] args) {
method run (line 19) | @Override
method allocate (line 27) | private static void allocate(Random random) {
FILE: test/test/smoke/Cpu.java
class Cpu (line 10) | public class Cpu {
method method1 (line 13) | private static void method1() {
method method2 (line 19) | private static void method2() {
method method3 (line 25) | private static void method3() throws Exception {
method main (line 34) | public static void main(String[] args) throws Exception {
FILE: test/test/smoke/LoadLibrary.java
class LoadLibrary (line 11) | public class LoadLibrary {
method main (line 13) | public static void main(String[] args) throws Exception {
FILE: test/test/smoke/SmokeTests.java
class SmokeTests (line 12) | public class SmokeTests {
method cpu (line 14) | @Test(mainClass = Cpu.class)
method alloc (line 22) | @Test(mainClass = Alloc.class)
method threads (line 29) | @Test(mainClass = Threads.class, agentArgs = "start,event=cpu,collapse...
method loadLibrary (line 36) | @Test(mainClass = LoadLibrary.class)
FILE: test/test/smoke/Threads.java
class Threads (line 10) | public class Threads {
method main (line 12) | public static void main(String[] args) {
method methodForThreadEarlyEnd (line 29) | static void methodForThreadEarlyEnd() {
method methodForRenamedThread (line 37) | static void methodForRenamedThread() {
FILE: test/test/stackwalker/StackGenerator.java
class StackGenerator (line 8) | public class StackGenerator {
method largeFrame (line 10) | public static native double largeFrame();
method deepFrame (line 12) | public static native double deepFrame();
method leafFrame (line 14) | public static native double leafFrame();
method largeInnerFrame (line 16) | public static native double largeInnerFrame();
method main (line 22) | public static void main(String[] args) {
FILE: test/test/stackwalker/StackwalkerTests.java
class StackwalkerTests (line 12) | public class StackwalkerTests {
method largeFrame (line 17) | @Test(mainClass = StackGenerator.class, jvmArgs = "-Xss5m", args = "la...
method deepStack (line 31) | @Test(mainClass = StackGenerator.class, jvmArgs = "-Xss5m", args = "de...
method normalStackVMX (line 52) | @Test(mainClass = StackGenerator.class, jvmArgs = "-Xss5m", args = "le...
method normalStackVM (line 74) | @Test(mainClass = StackGenerator.class, jvmArgs = "-Xss5m", args = "le...
method largeInnerFrameVM (line 86) | @Test(mainClass = StackGenerator.class, jvmArgs = "-Xss5m", args = "la...
FILE: test/test/vmstructs/VmstructsTests.java
class VmstructsTests (line 13) | public class VmstructsTests {
method jnienv (line 15) | @Test(mainClass = Alloc.class, jvmArgs = "-XX:StartFlightRecording=fil...
method jnienvAgent (line 21) | @Test(mainClass = Alloc.class, jvmArgs = "-XX:StartFlightRecording=fil...
FILE: test/test/vtable/VtableTests.java
class VtableTests (line 12) | public class VtableTests {
method vtableStubs (line 14) | @Test(mainClass = Numbers.class, jvm = Jvm.HOTSPOT_C2)
method itableStubs (line 21) | @Test(mainClass = Suppliers.class, jvm = Jvm.HOTSPOT_C2)
FILE: test/test/wall/BusyClient.java
class BusyClient (line 11) | class BusyClient extends Thread {
method run (line 13) | @Override
FILE: test/test/wall/IdleClient.java
class IdleClient (line 11) | class IdleClient extends Thread {
method run (line 13) | @Override
FILE: test/test/wall/SocketTest.java
class SocketTest (line 21) | public class SocketTest {
method main (line 25) | public static void main(String[] args) throws Exception {
FILE: test/test/wall/WallTests.java
class WallTests (line 13) | public class WallTests {
method cpuWall (line 15) | @Test(mainClass = SocketTest.class)
Condensed preview — 365 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,808K chars).
[
{
"path": ".assets/html/flamegraph.html",
"chars": 20547,
"preview": "<!DOCTYPE html>\n<html lang='en'>\n<head>\n<meta charset='utf-8'>\n<style>\n\tbody {margin: 0; padding: 10px 10px 22px 10px; b"
},
{
"path": ".clang-tidy",
"chars": 4725,
"preview": "Checks: >\n -*,\n bugprone-assert-side-effect,\n bugprone-bool-pointer-implicit-conversion,\n bugprone-chained-compariso"
},
{
"path": ".gitattributes",
"chars": 12,
"preview": "*.sh eol=lf\n"
},
{
"path": ".github/ISSUE_TEMPLATE/bug-report.yml",
"chars": 1404,
"preview": "---\nname: \"🐛 Bug Report\"\ndescription: Report a bug\ntitle: \"(short issue description)\"\nassignees: []\nbody:\n - type: text"
},
{
"path": ".github/ISSUE_TEMPLATE/config.yml",
"chars": 212,
"preview": "---\nblank_issues_enabled: false\ncontact_links:\n - name: 💬 General Question\n url: https://github.com/async-profiler/a"
},
{
"path": ".github/ISSUE_TEMPLATE/documentation.yml",
"chars": 362,
"preview": "---\nname: \"📕 Documentation Issue\"\ndescription: Report an issue in the profiler documentation\ntitle: \"(short issue descri"
},
{
"path": ".github/ISSUE_TEMPLATE/feature-request.yml",
"chars": 1105,
"preview": "---\nname: 🚀 Feature Request\ndescription: Suggest an idea for this project\ntitle: \"(short issue description)\"\nlabels: [en"
},
{
"path": ".github/PULL_REQUEST_TEMPLATE.md",
"chars": 289,
"preview": "### Description\n\n\n### Related issues\n\n\n### Motivation and context\n\n\n### How has this been tested?\n\n\n---\n\nBy submitting t"
},
{
"path": ".github/workflows/build.yml",
"chars": 2744,
"preview": "name: build-template\n\non:\n workflow_call:\n inputs:\n platform:\n type: string\n required: true\n "
},
{
"path": ".github/workflows/clang-tidy-review.yml",
"chars": 1621,
"preview": "name: clang-tidy-review\n\non:\n workflow_run:\n workflows:\n - code-check\n types:\n - completed\n\njobs:\n clang-t"
},
{
"path": ".github/workflows/code-check.yml",
"chars": 1795,
"preview": "name: code-check\n\non:\n - pull_request\n\nconcurrency:\n group: ${{ github.workflow }}-${{ github.ref }}\n cancel-in-progr"
},
{
"path": ".github/workflows/integ.yml",
"chars": 4165,
"preview": "name: integration-test-template\n\non:\n workflow_call:\n inputs:\n test-platform:\n type: string\n requ"
},
{
"path": ".github/workflows/linters.yml",
"chars": 1612,
"preview": "name: lint\n\non:\n - push\n - pull_request\n\nconcurrency:\n group: ${{ github.workflow }}-${{ github.ref }}\n cancel-in-pr"
},
{
"path": ".github/workflows/test-and-publish-nightly.yml",
"chars": 7006,
"preview": "name: CI\n\non: # We are very liberal in terms of triggering builds. This should be revisited if we start seeing a lot of"
},
{
"path": ".gitignore",
"chars": 104,
"preview": "/build/\n/nbproject/\n/out/\n/target/\n/.idea/\n/test/*.class\n.vscode\n*.iml\n/src/api/**/*.class\n.gdb_history\n"
},
{
"path": ".licenserc.yaml",
"chars": 476,
"preview": "header:\n - paths:\n - 'src/jattach'\n license:\n content: |\n Copyright The jattach authors\n SPD"
},
{
"path": "CHANGELOG.md",
"chars": 22351,
"preview": "# Changelog\n\n## [4.3]\n\n### Features\n\n - #1547: Native lock profiling\n - #1566: Filter cpu/wall profiles by latency\n - #1"
},
{
"path": "CODE_OF_CONDUCT.md",
"chars": 309,
"preview": "## Code of Conduct\nThis project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-condu"
},
{
"path": "CONTRIBUTING.md",
"chars": 3378,
"preview": "# Contributing Guidelines\n\nThank you for your interest in contributing to our project. Whether it's a bug report, new fe"
},
{
"path": "LICENSE",
"chars": 11357,
"preview": " Apache License\n Version 2.0, January 2004\n "
},
{
"path": "Makefile",
"chars": 12460,
"preview": "PROFILER_VERSION ?= 4.3\n\nifeq ($(COMMIT_TAG),true)\n PROFILER_VERSION := $(PROFILER_VERSION)-$(shell git rev-parse --sho"
},
{
"path": "README.md",
"chars": 4911,
"preview": "# Async-profiler\n\nThis project is a low overhead sampling profiler for Java\nthat does not suffer from the [Safepoint bia"
},
{
"path": "SECURITY.md",
"chars": 452,
"preview": "## Reporting Security Issues\n\nWe take all security reports seriously.\nWhen we receive such reports,\nwe will investigate "
},
{
"path": "docker/alpaquita.Dockerfile",
"chars": 119,
"preview": "FROM public.ecr.aws/bellsoft/alpaquita-linux-gcc:15.2-musl\n\nRUN apk add --no-cache liberica21-jdk util-linux-misc curl\n"
},
{
"path": "docker/alpine.Dockerfile",
"chars": 164,
"preview": "FROM public.ecr.aws/docker/library/amazoncorretto:11-alpine-jdk\n\nRUN apk add --no-cache make gcc g++ linux-headers musl-"
},
{
"path": "docker/amazonlinux2.Dockerfile",
"chars": 1178,
"preview": "FROM public.ecr.aws/amazonlinux/amazonlinux:2\n\nRUN amazon-linux-extras enable python3.8\n\nRUN yum update -y && yum instal"
},
{
"path": "docker/amazonlinux2023.Dockerfile",
"chars": 261,
"preview": "FROM public.ecr.aws/amazonlinux/amazonlinux:2023\n\nRUN yum update -y && \\\n yum install -y binutils findutils make tar "
},
{
"path": "docker/code-check.Dockerfile",
"chars": 820,
"preview": "# Image for all tasks related to static code analysis in async-profiler\nFROM public.ecr.aws/docker/library/amazoncorrett"
},
{
"path": "docker/debian.Dockerfile",
"chars": 1358,
"preview": "# Image for building async-profiler release packages\n\n# Stage 0: download and build musl\nFROM public.ecr.aws/debian/debi"
},
{
"path": "docs/AdvancedStacktraceFeatures.md",
"chars": 1767,
"preview": "# Advanced Stacktrace Features\n\n## Display JIT compilation task\n\nAsync-profiler samples JIT compiler threads just the sa"
},
{
"path": "docs/ConverterUsage.md",
"chars": 7957,
"preview": "# Converter Usage\n\nasync-profiler provides `jfrconv` utility to convert between different profile output formats.\n`jfrco"
},
{
"path": "docs/CpuSamplingEngines.md",
"chars": 4491,
"preview": "# CPU Sampling Engines\n\nAsync-profiler has three options for CPU profiling: `-e cpu`, `-e itimer` and `-e ctimer`.\n\n## c"
},
{
"path": "docs/FlamegraphInterpretation.md",
"chars": 2523,
"preview": "# FlameGraph interpretation\n\nTo interpret a flame graph, the best way forward is to understand how it is created.\n\n## Ex"
},
{
"path": "docs/GettingStarted.md",
"chars": 3635,
"preview": "# Getting started guide\n\n## Before profiling\n\nAs of Linux 4.6, capturing kernel call stacks using `perf_events` from a n"
},
{
"path": "docs/Heatmap.md",
"chars": 3755,
"preview": "# Heatmap\n\nProblems to be solved with a profiler can be divided into two large categories:\n\n1. Optimization of overall r"
},
{
"path": "docs/IntegratingAsyncProfiler.md",
"chars": 2254,
"preview": "# Integrating async-profiler\n\n## Launching as an agent\n\nIf you need to profile some code as soon as the JVM starts up, i"
},
{
"path": "docs/JfrVisualization.md",
"chars": 1747,
"preview": "# JFR Visualization\n\nJFR recordings produced by async-profiler can be viewed using multiple options explained below.\n\n##"
},
{
"path": "docs/OutputFormats.md",
"chars": 4480,
"preview": "# Output Formats\n\nasync-profiler currently supports the following output formats:\n\n- `collapsed` - This is a collection "
},
{
"path": "docs/ProfilerOptions.md",
"chars": 37656,
"preview": "# Profiler options\n\nThe below tables list the profiler options available with `asprof` and also when\n[launching as an ag"
},
{
"path": "docs/ProfilingInContainer.md",
"chars": 1284,
"preview": "# Profiling Java in a container\n\nasync-profiler provides the ability to profile Java processes running in a Docker or LX"
},
{
"path": "docs/ProfilingModes.md",
"chars": 22152,
"preview": "# Profiling modes\n\nBesides CPU time, async-profiler provides various other profiling modes such as `Allocation`, `Wall C"
},
{
"path": "docs/ProfilingNonJavaApplications.md",
"chars": 3196,
"preview": "# Profiling Non-Java applications\n\nThe scope of profiling non-Java applications is limited to the case when profiler is "
},
{
"path": "docs/StackWalkingModes.md",
"chars": 3299,
"preview": "# Stack Walking Modes\n\n## Frame Pointer\n\n`Frame Pointer (FP)` stack walking is a technique for collecting call stacks by"
},
{
"path": "docs/Troubleshooting.md",
"chars": 6830,
"preview": "# Troubleshooting\n\n## Error Messages\n\n### perf_event mmap failed: Operation not permitted\n\nProfiler allocates 8 kB perf_"
},
{
"path": "pom-converter.xml",
"chars": 4304,
"preview": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n xsi:sc"
},
{
"path": "pom.xml",
"chars": 6371,
"preview": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n xsi:sc"
},
{
"path": "src/allocTracer.cpp",
"chars": 4586,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#include \"allocTracer.h\"\n#include"
},
{
"path": "src/allocTracer.h",
"chars": 997,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#ifndef _ALLOCTRACER_H\n#define _A"
},
{
"path": "src/api/one/profiler/Agent.java",
"chars": 697,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\npackage one.profiler;\n\nimport jav"
},
{
"path": "src/api/one/profiler/AsyncProfiler.java",
"chars": 9681,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\npackage one.profiler;\n\nimport jav"
},
{
"path": "src/api/one/profiler/AsyncProfilerMXBean.java",
"chars": 1015,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\npackage one.profiler;\n\n/**\n * Asy"
},
{
"path": "src/api/one/profiler/Counter.java",
"chars": 247,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\npackage one.profiler;\n\n/**\n * Whi"
},
{
"path": "src/api/one/profiler/Events.java",
"chars": 512,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\npackage one.profiler;\n\n/**\n * Pre"
},
{
"path": "src/api/one/profiler/MANIFEST.MF",
"chars": 66,
"preview": "Agent-Class: one.profiler.Agent\nPremain-Class: one.profiler.Agent\n"
},
{
"path": "src/arch.h",
"chars": 6714,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#ifndef _ARCH_H\n#define _ARCH_H\n\n"
},
{
"path": "src/arguments.cpp",
"chars": 17635,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#include <limits.h>\n#include <std"
},
{
"path": "src/arguments.h",
"chars": 8050,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#ifndef _ARGUMENTS_H\n#define _ARG"
},
{
"path": "src/asprof.cpp",
"chars": 1981,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#include \"asprof.h\"\n#include \"hoo"
},
{
"path": "src/asprof.h",
"chars": 4409,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#ifndef _ASPROF_H\n#define _ASPROF"
},
{
"path": "src/callTraceStorage.cpp",
"chars": 9132,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#include <string.h>\n#include \"cal"
},
{
"path": "src/callTraceStorage.h",
"chars": 1646,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#ifndef _CALLTRACESTORAGE_H\n#defi"
},
{
"path": "src/chk.cpp",
"chars": 707,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#ifndef __clang__\n\n#include <stda"
},
{
"path": "src/codeCache.cpp",
"chars": 9541,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#include <stdint.h>\n#include <std"
},
{
"path": "src/codeCache.h",
"chars": 5592,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#ifndef _CODECACHE_H\n#define _COD"
},
{
"path": "src/converter/one/convert/Arguments.java",
"chars": 5009,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\npackage one.convert;\n\nimport java"
},
{
"path": "src/converter/one/convert/BidirectionalIndex.java",
"chars": 977,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\npackage one.convert;\n\nimport java"
},
{
"path": "src/converter/one/convert/CallStack.java",
"chars": 620,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\npackage one.convert;\n\nimport java"
},
{
"path": "src/converter/one/convert/Classifier.java",
"chars": 5668,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\npackage one.convert;\n\nimport one."
},
{
"path": "src/converter/one/convert/FlameGraph.java",
"chars": 16874,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\npackage one.convert;\n\nimport java"
},
{
"path": "src/converter/one/convert/Frame.java",
"chars": 1719,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\npackage one.convert;\n\nimport java"
},
{
"path": "src/converter/one/convert/Index.java",
"chars": 1348,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\npackage one.convert;\n\nimport java"
},
{
"path": "src/converter/one/convert/JfrConverter.java",
"chars": 13384,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\npackage one.convert;\n\nimport one."
},
{
"path": "src/converter/one/convert/JfrToFlame.java",
"chars": 3206,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\npackage one.convert;\n\nimport one."
},
{
"path": "src/converter/one/convert/JfrToHeatmap.java",
"chars": 3120,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\npackage one.convert;\n\nimport one."
},
{
"path": "src/converter/one/convert/JfrToOtlp.java",
"chars": 11740,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\npackage one.convert;\n\nimport stat"
},
{
"path": "src/converter/one/convert/JfrToPprof.java",
"chars": 5133,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\npackage one.convert;\n\nimport one."
},
{
"path": "src/converter/one/convert/Main.java",
"chars": 8235,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\npackage one.convert;\n\nimport java"
},
{
"path": "src/converter/one/convert/OtlpConstants.java",
"chars": 1712,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\npackage one.convert;\n\nfinal class"
},
{
"path": "src/converter/one/convert/ResourceProcessor.java",
"chars": 1175,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\npackage one.convert;\n\nimport java"
},
{
"path": "src/converter/one/convert/TimeIntervals.java",
"chars": 2868,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\npackage one.convert;\n\nimport java"
},
{
"path": "src/converter/one/heatmap/Heatmap.java",
"chars": 23013,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\npackage one.heatmap;\n\nimport java"
},
{
"path": "src/converter/one/heatmap/HtmlOut.java",
"chars": 1771,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\npackage one.heatmap;\n\nimport java"
},
{
"path": "src/converter/one/heatmap/HuffmanEncoder.java",
"chars": 4463,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\npackage one.heatmap;\n\nimport java"
},
{
"path": "src/converter/one/heatmap/LzNodeTree.java",
"chars": 5238,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\npackage one.heatmap;\n\nimport java"
},
{
"path": "src/converter/one/heatmap/Method.java",
"chars": 1558,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\npackage one.heatmap;\n\nimport one."
},
{
"path": "src/converter/one/heatmap/SampleList.java",
"chars": 2612,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\npackage one.heatmap;\n\nimport java"
},
{
"path": "src/converter/one/heatmap/StackStorage.java",
"chars": 2744,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\npackage one.heatmap;\n\nimport java"
},
{
"path": "src/converter/one/heatmap/SynonymTable.java",
"chars": 1590,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\npackage one.heatmap;\n\nimport java"
},
{
"path": "src/converter/one/jfr/ClassRef.java",
"chars": 225,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\npackage one.jfr;\n\npublic class Cl"
},
{
"path": "src/converter/one/jfr/Dictionary.java",
"chars": 3187,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\npackage one.jfr;\n\nimport java.uti"
},
{
"path": "src/converter/one/jfr/DictionaryInt.java",
"chars": 3073,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\npackage one.jfr;\n\nimport java.uti"
},
{
"path": "src/converter/one/jfr/Element.java",
"chars": 161,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\npackage one.jfr;\n\nclass Element {"
},
{
"path": "src/converter/one/jfr/JfrClass.java",
"chars": 937,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\npackage one.jfr;\n\nimport java.uti"
},
{
"path": "src/converter/one/jfr/JfrField.java",
"chars": 481,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\npackage one.jfr;\n\nimport java.uti"
},
{
"path": "src/converter/one/jfr/JfrReader.java",
"chars": 25738,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\npackage one.jfr;\n\nimport one.jfr."
},
{
"path": "src/converter/one/jfr/MethodRef.java",
"chars": 349,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\npackage one.jfr;\n\npublic class Me"
},
{
"path": "src/converter/one/jfr/StackTrace.java",
"chars": 405,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\npackage one.jfr;\n\npublic class St"
},
{
"path": "src/converter/one/jfr/event/AllocationSample.java",
"chars": 1108,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\npackage one.jfr.event;\n\npublic cl"
},
{
"path": "src/converter/one/jfr/event/CPULoad.java",
"chars": 486,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\npackage one.jfr.event;\n\nimport on"
},
{
"path": "src/converter/one/jfr/event/ContendedLock.java",
"chars": 888,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\npackage one.jfr.event;\n\npublic cl"
},
{
"path": "src/converter/one/jfr/event/Event.java",
"chars": 1462,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\npackage one.jfr.event;\n\nimport ja"
},
{
"path": "src/converter/one/jfr/event/EventAggregator.java",
"chars": 3805,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\npackage one.jfr.event;\n\npublic cl"
},
{
"path": "src/converter/one/jfr/event/EventCollector.java",
"chars": 441,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\npackage one.jfr.event;\n\npublic in"
},
{
"path": "src/converter/one/jfr/event/ExecutionSample.java",
"chars": 819,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\npackage one.jfr.event;\n\npublic cl"
},
{
"path": "src/converter/one/jfr/event/GCHeapSummary.java",
"chars": 759,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\npackage one.jfr.event;\n\nimport on"
},
{
"path": "src/converter/one/jfr/event/LiveObject.java",
"chars": 1008,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\npackage one.jfr.event;\n\npublic cl"
},
{
"path": "src/converter/one/jfr/event/MallocEvent.java",
"chars": 474,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\npackage one.jfr.event;\n\npublic cl"
},
{
"path": "src/converter/one/jfr/event/MallocLeakAggregator.java",
"chars": 2075,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\npackage one.jfr.event;\n\nimport ja"
},
{
"path": "src/converter/one/jfr/event/MethodTrace.java",
"chars": 798,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\npackage one.jfr.event;\n\npublic cl"
},
{
"path": "src/converter/one/jfr/event/NativeLockEvent.java",
"chars": 502,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\npackage one.jfr.event;\n\npublic cl"
},
{
"path": "src/converter/one/jfr/event/ObjectCount.java",
"chars": 545,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\npackage one.jfr.event;\n\nimport on"
},
{
"path": "src/converter/one/jfr/event/ProcessSample.java",
"chars": 1707,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\npackage one.jfr.event;\n\nimport on"
},
{
"path": "src/converter/one/proto/Proto.java",
"chars": 4208,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\npackage one.proto;\n\nimport java.n"
},
{
"path": "src/cpuEngine.cpp",
"chars": 3822,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#include <errno.h>\n#include <pthr"
},
{
"path": "src/cpuEngine.h",
"chars": 1108,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#ifndef _CPUENGINE_H\n#define _CPU"
},
{
"path": "src/ctimer.h",
"chars": 778,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#ifndef _CTIMER_H\n#define _CTIMER"
},
{
"path": "src/ctimer_linux.cpp",
"chars": 3280,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#ifdef __linux__\n\n#include <stdli"
},
{
"path": "src/demangle.cpp",
"chars": 3356,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#include <cxxabi.h>\n#include <std"
},
{
"path": "src/demangle.h",
"chars": 604,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#ifndef _DEMANGLE_H\n#define _DEMA"
},
{
"path": "src/dictionary.cpp",
"chars": 3556,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#include <stdlib.h>\n#include <str"
},
{
"path": "src/dictionary.h",
"chars": 1242,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#ifndef _DICTIONARY_H\n#define _DI"
},
{
"path": "src/dwarf.cpp",
"chars": 12136,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#include <stdlib.h>\n#include \"dwa"
},
{
"path": "src/dwarf.h",
"chars": 3685,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#ifndef _DWARF_H\n#define _DWARF_H"
},
{
"path": "src/engine.cpp",
"chars": 238,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#include \"engine.h\"\n\n\nvolatile bo"
},
{
"path": "src/engine.h",
"chars": 1247,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#ifndef _ENGINE_H\n#define _ENGINE"
},
{
"path": "src/event.h",
"chars": 2041,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#ifndef _EVENT_H\n#define _EVENT_H"
},
{
"path": "src/fdtransfer.h",
"chars": 1451,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#ifndef _FDTRANSFER_H\n#define _FD"
},
{
"path": "src/fdtransferClient.h",
"chars": 968,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#ifndef _FDTRANSFER_CLIENT_H\n#def"
},
{
"path": "src/fdtransferClient_linux.cpp",
"chars": 3991,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#ifdef __linux__\n\n#include <stdio"
},
{
"path": "src/flameGraph.cpp",
"chars": 9410,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#include <algorithm>\n#include <ve"
},
{
"path": "src/flameGraph.h",
"chars": 2853,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#ifndef _FLAMEGRAPH_H\n#define _FL"
},
{
"path": "src/flightRecorder.cpp",
"chars": 51028,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#include <assert.h>\n#include <map"
},
{
"path": "src/flightRecorder.h",
"chars": 987,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#ifndef _FLIGHTRECORDER_H\n#define"
},
{
"path": "src/frameName.cpp",
"chars": 11936,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#include <stdint.h>\n#include <std"
},
{
"path": "src/frameName.h",
"chars": 1849,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#ifndef _FRAMENAME_H\n#define _FRA"
},
{
"path": "src/helper/one/profiler/Instrument.java",
"chars": 776,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\npackage one.profiler;\n\n/**\n * Ins"
},
{
"path": "src/helper/one/profiler/JfrSync.java",
"chars": 4527,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\npackage one.profiler;\n\nimport jdk"
},
{
"path": "src/helper/one/profiler/LockTracer.java",
"chars": 532,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\npackage one.profiler;\n\n/**\n * Hel"
},
{
"path": "src/helper/one/profiler/Server.java",
"chars": 3529,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\npackage one.profiler;\n\nimport com"
},
{
"path": "src/hooks.cpp",
"chars": 5346,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#include <dlfcn.h>\n#include <pthr"
},
{
"path": "src/hooks.h",
"chars": 457,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#ifndef _HOOKS_H\n#define _HOOKS_H"
},
{
"path": "src/incbin.h",
"chars": 915,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#ifndef _INCBIN_H\n#define _INCBIN"
},
{
"path": "src/index.h",
"chars": 1730,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#ifndef _INDEX_H\n#define _INDEX_H"
},
{
"path": "src/instrument.cpp",
"chars": 42588,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#include <arpa/inet.h>\n#include <"
},
{
"path": "src/instrument.h",
"chars": 1766,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#ifndef _INSTRUMENT_H\n#define _IN"
},
{
"path": "src/itimer.cpp",
"chars": 1178,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#include <sys/time.h>\n#include \"i"
},
{
"path": "src/itimer.h",
"chars": 325,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#ifndef _ITIMER_H\n#define _ITIMER"
},
{
"path": "src/j9Ext.cpp",
"chars": 2417,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#include \"j9Ext.h\"\n#include \"j9Ob"
},
{
"path": "src/j9Ext.h",
"chars": 2287,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#ifndef _J9EXT_H\n#define _J9EXT_H"
},
{
"path": "src/j9ObjectSampler.cpp",
"chars": 1946,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#include \"j9ObjectSampler.h\"\n#inc"
},
{
"path": "src/j9ObjectSampler.h",
"chars": 730,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#ifndef _J9OBJECTSAMPLER_H\n#defin"
},
{
"path": "src/j9StackTraces.cpp",
"chars": 5299,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#include <stdlib.h>\n#include <sys"
},
{
"path": "src/j9StackTraces.h",
"chars": 934,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#ifndef _J9STACKTRACES_H\n#define "
},
{
"path": "src/j9WallClock.cpp",
"chars": 2362,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#include <stdlib.h>\n#include \"j9W"
},
{
"path": "src/j9WallClock.h",
"chars": 751,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#ifndef _J9WALLCLOCK_H\n#define _J"
},
{
"path": "src/jattach/jattach.c",
"chars": 2476,
"preview": "/*\n * Copyright The jattach authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#include <stdio.h>\n#include <stdlib.h>\n#"
},
{
"path": "src/jattach/jattach_hotspot.c",
"chars": 6476,
"preview": "/*\n * Copyright The jattach authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#include <stdio.h>\n#include <stdlib.h>\n#"
},
{
"path": "src/jattach/jattach_openj9.c",
"chars": 11887,
"preview": "/*\n * Copyright The jattach authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#include <stdio.h>\n#include <stdlib.h>\n#"
},
{
"path": "src/jattach/psutil.c",
"chars": 6743,
"preview": "/*\n * Copyright The jattach authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#include <stdio.h>\n#include <stdlib.h>\n#"
},
{
"path": "src/jattach/psutil.h",
"chars": 1185,
"preview": "/*\n * Copyright The jattach authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#ifndef _PSUTIL_H\n#define _PSUTIL_H\n\n#in"
},
{
"path": "src/javaApi.cpp",
"chars": 7212,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#include <errno.h>\n#include <stri"
},
{
"path": "src/javaApi.h",
"chars": 345,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#ifndef _JAVAAPI_H\n#define _JAVAA"
},
{
"path": "src/jfrMetadata.cpp",
"chars": 18068,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#include \"jfrMetadata.h\"\n\n\nIndex "
},
{
"path": "src/jfrMetadata.h",
"chars": 6390,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#ifndef _JFRMETADATA_H\n#define _J"
},
{
"path": "src/launcher/launcher.sh",
"chars": 1646,
"preview": "#!/bin/sh\n\n# Copyright The async-profiler authors\n# SPDX-License-Identifier: Apache-2.0\n\nif [ \"$1\" = \"-v\" ] || [ \"$1\" = "
},
{
"path": "src/linearAllocator.cpp",
"chars": 2849,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#include \"linearAllocator.h\"\n#inc"
},
{
"path": "src/linearAllocator.h",
"chars": 719,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#ifndef _LINEARALLOCATOR_H\n#defin"
},
{
"path": "src/lockTracer.cpp",
"chars": 9586,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#include <pthread.h>\n#include <st"
},
{
"path": "src/lockTracer.h",
"chars": 2095,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#ifndef _LOCKTRACER_H\n#define _LO"
},
{
"path": "src/log.cpp",
"chars": 3317,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#include <fcntl.h>\n#include <stri"
},
{
"path": "src/log.h",
"chars": 1115,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#ifndef _LOG_H\n#define _LOG_H\n\n#i"
},
{
"path": "src/lookup.cpp",
"chars": 5832,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#include <string.h>\n#include \"dem"
},
{
"path": "src/lookup.h",
"chars": 1680,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#ifndef _LOOKUP_H\n#define _LOOKUP"
},
{
"path": "src/main/fdtransferServer.h",
"chars": 1044,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#ifndef _FDTRANSFER_SERVER_H\n#def"
},
{
"path": "src/main/fdtransferServer_linux.cpp",
"chars": 10719,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#ifdef __linux__\n\n#include <stdin"
},
{
"path": "src/main/main.cpp",
"chars": 20839,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#include <alloca.h>\n#include <err"
},
{
"path": "src/mallocTracer.cpp",
"chars": 7808,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#include <dlfcn.h>\n#include <pthr"
},
{
"path": "src/mallocTracer.h",
"chars": 1195,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#ifndef _MALLOCTRACER_H\n#define _"
},
{
"path": "src/mutex.cpp",
"chars": 844,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#include \"mutex.h\"\n\n\nMutex::Mutex"
},
{
"path": "src/mutex.h",
"chars": 687,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#ifndef _MUTEX_H\n#define _MUTEX_H"
},
{
"path": "src/nativeLockTracer.cpp",
"chars": 4109,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#include <assert.h>\n#include <str"
},
{
"path": "src/nativeLockTracer.h",
"chars": 1098,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#ifndef _NATIVELOCKTRACER_H\n#defi"
},
{
"path": "src/objectSampler.cpp",
"chars": 5522,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#include <string.h>\n#include \"obj"
},
{
"path": "src/objectSampler.h",
"chars": 1135,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#ifndef _OBJECTSAMPLER_H\n#define "
},
{
"path": "src/os.h",
"chars": 4201,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#ifndef _OS_H\n#define _OS_H\n\n#inc"
},
{
"path": "src/os_linux.cpp",
"chars": 18417,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#ifdef __linux__\n\n#include <arpa/"
},
{
"path": "src/os_macos.cpp",
"chars": 12716,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#ifdef __APPLE__\n\n#include <dlfcn"
},
{
"path": "src/otlp.cpp",
"chars": 5965,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#include \"callTraceStorage.h\"\n#in"
},
{
"path": "src/otlp.h",
"chars": 3704,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#ifndef _OTLP_H\n#define _OTLP_H\n\n"
},
{
"path": "src/perfEvents.h",
"chars": 1803,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#ifndef _PERFEVENTS_H\n#define _PE"
},
{
"path": "src/perfEvents_linux.cpp",
"chars": 31280,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#ifdef __linux__\n\n#include <jvmti"
},
{
"path": "src/processSampler.cpp",
"chars": 2856,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#include \"processSampler.h\"\n#incl"
},
{
"path": "src/processSampler.h",
"chars": 1200,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#ifndef _PROCESSSAMPLER_H\n#define"
},
{
"path": "src/profiler.cpp",
"chars": 55218,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#include <algorithm>\n#include <as"
},
{
"path": "src/profiler.h",
"chars": 7976,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#ifndef _PROFILER_H\n#define _PROF"
},
{
"path": "src/protobuf.cpp",
"chars": 2999,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#include <sys/param.h>\n#include <"
},
{
"path": "src/protobuf.h",
"chars": 1526,
"preview": "/*\n * Copyright The async-profiler authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#ifndef _PROTOBUF_H\n#define _PROT"
},
{
"path": "src/res/flame.html",
"chars": 13546,
"preview": "<!DOCTYPE html>\n<html lang='en'>\n<head>\n<meta charset='utf-8'>\n<style>\n\tbody {margin: 0; padding: 10px 10px 22px 10px; b"
},
{
"path": "src/res/heatmap.html",
"chars": 144210,
"preview": "<!DOCTYPE html>\n<html lang='en'>\n<head>\n<meta charset='utf-8'>\n<style>\n\tbody {\n\t\tmargin: 0;\n\t\tpadding: 4px 8px 24px;\n\t\tb"
},
{
"path": "src/res/tree.html",
"chars": 8593,
"preview": "<!DOCTYPE html>\n<html lang=\"en\">\n <head>\n <title>Tree view</title>\n <meta charset=\"utf-8\" />\n <style>\n ht"
}
]
// ... and 165 more files (download for full content)
About this extraction
This page contains the full source code of the async-profiler/async-profiler GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 365 files (1.6 MB), approximately 448.5k tokens, and a symbol index with 2018 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.