'no assembly is recorded'
Aleksey Shipilev
shade at redhat.com
Tue Jan 15 20:33:26 UTC 2019
On 1/15/19 9:19 PM, Сергей Цыпанов wrote:
> @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);
> }
> }
>
> This file contains output for C1: https://yadi.sk/i/DGQuTsvRqdiTkg
So there are entries for "c1, level 1" in there. What you are seeing is Array.newInstance calling
into VM right away, and the hot spot is there. C2 has the intrinsic for
java.lang.reflect.Array::newArray.
-Aleksey
More information about the jmh-dev
mailing list