'no assembly is recorded'
Сергей Цыпанов
sergei.tsypanov at yandex.ru
Tue Jan 15 20:19:16 UTC 2019
Hello Aleksey,
here's the benchmark as I run it
---------------------------------------------------------------------------------------------------
@State(Scope.Thread)
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.NANOSECONDS)
@Fork(jvmArgsAppend = {"-XX:+UseParallelGC", "-Xms2g", "-Xmx2g"})
public class ArrayInstantiationBenchmark {
@Param({"10"})
private int length;
@Benchmark
public Object newInstance() {
return Array.newInstance(Object.class, length);
}
}
---------------------------------------------------------------------------------------------------
and this is runner class
---------------------------------------------------------------------------------------------------
public class BenchmarkRunner {
public static void main(String[] args) throws Exception {
Options opt = new OptionsBuilder()
.include(ArrayInstantiationBenchmark.class.getSimpleName())
.warmupIterations(10)
.warmupTime(TimeValue.seconds(1))
.measurementIterations(5)
.measurementTime(TimeValue.seconds(1))
.forks(1) //0 makes debugging possible
.shouldFailOnError(true)
.jvmArgsAppend(
"-XX:TieredStopAtLevel=1"
)
.addProfiler(LinuxPerfAsmProfiler.class)
.build();
new Runner(opt).run();
}
}
---------------------------------------------------------------------------------------------------
This file contains output for C1: https://yadi.sk/i/DGQuTsvRqdiTkg
This file contains output for C2 (no jvmArgsAppend): https://yadi.sk/i/mT1f6CNuSUjhCw
As one can see C2 file contains assembly, while for C1 we have this:
Hottest code regions (>10,00% "cycles" events):
....[Hottest Region 1]..............................................................................
libjvm.so, InstanceKlass::allocate_objArray (221 bytes)
<no assembly is recorded, native region>
Both are executed on Linux home 4.10.0-38-generic #42~16.04.1-Ubuntu SMP Tue Oct 10 16:32:20 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
15.01.2019, 14:04, "Aleksey Shipilev" <shade at redhat.com>:
> On 1/2/19 8:58 PM, Сергей Цыпанов wrote:
>> Alas, performance degradation I'm investigating is manifested only on -XX:TieredStopAtLevel=1 and
>> for c1 there's no assembly captured.
>
> This is weird, C1 assembly should be printed in "perfasm", we do -XX:TieredStopAtLevel=1 all the
> time in JMH experiments. Please show the MCVE?
>
> Thanks,
> -Aleksey
More information about the jmh-dev
mailing list