view src/main/java/org/openjdk/gcbench/wip/ReadWriteBarrierMerge.java @ 63:4016779f803c

A bit more WIP work.
author shade
date Thu, 05 Jan 2017 13:12:38 +0100
parents src/main/java/org/openjdk/gcbench/wip/WeakRefs.java@f8496889e1ac
children 583fef4276f5
line wrap: on
line source

package org.openjdk.gcbench.wip;

import org.openjdk.jmh.annotations.*;

import java.util.concurrent.TimeUnit;

@Warmup(iterations = 5, time = 1, timeUnit = TimeUnit.SECONDS)
@Measurement(iterations = 5, time = 1, timeUnit = TimeUnit.SECONDS)
@Fork(1)
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.NANOSECONDS)
@Threads(1)
@State(Scope.Benchmark)
public class ReadWriteBarrierMerge {

    double x;

    @Benchmark
    @CompilerControl(CompilerControl.Mode.DONT_INLINE)
    public void test() {
        x++;
    }

}