MCPcopy Create free account
hub / github.com/async-profiler/async-profiler / allocTotal

Method allocTotal

test/test/alloc/AllocTests.java:35–44  ·  view source on GitHub ↗
(TestProcess p)

Source from the content-addressed store, hash-verified

33 }
34
35 @Test(mainClass = MapReaderOpt.class, jvmArgs = "-XX:+UseParallelGC -Xmx1g -Xms1g", jvm = {Jvm.HOTSPOT, Jvm.ZING}, runIsolated = true)
36 public void allocTotal(TestProcess p) throws Exception {
37 Output out = p.profile("-e alloc -d 3 -o collapsed --total");
38 assert out.samples("java.util.HashMap\\$Node\\[]") > 1_000_000;
39
40 out = p.profile("stop -o flamegraph --total");
41 out = out.convertFlameToCollapsed();
42 assert out.contains("java\\.lang\\.Long");
43 assert out.contains("java\\.util\\.HashMap\\$Node\\[]");
44 }
45
46 @Test(mainClass = Hello.class, agentArgs = "start,event=alloc,alloc=1,cstack=fp,flamegraph,file=%f", jvmArgs = "-XX:+UseG1GC -XX:-UseTLAB", runIsolated = true)
47 public void startup(TestProcess p) throws Exception {

Callers

nothing calls this directly

Calls 4

samplesMethod · 0.95
containsMethod · 0.95
profileMethod · 0.80

Tested by

no test coverage detected