changeset 1357:b35ea744ed81

7901811: Improve @AuxCounters: count events, extend to more types, do not require reset each iteration
author shade
date Thu, 29 Sep 2016 17:44:27 +0200
parents f066ab6230cf
children c9e016659bfe
files jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/AuxCountersTest.java jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/AuxCountersTest.java jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/privateFields/BooleanTest.java jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/privateFields/ByteTest.java jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/privateFields/CharTest.java jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/privateFields/DoubleTest.java jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/privateFields/FloatTest.java jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/privateFields/IntTest.java jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/privateFields/LongTest.java jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/privateFields/ShortTest.java jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/privateFields/StringTest.java jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/privateMethods/BooleanTest.java jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/privateMethods/ByteTest.java jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/privateMethods/CharTest.java jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/privateMethods/DoubleTest.java jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/privateMethods/FloatTest.java jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/privateMethods/IntTest.java jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/privateMethods/LongTest.java jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/privateMethods/ShortTest.java jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/privateMethods/StringTest.java jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/privateMethods/VoidTest.java jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/publicFields/BooleanTest.java jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/publicFields/ByteTest.java jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/publicFields/CharTest.java jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/publicFields/DoubleTest.java jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/publicFields/FloatTest.java jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/publicFields/IntTest.java jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/publicFields/LongTest.java jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/publicFields/ShortTest.java jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/publicFields/StringTest.java jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/publicMethods/BooleanTest.java jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/publicMethods/ByteTest.java jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/publicMethods/CharTest.java jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/publicMethods/DoubleTest.java jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/publicMethods/FloatTest.java jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/publicMethods/IntTest.java jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/publicMethods/LongTest.java jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/publicMethods/ShortTest.java jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/publicMethods/StringTest.java jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/publicMethods/VoidTest.java jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/scope/BenchmarkStateTest.java jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/scope/GroupStateTest.java jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/scope/ThreadStateTest.java jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/types/events/ByteTest.java jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/types/events/DoubleTest.java jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/types/events/FloatTest.java jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/types/events/IntTest.java jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/types/events/LongTest.java jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/types/events/ShortTest.java jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/types/operations/ByteTest.java jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/types/operations/DoubleTest.java jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/types/operations/FloatTest.java jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/types/operations/IntTest.java jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/types/operations/LongTest.java jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/types/operations/ShortTest.java jmh-core-it/src/test/java/org/openjdk/jmh/it/auxcounters/AuxCountersEventsTest.java jmh-core-it/src/test/java/org/openjdk/jmh/it/auxcounters/AuxCountersOperationsTest.java jmh-core/src/main/java/org/openjdk/jmh/annotations/AuxCounters.java jmh-core/src/main/java/org/openjdk/jmh/generators/core/BenchmarkGenerator.java jmh-core/src/main/java/org/openjdk/jmh/generators/core/StateObjectHandler.java jmh-core/src/main/java/org/openjdk/jmh/results/AverageTimeResult.java jmh-core/src/main/java/org/openjdk/jmh/results/ThroughputResult.java jmh-samples/src/main/java/org/openjdk/jmh/samples/JMHSample_23_AuxCounters.java
diffstat 63 files changed, 3184 insertions(+), 152 deletions(-) [+]
line wrap: on
line diff
--- a/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/AuxCountersTest.java	Wed Sep 28 21:57:04 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +0,0 @@
-/*
- * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package org.openjdk.jmh.ct.other;
-
-import org.junit.Test;
-import org.openjdk.jmh.annotations.AuxCounters;
-import org.openjdk.jmh.annotations.Benchmark;
-import org.openjdk.jmh.annotations.Group;
-import org.openjdk.jmh.annotations.Scope;
-import org.openjdk.jmh.annotations.State;
-import org.openjdk.jmh.ct.CompileTest;
-
-public class AuxCountersTest {
-
-    @State(Scope.Benchmark)
-    public static class BenchmarkState {
-        public int x;
-    }
-
-    @State(Scope.Group)
-    public static class GroupState {
-        public int y;
-    }
-
-    @AuxCounters
-    @State(Scope.Thread)
-    public static class ThreadState {
-        public int z;
-    }
-
-    @Benchmark
-    public void testThread(ThreadState s) {
-
-    }
-
-    @Benchmark
-    @Group("test_gt")
-    public void testGroupThread_1(GroupState gs, ThreadState ts) {
-
-    }
-
-    @Benchmark
-    @Group("test_gt")
-    public void testGroupThread_2(GroupState gs, ThreadState ts) {
-
-    }
-
-    @Benchmark
-    public void testBenchThread(BenchmarkState bs, ThreadState ts) {
-
-    }
-
-    @Test
-    public void compileTest() {
-        CompileTest.assertOK(this.getClass());
-    }
-
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/AuxCountersTest.java	Thu Sep 29 17:44:27 2016 +0200
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2016, Red Hat Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jmh.ct.other.auxcounters;
+
+import org.junit.Test;
+import org.openjdk.jmh.annotations.AuxCounters;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.Group;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.State;
+import org.openjdk.jmh.ct.CompileTest;
+
+public class AuxCountersTest {
+
+    @State(Scope.Benchmark)
+    public static class BenchmarkState {
+        public int x;
+    }
+
+    @State(Scope.Group)
+    public static class GroupState {
+        public int y;
+    }
+
+    @AuxCounters
+    @State(Scope.Thread)
+    public static class ThreadState {
+        public int z;
+    }
+
+    @Benchmark
+    public void testThread(ThreadState s) {
+
+    }
+
+    @Benchmark
+    @Group("test_gt")
+    public void testGroupThread_1(GroupState gs, ThreadState ts) {
+
+    }
+
+    @Benchmark
+    @Group("test_gt")
+    public void testGroupThread_2(GroupState gs, ThreadState ts) {
+
+    }
+
+    @Benchmark
+    public void testBenchThread(BenchmarkState bs, ThreadState ts) {
+
+    }
+
+    @Test
+    public void compileTest() {
+        CompileTest.assertOK(this.getClass());
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/privateFields/BooleanTest.java	Thu Sep 29 17:44:27 2016 +0200
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2016, Red Hat Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jmh.ct.other.auxcounters.counterTypes.privateFields;
+
+import org.junit.Test;
+import org.openjdk.jmh.annotations.AuxCounters;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.State;
+import org.openjdk.jmh.ct.CompileTest;
+
+public class BooleanTest {
+
+    @AuxCounters
+    @State(Scope.Thread)
+    public static class S {
+        boolean cnt;
+    }
+
+    @Benchmark
+    public void benchmark(S s) {
+        // intentionally left blank
+    }
+
+    @Test
+    public void compileTest() {
+        CompileTest.assertOK(this.getClass());
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/privateFields/ByteTest.java	Thu Sep 29 17:44:27 2016 +0200
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2016, Red Hat Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jmh.ct.other.auxcounters.counterTypes.privateFields;
+
+import org.junit.Test;
+import org.openjdk.jmh.annotations.AuxCounters;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.State;
+import org.openjdk.jmh.ct.CompileTest;
+
+public class ByteTest {
+
+    @AuxCounters
+    @State(Scope.Thread)
+    public static class S {
+        byte cnt;
+    }
+
+    @Benchmark
+    public void benchmark(S s) {
+        // intentionally left blank
+    }
+
+    @Test
+    public void compileTest() {
+        CompileTest.assertOK(this.getClass());
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/privateFields/CharTest.java	Thu Sep 29 17:44:27 2016 +0200
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2016, Red Hat Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jmh.ct.other.auxcounters.counterTypes.privateFields;
+
+import org.junit.Test;
+import org.openjdk.jmh.annotations.AuxCounters;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.State;
+import org.openjdk.jmh.ct.CompileTest;
+
+public class CharTest {
+
+    @AuxCounters
+    @State(Scope.Thread)
+    public static class S {
+        char cnt;
+    }
+
+    @Benchmark
+    public void benchmark(S s) {
+        // intentionally left blank
+    }
+
+    @Test
+    public void compileTest() {
+        CompileTest.assertOK(this.getClass());
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/privateFields/DoubleTest.java	Thu Sep 29 17:44:27 2016 +0200
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2016, Red Hat Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jmh.ct.other.auxcounters.counterTypes.privateFields;
+
+import org.junit.Test;
+import org.openjdk.jmh.annotations.AuxCounters;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.State;
+import org.openjdk.jmh.ct.CompileTest;
+
+public class DoubleTest {
+
+    @AuxCounters
+    @State(Scope.Thread)
+    public static class S {
+        double cnt;
+    }
+
+    @Benchmark
+    public void benchmark(S s) {
+        // intentionally left blank
+    }
+
+    @Test
+    public void compileTest() {
+        CompileTest.assertOK(this.getClass());
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/privateFields/FloatTest.java	Thu Sep 29 17:44:27 2016 +0200
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2016, Red Hat Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jmh.ct.other.auxcounters.counterTypes.privateFields;
+
+import org.junit.Test;
+import org.openjdk.jmh.annotations.AuxCounters;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.State;
+import org.openjdk.jmh.ct.CompileTest;
+
+public class FloatTest {
+
+    @AuxCounters
+    @State(Scope.Thread)
+    public static class S {
+        float cnt;
+    }
+
+    @Benchmark
+    public void benchmark(S s) {
+        // intentionally left blank
+    }
+
+    @Test
+    public void compileTest() {
+        CompileTest.assertOK(this.getClass());
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/privateFields/IntTest.java	Thu Sep 29 17:44:27 2016 +0200
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2016, Red Hat Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jmh.ct.other.auxcounters.counterTypes.privateFields;
+
+import org.junit.Test;
+import org.openjdk.jmh.annotations.AuxCounters;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.State;
+import org.openjdk.jmh.ct.CompileTest;
+
+public class IntTest {
+
+    @AuxCounters
+    @State(Scope.Thread)
+    public static class S {
+        int cnt;
+    }
+
+    @Benchmark
+    public void benchmark(S s) {
+        // intentionally left blank
+    }
+
+    @Test
+    public void compileTest() {
+        CompileTest.assertOK(this.getClass());
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/privateFields/LongTest.java	Thu Sep 29 17:44:27 2016 +0200
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2016, Red Hat Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jmh.ct.other.auxcounters.counterTypes.privateFields;
+
+import org.junit.Test;
+import org.openjdk.jmh.annotations.AuxCounters;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.State;
+import org.openjdk.jmh.ct.CompileTest;
+
+public class LongTest {
+
+    @AuxCounters
+    @State(Scope.Thread)
+    public static class S {
+        long cnt;
+    }
+
+    @Benchmark
+    public void benchmark(S s) {
+        // intentionally left blank
+    }
+
+    @Test
+    public void compileTest() {
+        CompileTest.assertOK(this.getClass());
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/privateFields/ShortTest.java	Thu Sep 29 17:44:27 2016 +0200
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2016, Red Hat Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jmh.ct.other.auxcounters.counterTypes.privateFields;
+
+import org.junit.Test;
+import org.openjdk.jmh.annotations.AuxCounters;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.State;
+import org.openjdk.jmh.ct.CompileTest;
+
+public class ShortTest {
+
+    @AuxCounters
+    @State(Scope.Thread)
+    public static class S {
+        short cnt;
+    }
+
+    @Benchmark
+    public void benchmark(S s) {
+        // intentionally left blank
+    }
+
+    @Test
+    public void compileTest() {
+        CompileTest.assertOK(this.getClass());
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/privateFields/StringTest.java	Thu Sep 29 17:44:27 2016 +0200
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2016, Red Hat Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jmh.ct.other.auxcounters.counterTypes.privateFields;
+
+import org.junit.Test;
+import org.openjdk.jmh.annotations.AuxCounters;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.State;
+import org.openjdk.jmh.ct.CompileTest;
+
+public class StringTest {
+
+    @AuxCounters
+    @State(Scope.Thread)
+    public static class S {
+        String cnt;
+    }
+
+    @Benchmark
+    public void benchmark(S s) {
+        // intentionally left blank
+    }
+
+    @Test
+    public void compileTest() {
+        CompileTest.assertOK(this.getClass());
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/privateMethods/BooleanTest.java	Thu Sep 29 17:44:27 2016 +0200
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2016, Red Hat Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jmh.ct.other.auxcounters.counterTypes.privateMethods;
+
+import org.junit.Test;
+import org.openjdk.jmh.annotations.AuxCounters;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.State;
+import org.openjdk.jmh.ct.CompileTest;
+
+public class BooleanTest {
+
+    @AuxCounters
+    @State(Scope.Thread)
+    public static class S {
+        boolean cnt() { return false; }
+    }
+
+    @Benchmark
+    public void benchmark(S s) {
+        // intentionally left blank
+    }
+
+    @Test
+    public void compileTest() {
+        CompileTest.assertOK(this.getClass());
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/privateMethods/ByteTest.java	Thu Sep 29 17:44:27 2016 +0200
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2016, Red Hat Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jmh.ct.other.auxcounters.counterTypes.privateMethods;
+
+import org.junit.Test;
+import org.openjdk.jmh.annotations.AuxCounters;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.State;
+import org.openjdk.jmh.ct.CompileTest;
+
+public class ByteTest {
+
+    @AuxCounters
+    @State(Scope.Thread)
+    public static class S {
+        byte cnt() { return 0; }
+    }
+
+    @Benchmark
+    public void benchmark(S s) {
+        // intentionally left blank
+    }
+
+    @Test
+    public void compileTest() {
+        CompileTest.assertOK(this.getClass());
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/privateMethods/CharTest.java	Thu Sep 29 17:44:27 2016 +0200
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2016, Red Hat Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jmh.ct.other.auxcounters.counterTypes.privateMethods;
+
+import org.junit.Test;
+import org.openjdk.jmh.annotations.AuxCounters;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.State;
+import org.openjdk.jmh.ct.CompileTest;
+
+public class CharTest {
+
+    @AuxCounters
+    @State(Scope.Thread)
+    public static class S {
+        char cnt() { return 0; }
+    }
+
+    @Benchmark
+    public void benchmark(S s) {
+        // intentionally left blank
+    }
+
+    @Test
+    public void compileTest() {
+        CompileTest.assertOK(this.getClass());
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/privateMethods/DoubleTest.java	Thu Sep 29 17:44:27 2016 +0200
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2016, Red Hat Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jmh.ct.other.auxcounters.counterTypes.privateMethods;
+
+import org.junit.Test;
+import org.openjdk.jmh.annotations.AuxCounters;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.State;
+import org.openjdk.jmh.ct.CompileTest;
+
+public class DoubleTest {
+
+    @AuxCounters
+    @State(Scope.Thread)
+    public static class S {
+        double cnt() { return 0; }
+    }
+
+    @Benchmark
+    public void benchmark(S s) {
+        // intentionally left blank
+    }
+
+    @Test
+    public void compileTest() {
+        CompileTest.assertOK(this.getClass());
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/privateMethods/FloatTest.java	Thu Sep 29 17:44:27 2016 +0200
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2016, Red Hat Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jmh.ct.other.auxcounters.counterTypes.privateMethods;
+
+import org.junit.Test;
+import org.openjdk.jmh.annotations.AuxCounters;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.State;
+import org.openjdk.jmh.ct.CompileTest;
+
+public class FloatTest {
+
+    @AuxCounters
+    @State(Scope.Thread)
+    public static class S {
+        float cnt() { return 0; }
+    }
+
+    @Benchmark
+    public void benchmark(S s) {
+        // intentionally left blank
+    }
+
+    @Test
+    public void compileTest() {
+        CompileTest.assertOK(this.getClass());
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/privateMethods/IntTest.java	Thu Sep 29 17:44:27 2016 +0200
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2016, Red Hat Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jmh.ct.other.auxcounters.counterTypes.privateMethods;
+
+import org.junit.Test;
+import org.openjdk.jmh.annotations.AuxCounters;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.State;
+import org.openjdk.jmh.ct.CompileTest;
+
+public class IntTest {
+
+    @AuxCounters
+    @State(Scope.Thread)
+    public static class S {
+        int cnt() { return 0; }
+    }
+
+    @Benchmark
+    public void benchmark(S s) {
+        // intentionally left blank
+    }
+
+    @Test
+    public void compileTest() {
+        CompileTest.assertOK(this.getClass());
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/privateMethods/LongTest.java	Thu Sep 29 17:44:27 2016 +0200
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2016, Red Hat Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jmh.ct.other.auxcounters.counterTypes.privateMethods;
+
+import org.junit.Test;
+import org.openjdk.jmh.annotations.AuxCounters;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.State;
+import org.openjdk.jmh.ct.CompileTest;
+
+public class LongTest {
+
+    @AuxCounters
+    @State(Scope.Thread)
+    public static class S {
+        long cnt() { return 0; }
+    }
+
+    @Benchmark
+    public void benchmark(S s) {
+        // intentionally left blank
+    }
+
+    @Test
+    public void compileTest() {
+        CompileTest.assertOK(this.getClass());
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/privateMethods/ShortTest.java	Thu Sep 29 17:44:27 2016 +0200
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2016, Red Hat Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jmh.ct.other.auxcounters.counterTypes.privateMethods;
+
+import org.junit.Test;
+import org.openjdk.jmh.annotations.AuxCounters;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.State;
+import org.openjdk.jmh.ct.CompileTest;
+
+public class ShortTest {
+
+    @AuxCounters
+    @State(Scope.Thread)
+    public static class S {
+        short cnt() { return 0; }
+    }
+
+    @Benchmark
+    public void benchmark(S s) {
+        // intentionally left blank
+    }
+
+    @Test
+    public void compileTest() {
+        CompileTest.assertOK(this.getClass());
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/privateMethods/StringTest.java	Thu Sep 29 17:44:27 2016 +0200
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2016, Red Hat Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jmh.ct.other.auxcounters.counterTypes.privateMethods;
+
+import org.junit.Test;
+import org.openjdk.jmh.annotations.AuxCounters;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.State;
+import org.openjdk.jmh.ct.CompileTest;
+
+public class StringTest {
+
+    @AuxCounters
+    @State(Scope.Thread)
+    public static class S {
+        String cnt() { return ""; }
+    }
+
+    @Benchmark
+    public void benchmark(S s) {
+        // intentionally left blank
+    }
+
+    @Test
+    public void compileTest() {
+        CompileTest.assertOK(this.getClass());
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/privateMethods/VoidTest.java	Thu Sep 29 17:44:27 2016 +0200
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2016, Red Hat Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jmh.ct.other.auxcounters.counterTypes.privateMethods;
+
+import org.junit.Test;
+import org.openjdk.jmh.annotations.AuxCounters;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.State;
+import org.openjdk.jmh.ct.CompileTest;
+
+public class VoidTest {
+
+    @AuxCounters
+    @State(Scope.Thread)
+    public static class S {
+        void cnt() { }
+    }
+
+    @Benchmark
+    public void benchmark(S s) {
+        // intentionally left blank
+    }
+
+    @Test
+    public void compileTest() {
+        CompileTest.assertOK(this.getClass());
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/publicFields/BooleanTest.java	Thu Sep 29 17:44:27 2016 +0200
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2016, Red Hat Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jmh.ct.other.auxcounters.counterTypes.publicFields;
+
+import org.junit.Test;
+import org.openjdk.jmh.annotations.AuxCounters;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.State;
+import org.openjdk.jmh.ct.CompileTest;
+
+public class BooleanTest {
+
+    @AuxCounters
+    @State(Scope.Thread)
+    public static class S {
+        public boolean cnt;
+    }
+
+    @Benchmark
+    public void benchmark(S s) {
+        // intentionally left blank
+    }
+
+    @Test
+    public void compileTest() {
+        CompileTest.assertFail(this.getClass(), "Illegal type for the public field");
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/publicFields/ByteTest.java	Thu Sep 29 17:44:27 2016 +0200
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2016, Red Hat Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jmh.ct.other.auxcounters.counterTypes.publicFields;
+
+import org.junit.Test;
+import org.openjdk.jmh.annotations.AuxCounters;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.State;
+import org.openjdk.jmh.ct.CompileTest;
+
+public class ByteTest {
+
+    @AuxCounters
+    @State(Scope.Thread)
+    public static class S {
+        public byte cnt;
+    }
+
+    @Benchmark
+    public void benchmark(S s) {
+        // intentionally left blank
+    }
+
+    @Test
+    public void compileTest() {
+        CompileTest.assertOK(this.getClass());
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/publicFields/CharTest.java	Thu Sep 29 17:44:27 2016 +0200
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2016, Red Hat Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jmh.ct.other.auxcounters.counterTypes.publicFields;
+
+import org.junit.Test;
+import org.openjdk.jmh.annotations.AuxCounters;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.State;
+import org.openjdk.jmh.ct.CompileTest;
+
+public class CharTest {
+
+    @AuxCounters
+    @State(Scope.Thread)
+    public static class S {
+        public char cnt;
+    }
+
+    @Benchmark
+    public void benchmark(S s) {
+        // intentionally left blank
+    }
+
+    @Test
+    public void compileTest() {
+        CompileTest.assertFail(this.getClass(), "Illegal type for the public field");
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/publicFields/DoubleTest.java	Thu Sep 29 17:44:27 2016 +0200
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2016, Red Hat Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jmh.ct.other.auxcounters.counterTypes.publicFields;
+
+import org.junit.Test;
+import org.openjdk.jmh.annotations.AuxCounters;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.State;
+import org.openjdk.jmh.ct.CompileTest;
+
+public class DoubleTest {
+
+    @AuxCounters
+    @State(Scope.Thread)
+    public static class S {
+        public double cnt;
+    }
+
+    @Benchmark
+    public void benchmark(S s) {
+        // intentionally left blank
+    }
+
+    @Test
+    public void compileTest() {
+        CompileTest.assertOK(this.getClass());
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/publicFields/FloatTest.java	Thu Sep 29 17:44:27 2016 +0200
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2016, Red Hat Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jmh.ct.other.auxcounters.counterTypes.publicFields;
+
+import org.junit.Test;
+import org.openjdk.jmh.annotations.AuxCounters;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.State;
+import org.openjdk.jmh.ct.CompileTest;
+
+public class FloatTest {
+
+    @AuxCounters
+    @State(Scope.Thread)
+    public static class S {
+        public float cnt;
+    }
+
+    @Benchmark
+    public void benchmark(S s) {
+        // intentionally left blank
+    }
+
+    @Test
+    public void compileTest() {
+        CompileTest.assertOK(this.getClass());
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/publicFields/IntTest.java	Thu Sep 29 17:44:27 2016 +0200
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2016, Red Hat Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jmh.ct.other.auxcounters.counterTypes.publicFields;
+
+import org.junit.Test;
+import org.openjdk.jmh.annotations.AuxCounters;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.State;
+import org.openjdk.jmh.ct.CompileTest;
+
+public class IntTest {
+
+    @AuxCounters
+    @State(Scope.Thread)
+    public static class S {
+        public int cnt;
+    }
+
+    @Benchmark
+    public void benchmark(S s) {
+        // intentionally left blank
+    }
+
+    @Test
+    public void compileTest() {
+        CompileTest.assertOK(this.getClass());
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/publicFields/LongTest.java	Thu Sep 29 17:44:27 2016 +0200
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2016, Red Hat Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jmh.ct.other.auxcounters.counterTypes.publicFields;
+
+import org.junit.Test;
+import org.openjdk.jmh.annotations.AuxCounters;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.State;
+import org.openjdk.jmh.ct.CompileTest;
+
+public class LongTest {
+
+    @AuxCounters
+    @State(Scope.Thread)
+    public static class S {
+        public long cnt;
+    }
+
+    @Benchmark
+    public void benchmark(S s) {
+        // intentionally left blank
+    }
+
+    @Test
+    public void compileTest() {
+        CompileTest.assertOK(this.getClass());
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/publicFields/ShortTest.java	Thu Sep 29 17:44:27 2016 +0200
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2016, Red Hat Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jmh.ct.other.auxcounters.counterTypes.publicFields;
+
+import org.junit.Test;
+import org.openjdk.jmh.annotations.AuxCounters;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.State;
+import org.openjdk.jmh.ct.CompileTest;
+
+public class ShortTest {
+
+    @AuxCounters
+    @State(Scope.Thread)
+    public static class S {
+        public short cnt;
+    }
+
+    @Benchmark
+    public void benchmark(S s) {
+        // intentionally left blank
+    }
+
+    @Test
+    public void compileTest() {
+        CompileTest.assertOK(this.getClass());
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/publicFields/StringTest.java	Thu Sep 29 17:44:27 2016 +0200
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2016, Red Hat Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jmh.ct.other.auxcounters.counterTypes.publicFields;
+
+import org.junit.Test;
+import org.openjdk.jmh.annotations.AuxCounters;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.State;
+import org.openjdk.jmh.ct.CompileTest;
+
+public class StringTest {
+
+    @AuxCounters
+    @State(Scope.Thread)
+    public static class S {
+        public String cnt;
+    }
+
+    @Benchmark
+    public void benchmark(S s) {
+        // intentionally left blank
+    }
+
+    @Test
+    public void compileTest() {
+        CompileTest.assertFail(this.getClass(), "Illegal type for the public field");
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/publicMethods/BooleanTest.java	Thu Sep 29 17:44:27 2016 +0200
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2016, Red Hat Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jmh.ct.other.auxcounters.counterTypes.publicMethods;
+
+import org.junit.Test;
+import org.openjdk.jmh.annotations.AuxCounters;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.State;
+import org.openjdk.jmh.ct.CompileTest;
+
+public class BooleanTest {
+
+    @AuxCounters
+    @State(Scope.Thread)
+    public static class S {
+        public boolean cnt() { return false; }
+    }
+
+    @Benchmark
+    public void benchmark(S s) {
+        // intentionally left blank
+    }
+
+    @Test
+    public void compileTest() {
+        CompileTest.assertFail(this.getClass(), "Illegal type for the return type of public method");
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/publicMethods/ByteTest.java	Thu Sep 29 17:44:27 2016 +0200
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2016, Red Hat Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jmh.ct.other.auxcounters.counterTypes.publicMethods;
+
+import org.junit.Test;
+import org.openjdk.jmh.annotations.AuxCounters;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.State;
+import org.openjdk.jmh.ct.CompileTest;
+
+public class ByteTest {
+
+    @AuxCounters
+    @State(Scope.Thread)
+    public static class S {
+        public byte cnt() { return 0; }
+    }
+
+    @Benchmark
+    public void benchmark(S s) {
+        // intentionally left blank
+    }
+
+    @Test
+    public void compileTest() {
+        CompileTest.assertOK(this.getClass());
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/publicMethods/CharTest.java	Thu Sep 29 17:44:27 2016 +0200
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2016, Red Hat Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jmh.ct.other.auxcounters.counterTypes.publicMethods;
+
+import org.junit.Test;
+import org.openjdk.jmh.annotations.AuxCounters;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.State;
+import org.openjdk.jmh.ct.CompileTest;
+
+public class CharTest {
+
+    @AuxCounters
+    @State(Scope.Thread)
+    public static class S {
+        public char cnt() { return 0; }
+    }
+
+    @Benchmark
+    public void benchmark(S s) {
+        // intentionally left blank
+    }
+
+    @Test
+    public void compileTest() {
+        CompileTest.assertFail(this.getClass(), "Illegal type for the return type of public method");
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/publicMethods/DoubleTest.java	Thu Sep 29 17:44:27 2016 +0200
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2016, Red Hat Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jmh.ct.other.auxcounters.counterTypes.publicMethods;
+
+import org.junit.Test;
+import org.openjdk.jmh.annotations.AuxCounters;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.State;
+import org.openjdk.jmh.ct.CompileTest;
+
+public class DoubleTest {
+
+    @AuxCounters
+    @State(Scope.Thread)
+    public static class S {
+        public double cnt() { return 0; }
+    }
+
+    @Benchmark
+    public void benchmark(S s) {
+        // intentionally left blank
+    }
+
+    @Test
+    public void compileTest() {
+        CompileTest.assertOK(this.getClass());
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/publicMethods/FloatTest.java	Thu Sep 29 17:44:27 2016 +0200
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2016, Red Hat Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jmh.ct.other.auxcounters.counterTypes.publicMethods;
+
+import org.junit.Test;
+import org.openjdk.jmh.annotations.AuxCounters;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.State;
+import org.openjdk.jmh.ct.CompileTest;
+
+public class FloatTest {
+
+    @AuxCounters
+    @State(Scope.Thread)
+    public static class S {
+        public float cnt() { return 0; }
+    }
+
+    @Benchmark
+    public void benchmark(S s) {
+        // intentionally left blank
+    }
+
+    @Test
+    public void compileTest() {
+        CompileTest.assertOK(this.getClass());
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/publicMethods/IntTest.java	Thu Sep 29 17:44:27 2016 +0200
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2016, Red Hat Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jmh.ct.other.auxcounters.counterTypes.publicMethods;
+
+import org.junit.Test;
+import org.openjdk.jmh.annotations.AuxCounters;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.State;
+import org.openjdk.jmh.ct.CompileTest;
+
+public class IntTest {
+
+    @AuxCounters
+    @State(Scope.Thread)
+    public static class S {
+        public int cnt() { return 0; }
+    }
+
+    @Benchmark
+    public void benchmark(S s) {
+        // intentionally left blank
+    }
+
+    @Test
+    public void compileTest() {
+        CompileTest.assertOK(this.getClass());
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/publicMethods/LongTest.java	Thu Sep 29 17:44:27 2016 +0200
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2016, Red Hat Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jmh.ct.other.auxcounters.counterTypes.publicMethods;
+
+import org.junit.Test;
+import org.openjdk.jmh.annotations.AuxCounters;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.State;
+import org.openjdk.jmh.ct.CompileTest;
+
+public class LongTest {
+
+    @AuxCounters
+    @State(Scope.Thread)
+    public static class S {
+        public long cnt() { return 0; }
+    }
+
+    @Benchmark
+    public void benchmark(S s) {
+        // intentionally left blank
+    }
+
+    @Test
+    public void compileTest() {
+        CompileTest.assertOK(this.getClass());
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/publicMethods/ShortTest.java	Thu Sep 29 17:44:27 2016 +0200
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2016, Red Hat Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jmh.ct.other.auxcounters.counterTypes.publicMethods;
+
+import org.junit.Test;
+import org.openjdk.jmh.annotations.AuxCounters;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.State;
+import org.openjdk.jmh.ct.CompileTest;
+
+public class ShortTest {
+
+    @AuxCounters
+    @State(Scope.Thread)
+    public static class S {
+        public short cnt() { return 0; }
+    }
+
+    @Benchmark
+    public void benchmark(S s) {
+        // intentionally left blank
+    }
+
+    @Test
+    public void compileTest() {
+        CompileTest.assertOK(this.getClass());
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/publicMethods/StringTest.java	Thu Sep 29 17:44:27 2016 +0200
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2016, Red Hat Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jmh.ct.other.auxcounters.counterTypes.publicMethods;
+
+import org.junit.Test;
+import org.openjdk.jmh.annotations.AuxCounters;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.State;
+import org.openjdk.jmh.ct.CompileTest;
+
+public class StringTest {
+
+    @AuxCounters
+    @State(Scope.Thread)
+    public static class S {
+        public String cnt() { return ""; }
+    }
+
+    @Benchmark
+    public void benchmark(S s) {
+        // intentionally left blank
+    }
+
+    @Test
+    public void compileTest() {
+        CompileTest.assertFail(this.getClass(), "Illegal type for the return type of public method");
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/publicMethods/VoidTest.java	Thu Sep 29 17:44:27 2016 +0200
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jmh.ct.other.auxcounters.counterTypes.publicMethods;
+
+import org.junit.Test;
+import org.openjdk.jmh.annotations.AuxCounters;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.State;
+import org.openjdk.jmh.ct.CompileTest;
+
+public class VoidTest {
+
+    @AuxCounters
+    @State(Scope.Thread)
+    public static class S {
+        public void cnt() { }
+    }
+
+    @Benchmark
+    public void benchmark(S s) {
+        // intentionally left blank
+    }
+
+    @Test
+    public void compileTest() {
+        CompileTest.assertFail(this.getClass(), "Illegal type for the return type of public method");
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/scope/BenchmarkStateTest.java	Thu Sep 29 17:44:27 2016 +0200
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2016, Red Hat Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jmh.ct.other.auxcounters.scope;
+
+import org.junit.Test;
+import org.openjdk.jmh.annotations.*;
+import org.openjdk.jmh.ct.CompileTest;
+
+public class BenchmarkStateTest {
+
+    @AuxCounters
+    @State(Scope.Benchmark)
+    public static class S {
+
+    }
+
+    @Benchmark
+    public void benchmark(S s) {
+        // intentionally left blank
+    }
+
+    @Test
+    public void compileTest() {
+        CompileTest.assertFail(this.getClass(), "can only be used with Scope.Thread states");
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/scope/GroupStateTest.java	Thu Sep 29 17:44:27 2016 +0200
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2016, Red Hat Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jmh.ct.other.auxcounters.scope;
+
+import org.junit.Test;
+import org.openjdk.jmh.annotations.*;
+import org.openjdk.jmh.ct.CompileTest;
+
+public class GroupStateTest {
+
+    @AuxCounters
+    @State(Scope.Group)
+    public static class S {
+
+    }
+
+    @Benchmark
+    @Group("T")
+    public void benchmark(S s) {
+        // intentionally left blank
+    }
+
+    @Test
+    public void compileTest() {
+        CompileTest.assertFail(this.getClass(), "can only be used with Scope.Thread states");
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/scope/ThreadStateTest.java	Thu Sep 29 17:44:27 2016 +0200
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2016, Red Hat Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jmh.ct.other.auxcounters.scope;
+
+import org.junit.Test;
+import org.openjdk.jmh.annotations.AuxCounters;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.State;
+import org.openjdk.jmh.ct.CompileTest;
+
+public class ThreadStateTest {
+
+    @AuxCounters
+    @State(Scope.Thread)
+    public static class S {
+
+    }
+
+    @Benchmark
+    public void benchmark(S s) {
+        // intentionally left blank
+    }
+
+    @Test
+    public void compileTest() {
+        CompileTest.assertOK(this.getClass());
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/types/events/ByteTest.java	Thu Sep 29 17:44:27 2016 +0200
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2016, Red Hat Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jmh.ct.other.auxcounters.types.events;
+
+import org.junit.Test;
+import org.openjdk.jmh.annotations.AuxCounters;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.State;
+import org.openjdk.jmh.ct.CompileTest;
+
+public class ByteTest {
+
+    @AuxCounters(AuxCounters.Type.EVENTS)
+    @State(Scope.Thread)
+    public static class S {
+        public byte cnt;
+    }
+
+    @Benchmark
+    public void benchmark(S s) {
+        // intentionally left blank
+    }
+
+    @Test
+    public void compileTest() {
+        CompileTest.assertOK(this.getClass());
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/types/events/DoubleTest.java	Thu Sep 29 17:44:27 2016 +0200
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2016, Red Hat Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jmh.ct.other.auxcounters.types.events;
+
+import org.junit.Test;
+import org.openjdk.jmh.annotations.AuxCounters;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.State;
+import org.openjdk.jmh.ct.CompileTest;
+
+public class DoubleTest {
+
+    @AuxCounters(AuxCounters.Type.EVENTS)
+    @State(Scope.Thread)
+    public static class S {
+        public double cnt;
+    }
+
+    @Benchmark
+    public void benchmark(S s) {
+        // intentionally left blank
+    }
+
+    @Test
+    public void compileTest() {
+        CompileTest.assertOK(this.getClass());
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/types/events/FloatTest.java	Thu Sep 29 17:44:27 2016 +0200
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2016, Red Hat Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jmh.ct.other.auxcounters.types.events;
+
+import org.junit.Test;
+import org.openjdk.jmh.annotations.AuxCounters;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.State;
+import org.openjdk.jmh.ct.CompileTest;
+
+public class FloatTest {
+
+    @AuxCounters(AuxCounters.Type.EVENTS)
+    @State(Scope.Thread)
+    public static class S {
+        public float cnt;
+    }
+
+    @Benchmark
+    public void benchmark(S s) {
+        // intentionally left blank
+    }
+
+    @Test
+    public void compileTest() {
+        CompileTest.assertOK(this.getClass());
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/types/events/IntTest.java	Thu Sep 29 17:44:27 2016 +0200
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2016, Red Hat Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jmh.ct.other.auxcounters.types.events;
+
+import org.junit.Test;
+import org.openjdk.jmh.annotations.AuxCounters;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.State;
+import org.openjdk.jmh.ct.CompileTest;
+
+public class IntTest {
+
+    @AuxCounters(AuxCounters.Type.EVENTS)
+    @State(Scope.Thread)
+    public static class S {
+        public int cnt;
+    }
+
+    @Benchmark
+    public void benchmark(S s) {
+        // intentionally left blank
+    }
+
+    @Test
+    public void compileTest() {
+        CompileTest.assertOK(this.getClass());
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/types/events/LongTest.java	Thu Sep 29 17:44:27 2016 +0200
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2016, Red Hat Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jmh.ct.other.auxcounters.types.events;
+
+import org.junit.Test;
+import org.openjdk.jmh.annotations.AuxCounters;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.State;
+import org.openjdk.jmh.ct.CompileTest;
+
+public class LongTest {
+
+    @AuxCounters(AuxCounters.Type.EVENTS)
+    @State(Scope.Thread)
+    public static class S {
+        public long cnt;
+    }
+
+    @Benchmark
+    public void benchmark(S s) {
+        // intentionally left blank
+    }
+
+    @Test
+    public void compileTest() {
+        CompileTest.assertOK(this.getClass());
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/types/events/ShortTest.java	Thu Sep 29 17:44:27 2016 +0200
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2016, Red Hat Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jmh.ct.other.auxcounters.types.events;
+
+import org.junit.Test;
+import org.openjdk.jmh.annotations.AuxCounters;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.State;
+import org.openjdk.jmh.ct.CompileTest;
+
+public class ShortTest {
+
+    @AuxCounters(AuxCounters.Type.EVENTS)
+    @State(Scope.Thread)
+    public static class S {
+        public short cnt;
+    }
+
+    @Benchmark
+    public void benchmark(S s) {
+        // intentionally left blank
+    }
+
+    @Test
+    public void compileTest() {
+        CompileTest.assertOK(this.getClass());
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/types/operations/ByteTest.java	Thu Sep 29 17:44:27 2016 +0200
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2016, Red Hat Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jmh.ct.other.auxcounters.types.operations;
+
+import org.junit.Test;
+import org.openjdk.jmh.annotations.AuxCounters;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.State;
+import org.openjdk.jmh.ct.CompileTest;
+
+public class ByteTest {
+
+    @AuxCounters(AuxCounters.Type.OPERATIONS)
+    @State(Scope.Thread)
+    public static class S {
+        public byte cnt;
+    }
+
+    @Benchmark
+    public void benchmark(S s) {
+        // intentionally left blank
+    }
+
+    @Test
+    public void compileTest() {
+        CompileTest.assertOK(this.getClass());
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/types/operations/DoubleTest.java	Thu Sep 29 17:44:27 2016 +0200
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2016, Red Hat Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jmh.ct.other.auxcounters.types.operations;
+
+import org.junit.Test;
+import org.openjdk.jmh.annotations.AuxCounters;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.State;
+import org.openjdk.jmh.ct.CompileTest;
+
+public class DoubleTest {
+
+    @AuxCounters(AuxCounters.Type.OPERATIONS)
+    @State(Scope.Thread)
+    public static class S {
+        public double cnt;
+    }
+
+    @Benchmark
+    public void benchmark(S s) {
+        // intentionally left blank
+    }
+
+    @Test
+    public void compileTest() {
+        CompileTest.assertOK(this.getClass());
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/types/operations/FloatTest.java	Thu Sep 29 17:44:27 2016 +0200
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2016, Red Hat Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jmh.ct.other.auxcounters.types.operations;
+
+import org.junit.Test;
+import org.openjdk.jmh.annotations.AuxCounters;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.State;
+import org.openjdk.jmh.ct.CompileTest;
+
+public class FloatTest {
+
+    @AuxCounters(AuxCounters.Type.OPERATIONS)
+    @State(Scope.Thread)
+    public static class S {
+        public float cnt;
+    }
+
+    @Benchmark
+    public void benchmark(S s) {
+        // intentionally left blank
+    }
+
+    @Test
+    public void compileTest() {
+        CompileTest.assertOK(this.getClass());
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/types/operations/IntTest.java	Thu Sep 29 17:44:27 2016 +0200
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2016, Red Hat Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jmh.ct.other.auxcounters.types.operations;
+
+import org.junit.Test;
+import org.openjdk.jmh.annotations.AuxCounters;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.State;
+import org.openjdk.jmh.ct.CompileTest;
+
+public class IntTest {
+
+    @AuxCounters(AuxCounters.Type.OPERATIONS)
+    @State(Scope.Thread)
+    public static class S {
+        public int cnt;
+    }
+
+    @Benchmark
+    public void benchmark(S s) {
+        // intentionally left blank
+    }
+
+    @Test
+    public void compileTest() {
+        CompileTest.assertOK(this.getClass());
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/types/operations/LongTest.java	Thu Sep 29 17:44:27 2016 +0200
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2016, Red Hat Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jmh.ct.other.auxcounters.types.operations;
+
+import org.junit.Test;
+import org.openjdk.jmh.annotations.AuxCounters;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.State;
+import org.openjdk.jmh.ct.CompileTest;
+
+public class LongTest {
+
+    @AuxCounters(AuxCounters.Type.OPERATIONS)
+    @State(Scope.Thread)
+    public static class S {
+        public long cnt;
+    }
+
+    @Benchmark
+    public void benchmark(S s) {
+        // intentionally left blank
+    }
+
+    @Test
+    public void compileTest() {
+        CompileTest.assertOK(this.getClass());
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/types/operations/ShortTest.java	Thu Sep 29 17:44:27 2016 +0200
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2016, Red Hat Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jmh.ct.other.auxcounters.types.operations;
+
+import org.junit.Test;
+import org.openjdk.jmh.annotations.AuxCounters;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.State;
+import org.openjdk.jmh.ct.CompileTest;
+
+public class ShortTest {
+
+    @AuxCounters(AuxCounters.Type.OPERATIONS)
+    @State(Scope.Thread)
+    public static class S {
+        public short cnt;
+    }
+
+    @Benchmark
+    public void benchmark(S s) {
+        // intentionally left blank
+    }
+
+    @Test
+    public void compileTest() {
+        CompileTest.assertOK(this.getClass());
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/auxcounters/AuxCountersEventsTest.java	Thu Sep 29 17:44:27 2016 +0200
@@ -0,0 +1,95 @@
+/*
+ * Copyright (c) 2016, Red Hat Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jmh.it.auxcounters;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.openjdk.jmh.annotations.*;
+import org.openjdk.jmh.it.Fixtures;
+import org.openjdk.jmh.results.Result;
+import org.openjdk.jmh.results.RunResult;
+import org.openjdk.jmh.runner.Runner;
+import org.openjdk.jmh.runner.RunnerException;
+import org.openjdk.jmh.runner.options.Options;
+import org.openjdk.jmh.runner.options.OptionsBuilder;
+
+import java.util.concurrent.TimeUnit;
+
+
+@Warmup(iterations = 5, time = 100, timeUnit = TimeUnit.MILLISECONDS)
+@Measurement(iterations = 5, time = 100, timeUnit = TimeUnit.MILLISECONDS)
+@Fork(1)
+public class AuxCountersEventsTest {
+
+    @AuxCounters(AuxCounters.Type.EVENTS)
+    @State(Scope.Thread)
+    public static class Counters {
+        public int cnt;
+    }
+
+    @Benchmark
+    public void test(Counters cnt) {
+        if (cnt.cnt == 0) {
+            // set event once
+            cnt.cnt = 42;
+        }
+        Fixtures.work();
+    }
+
+    @Test
+    public void invokeAPI() throws RunnerException {
+        for (Mode mode : Mode.values()) {
+            if (mode == Mode.All) continue;
+
+            Options opts = new OptionsBuilder()
+                    .include(Fixtures.getTestMask(this.getClass()))
+                    .mode(mode)
+                    .shouldFailOnError(true)
+                    .build();
+
+            RunResult result = new Runner(opts).runSingle();
+            Result prim = result.getPrimaryResult();
+            Result scnd = result.getSecondaryResults().get("cnt");
+
+            switch (mode) {
+                case Throughput:
+                case AverageTime: {
+                    Assert.assertNotNull("@AuxCounter result exists for " + mode, scnd);
+                    Assert.assertEquals(prim.getSampleCount(), scnd.getSampleCount());
+                    Assert.assertEquals("#", scnd.getScoreUnit());
+
+                    // 5 iterations, each returns exactly 42 events
+                    Assert.assertEquals(5 * 42, scnd.getScore(), 0.001);
+                    Assert.assertEquals(Double.NaN, scnd.getScoreError(), 0.001);
+                    break;
+                }
+                default: {
+                    Assert.assertNull("@AuxCounter does not exist for " + mode, scnd);
+                }
+            }
+        }
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/auxcounters/AuxCountersOperationsTest.java	Thu Sep 29 17:44:27 2016 +0200
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2016, Red Hat Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jmh.it.auxcounters;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.openjdk.jmh.annotations.*;
+import org.openjdk.jmh.it.Fixtures;
+import org.openjdk.jmh.results.Result;
+import org.openjdk.jmh.results.RunResult;
+import org.openjdk.jmh.runner.Runner;
+import org.openjdk.jmh.runner.RunnerException;
+import org.openjdk.jmh.runner.options.Options;
+import org.openjdk.jmh.runner.options.OptionsBuilder;
+
+import java.util.concurrent.TimeUnit;
+
+
+@Warmup(iterations = 5, time = 100, timeUnit = TimeUnit.MILLISECONDS)
+@Measurement(iterations = 5, time = 100, timeUnit = TimeUnit.MILLISECONDS)
+@Fork(1)
+public class AuxCountersOperationsTest {
+
+    @AuxCounters(AuxCounters.Type.OPERATIONS)
+    @State(Scope.Thread)
+    public static class Counters {
+        public int cnt;
+    }
+
+    @Benchmark
+    public void test(Counters cnt) {
+        cnt.cnt++;
+        Fixtures.work();
+    }
+
+    @Test
+    public void invokeAPI() throws RunnerException {
+        for (Mode mode : Mode.values()) {
+            if (mode == Mode.All) continue;
+
+            Options opts = new OptionsBuilder()
+                    .include(Fixtures.getTestMask(this.getClass()))
+                    .mode(mode)
+                    .shouldFailOnError(true)
+                    .build();
+
+            RunResult result = new Runner(opts).runSingle();
+            Result prim = result.getPrimaryResult();
+            Result scnd = result.getSecondaryResults().get("cnt");
+
+            switch (mode) {
+                case Throughput:
+                case AverageTime: {
+                    Assert.assertNotNull("@AuxCounter result exists for " + mode, scnd);
+
+                    // Should match primary metric exactly.
+                    Assert.assertEquals(prim.getSampleCount(), scnd.getSampleCount());
+                    Assert.assertEquals(prim.getScoreUnit(), scnd.getScoreUnit());
+                    Assert.assertEquals(prim.getScore(), scnd.getScore(), 0.001);
+                    Assert.assertEquals(prim.getScoreError(), scnd.getScoreError(), 0.001);
+                    break;
+                }
+                default: {
+                    Assert.assertNull("@AuxCounter does not exist for " + mode, scnd);
+                }
+            }
+        }
+    }
+
+}
--- a/jmh-core/src/main/java/org/openjdk/jmh/annotations/AuxCounters.java	Wed Sep 28 21:57:04 2016 +0200
+++ b/jmh-core/src/main/java/org/openjdk/jmh/annotations/AuxCounters.java	Thu Sep 29 17:44:27 2016 +0200
@@ -32,31 +32,63 @@
 /**
  * <p>{@link AuxCounters} annotation can be used to mark {@link State} objects
  * as the bearers of auxiliary secondary results. Marking the class with this annotation
- * will enable JMH to look for public {int, long} fields, as well as public methods
- * returning {int, long} values, and treat their values as the operation counts
- * in current iteration.</p>
+ * will make JMH to treat its public fields and result-returning public methods
+ * as the base for the secondary benchmark metrics.</p>
  *
- * <p>This allows to override the default operations counter with the user-provided one.
- * Instead of relying on JMH itself counting the number of {@link Benchmark} calls,
- * users can tell JMH how many calls actually happened. Note that it might require
- * modifying the counter at each {@link Benchmark} invocation.</p>
- *
- * <p><b>THIS IS AN EXPERIMENTAL API, which means, among other things:</b></p>
+ * <p>Properties:</p>
  *
  * <ul>
- *     <li>It can be modified, deprecated, and/or removed in future</li>
- *     <li>It is not available for all {@link BenchmarkMode}-s</li>
- *     <li>It is currently allowed only at {@link Scope#Thread} level, because JMH metric
- * aggregator expects the distinct counters coming from every measurement thread.</li>
- *     <li>You have to explicitly reset the state if you don't want the counters
- * to be shared across the iterations.</li>
- *     <li>The counter names are plain field/method names. The namespace for counters
- * is shared across all states participating in the run. JMH will fail to compile
- * the benchmark if there is an ambiguity around what counter comes from what
- * state class.</li>
+ *     <li>Auxiliary counters are not available for every {@link BenchmarkMode},
+ *     because not every mode counts time or operations. {@link Mode#AverageTime}
+ *     and {@link Mode#Throughput} are always supported.</li>
+ *
+ *     <li>{@link AuxCounters} annotation is only available for {@link Scope#Thread}
+ *     state objects. It is a compile-time error to use it with other states. This means
+ *     the counters are thread-local in nature.</li>
+ *
+ *     <li>Only public fields and methods are considered as metrics. If you don't want
+ *     a field/method to be captured as metric, do not make it public.</li>
+ *
+ *     <li>Only numeric fields and numeric-returning methods are considered as
+ *     metrics. These include all primitives and their corresponding boxed counterTypes,
+ *     except {@code boolean}/{@link Boolean} and {@code char}/{@link Character}</li>
+ *
+ *     <li>Public fields in {@link AuxCounters} instances would be reset before
+ *     starting the iteration, and read back at the end of iteration. This allows
+ *     benchmark code to avoid complicated lifecycle handling for these objects.</li>
+ *
+ *     <li>The counter names are generated from field/method names. The namespace for
+ *     counters is shared across all states participating in the run. JMH will fail to
+ *     compile the benchmark if there is an ambiguity around what counter comes from
+ *     what {@link AuxCounters} class.
+ *     </li>
  * </ul>
+ *
+ * <p><b>CAVEAT: THIS IS AN EXPERIMENTAL API, it may be changed or removed in future
+ * without prior warning. This is a sharp tool, use with care.</b></p>
  */
 @Target(ElementType.TYPE)
 @Retention(RetentionPolicy.RUNTIME)
 public @interface AuxCounters {
+
+    Type value() default Type.OPERATIONS;
+
+    enum Type {
+        /**
+         * Counts "operations", which should be relevant to the number of
+         * times {@link Benchmark} method was executed. If this counter is
+         * incremented on each {@link Benchmark} method invocation, then it
+         * will produce a metric similar to the primary benchmark result.
+         * This counter will be normalized to benchmark time by the harness.
+         */
+        OPERATIONS,
+
+        /**
+         * Counts "events", the one-off things in the lifetime of workload.
+         * This counter would not get normalized to time.
+         */
+        EVENTS,
+
+        ;
+    }
 }
--- a/jmh-core/src/main/java/org/openjdk/jmh/generators/core/BenchmarkGenerator.java	Wed Sep 28 21:57:04 2016 +0200
+++ b/jmh-core/src/main/java/org/openjdk/jmh/generators/core/BenchmarkGenerator.java	Thu Sep 29 17:44:27 2016 +0200
@@ -533,7 +533,8 @@
                 Mode.class, Fork.class, Measurement.class, Threads.class, Warmup.class,
                 BenchmarkMode.class, RawResults.class, ResultRole.class,
                 Field.class, BenchmarkParams.class, IterationParams.class,
-                Blackhole.class, Control.class
+                Blackhole.class, Control.class,
+                ScalarResult.class, AggregationPolicy.class
         };
 
         for (Class<?> c : imports) {
@@ -654,8 +655,8 @@
                 writer.println(ident(3) + "results.add(new ThroughputResult(ResultRole.PRIMARY, \"" + methodGroup.getName() + "\", res.measuredOps, res.getTime(), benchmarkParams.getTimeUnit()));");
                 writer.println(ident(3) + "results.add(new ThroughputResult(ResultRole.SECONDARY, \"" + method.getName() + "\", res.measuredOps, res.getTime(), benchmarkParams.getTimeUnit()));");
             }
-            for (String ops : states.getAuxResultNames(method)) {
-                writer.println(ident(3) + "results.add(new ThroughputResult(ResultRole.SECONDARY, \"" + ops + "\", " + states.getAuxResultAccessor(method, ops) + ", res.getTime(), benchmarkParams.getTimeUnit()));");
+            for (String res : states.getAuxResults(method, "ThroughputResult")) {
+                writer.println(ident(3) + "results.add(" + res + ");");
             }
 
             methodEpilog(writer, methodGroup);
@@ -695,6 +696,12 @@
         }
     }
 
+    private void addAuxCounters(PrintWriter writer, String resName, StateObjectHandler states, MethodInfo method) {
+        for (String res : states.getAuxResults(method, resName)) {
+            writer.println(ident(3) + "results.add(" + res + ");");
+        }
+    }
+
     private void generateAverageTime(ClassInfo classInfo, PrintWriter writer, Mode benchmarkKind, MethodGroup methodGroup, StateObjectHandler states) {
         writer.println(ident(1) + "public BenchmarkTaskResult " + methodGroup.getName() + "_" + benchmarkKind +
                 "(InfraControl control, ThreadParams threadParams) throws Throwable {");
@@ -782,9 +789,8 @@
                 writer.println(ident(3) + "results.add(new AverageTimeResult(ResultRole.PRIMARY, \"" + methodGroup.getName() + "\", res.measuredOps, res.getTime(), benchmarkParams.getTimeUnit()));");
                 writer.println(ident(3) + "results.add(new AverageTimeResult(ResultRole.SECONDARY, \"" + method.getName() + "\", res.measuredOps, res.getTime(), benchmarkParams.getTimeUnit()));");
             }
-            for (String ops : states.getAuxResultNames(method)) {
-                writer.println(ident(3) + "results.add(new AverageTimeResult(ResultRole.SECONDARY, \"" + ops + "\", " + states.getAuxResultAccessor(method, ops) + ", res.getTime(), benchmarkParams.getTimeUnit()));");
-            }
+            addAuxCounters(writer, "AverageTimeResult", states, method);
+
             methodEpilog(writer, methodGroup);
 
             writer.println(ident(3) + "return results;");
@@ -1108,6 +1114,11 @@
 
         for (String s : states.getIterationSetups(method)) writer.println(ident(prefix) + s);
         writer.println();
+
+        // reset @AuxCounters
+        for (String s : states.getAuxResets(method)) writer.println(ident(prefix) + s);
+        writer.println();
+
     }
 
     private void iterationEpilog(PrintWriter writer, int prefix, MethodInfo method, StateObjectHandler states) {
--- a/jmh-core/src/main/java/org/openjdk/jmh/generators/core/StateObjectHandler.java	Wed Sep 28 21:57:04 2016 +0200
+++ b/jmh-core/src/main/java/org/openjdk/jmh/generators/core/StateObjectHandler.java	Thu Sep 29 17:44:27 2016 +0200
@@ -53,7 +53,9 @@
     private final Multimap<String, String> benchmarkArgs;
 
     private final Multimap<String, String> auxNames = new HashMultimap<String, String>();
+    private final Map<String, AuxCounters.Type> auxType = new HashMap<String, AuxCounters.Type>();
     private final Map<String, String> auxAccessors = new HashMap<String, String>();
+    private final Map<String, Boolean> auxResettable = new HashMap<String, Boolean>();
 
     public StateObjectHandler(CompilerControlPlugin compileControl) {
         this.compileControl = compileControl;
@@ -281,7 +283,8 @@
         validateState(ci);
 
         // auxiliary result, produce the accessors
-        if (ci.getAnnotation(AuxCounters.class) != null) {
+        AuxCounters auxCountAnn = ci.getAnnotation(AuxCounters.class);
+        if (auxCountAnn != null) {
             if (so.scope != Scope.Thread) {
                 throw new GenerationException("@" + AuxCounters.class.getSimpleName() +
                         " can only be used with " + Scope.class.getSimpleName() + "." + Scope.Thread + " states.", ci);
@@ -289,34 +292,39 @@
 
             for (FieldInfo sub : ci.getFields()) {
                 if (sub.isPublic()) {
-                    String fieldType = sub.getType().getQualifiedName();
-                    if (fieldType.equals("int") || fieldType.equals("long")) {
-                        String name = sub.getName();
-                        String meth = execMethod.getName();
-                        auxNames.put(meth, name);
-                        String prev = auxAccessors.put(meth + name, so.localIdentifier + "." + name);
-                        if (prev != null) {
-                            throw new GenerationException("Conflicting @" + AuxCounters.class.getSimpleName() +
+                    if (!isAuxCompatible(sub.getType().getQualifiedName())) {
+                        throw new GenerationException("Illegal type for the public field in @" + AuxCounters.class.getSimpleName() + ".", sub);
+                    }
+                    String name = sub.getName();
+                    String meth = execMethod.getName();
+                    auxNames.put(meth, name);
+                    auxType.put(name, auxCountAnn.value());
+                    auxResettable.put(name, true);
+                    String prev = auxAccessors.put(meth + name, so.localIdentifier + "." + name);
+                    if (prev != null) {
+                        throw new GenerationException("Conflicting @" + AuxCounters.class.getSimpleName() +
                                 " counters. Make sure there are no @" + State.class.getSimpleName() + "-s with the same counter " +
                                 " injected into this method.", sub);
-                        }
                     }
                 }
             }
 
             for (MethodInfo sub : ci.getMethods()) {
                 if (sub.isPublic()) {
-                    String returnType = sub.getReturnType();
-                    if (returnType.equals("int") || returnType.equals("long")) {
-                        String name = sub.getName();
-                        String meth = execMethod.getName();
-                        auxNames.put(meth, name);
-                        String prev = auxAccessors.put(meth + name, so.localIdentifier + "." + name + "()");
-                        if (prev != null) {
-                            throw new GenerationException("Conflicting @" + AuxCounters.class.getSimpleName() +
-                                    " counters. Make sure there are no @" + State.class.getSimpleName() + "-s with the same counter " +
-                                    " injected into this method.", sub);
-                        }
+                    if (!isAuxCompatible(sub.getReturnType())) {
+                        throw new GenerationException("Illegal type for the return type of public method in @" + AuxCounters.class.getSimpleName() + ".", sub);
+                    }
+
+                    String name = sub.getName();
+                    String meth = execMethod.getName();
+                    auxNames.put(meth, name);
+                    auxType.put(name, auxCountAnn.value());
+                    auxResettable.put(name, false);
+                    String prev = auxAccessors.put(meth + name, so.localIdentifier + "." + name + "()");
+                    if (prev != null) {
+                        throw new GenerationException("Conflicting @" + AuxCounters.class.getSimpleName() +
+                                " counters. Make sure there are no @" + State.class.getSimpleName() + "-s with the same counter " +
+                                " injected into this method.", sub);
                     }
                 }
             }
@@ -348,6 +356,16 @@
         }
     }
 
+    private boolean isAuxCompatible(String typeName) {
+        if (typeName.equals("byte")     || typeName.equals("java.lang.Byte")) return true;
+        if (typeName.equals("short")    || typeName.equals("java.lang.Short")) return true;
+        if (typeName.equals("int")      || typeName.equals("java.lang.Integer")) return true;
+        if (typeName.equals("float")    || typeName.equals("java.lang.Float")) return true;
+        if (typeName.equals("long")     || typeName.equals("java.lang.Long")) return true;
+        if (typeName.equals("double")   || typeName.equals("java.lang.Double")) return true;
+        return false;
+    }
+
     private void checkParam(FieldInfo fi) {
         if (fi.isFinal()) {
             throw new GenerationException(
@@ -972,18 +990,38 @@
         return implicits.get(label);
     }
 
-    public Collection<String> getAuxResultNames(MethodInfo method) {
-        return auxNames.get(method.getName());
-    }
-
-    public String getAuxResultAccessor(MethodInfo method, String name) {
-        return auxAccessors.get(method.getName() + name);
-    }
-
     public void addImports(PrintWriter writer) {
         for (StateObject so : cons(stateObjects)) {
             writer.println("import " + so.packageName + "." + so.type + ";");
         }
     }
 
+    public Collection<String> getAuxResets(MethodInfo method) {
+        Collection<String> result = new ArrayList<String>();
+        for (String name : auxNames.get(method.getName())) {
+            if (auxResettable.get(name)) {
+                result.add(auxAccessors.get(method.getName() + name) + " = 0;");
+            }
+        }
+        return result;
+    }
+
+    public Collection<String> getAuxResults(MethodInfo method, String opResName) {
+        Collection<String> result = new ArrayList<String>();
+        for (String ops : auxNames.get(method.getName())) {
+            AuxCounters.Type type = auxType.get(ops);
+            switch (type) {
+                case OPERATIONS:
+                    result.add("new " + opResName + "(ResultRole.SECONDARY, \"" + ops + "\", " +
+                            auxAccessors.get(method.getName() + ops) + ", res.getTime(), benchmarkParams.getTimeUnit())");
+                    break;
+                case EVENTS:
+                    result.add("new ScalarResult(\"" + ops + "\", " + auxAccessors.get(method.getName() + ops) + ", \"#\", AggregationPolicy.SUM)");
+                    break;
+                default:
+                    throw new GenerationException("Unknown @" + AuxCounters.class + " type: " + type, method);
+            }
+        }
+        return result;
+    }
 }
--- a/jmh-core/src/main/java/org/openjdk/jmh/results/AverageTimeResult.java	Wed Sep 28 21:57:04 2016 +0200
+++ b/jmh-core/src/main/java/org/openjdk/jmh/results/AverageTimeResult.java	Thu Sep 29 17:44:27 2016 +0200
@@ -37,9 +37,9 @@
 public class AverageTimeResult extends Result<AverageTimeResult> {
     private static final long serialVersionUID = 6937689337229703312L;
 
-    public AverageTimeResult(ResultRole mode, String label, long operations, long durationNs, TimeUnit tu) {
+    public AverageTimeResult(ResultRole mode, String label, double operations, long durationNs, TimeUnit tu) {
         this(mode, label,
-                of(1.0D * durationNs / (operations * TimeUnit.NANOSECONDS.convert(1, tu))),
+                of(durationNs / (operations * TimeUnit.NANOSECONDS.convert(1, tu))),
                 TimeValue.tuToString(tu) + "/op");
     }
 
--- a/jmh-core/src/main/java/org/openjdk/jmh/results/ThroughputResult.java	Wed Sep 28 21:57:04 2016 +0200
+++ b/jmh-core/src/main/java/org/openjdk/jmh/results/ThroughputResult.java	Thu Sep 29 17:44:27 2016 +0200
@@ -37,9 +37,9 @@
 public class ThroughputResult extends Result<ThroughputResult> {
     private static final long serialVersionUID = 7269598073169413322L;
 
-    public ThroughputResult(ResultRole role, String label, long operations, long durationNs, TimeUnit outputTimeUnit) {
+    public ThroughputResult(ResultRole role, String label, double operations, long durationNs, TimeUnit outputTimeUnit) {
         this(role, label,
-                of(1.0D * operations * TimeUnit.NANOSECONDS.convert(1, outputTimeUnit) / durationNs),
+                of(operations * TimeUnit.NANOSECONDS.convert(1, outputTimeUnit) / durationNs),
                 "ops/" + TimeValue.tuToString(outputTimeUnit),
                 AggregationPolicy.SUM);
     }
--- a/jmh-samples/src/main/java/org/openjdk/jmh/samples/JMHSample_23_AuxCounters.java	Wed Sep 28 21:57:04 2016 +0200
+++ b/jmh-samples/src/main/java/org/openjdk/jmh/samples/JMHSample_23_AuxCounters.java	Thu Sep 29 17:44:27 2016 +0200
@@ -33,11 +33,9 @@
 import org.openjdk.jmh.annotations.AuxCounters;
 import org.openjdk.jmh.annotations.Benchmark;
 import org.openjdk.jmh.annotations.Fork;
-import org.openjdk.jmh.annotations.Level;
 import org.openjdk.jmh.annotations.Measurement;
 import org.openjdk.jmh.annotations.OutputTimeUnit;
 import org.openjdk.jmh.annotations.Scope;
-import org.openjdk.jmh.annotations.Setup;
 import org.openjdk.jmh.annotations.State;
 import org.openjdk.jmh.annotations.Warmup;
 import org.openjdk.jmh.runner.Runner;
@@ -48,8 +46,8 @@
 import java.util.concurrent.TimeUnit;
 
 @OutputTimeUnit(TimeUnit.SECONDS)
-@Warmup(iterations = 5, time = 100, timeUnit = TimeUnit.MILLISECONDS)
-@Measurement(iterations = 5, time = 100, timeUnit = TimeUnit.MILLISECONDS)
+@Warmup(iterations = 5, time = 1, timeUnit = TimeUnit.SECONDS)
+@Measurement(iterations = 5, time = 1, timeUnit = TimeUnit.SECONDS)
 @Fork(1)
 public class JMHSample_23_AuxCounters {
 
@@ -62,30 +60,35 @@
      * the limitations.
      */
 
-    @AuxCounters
     @State(Scope.Thread)
-    public static class AdditionalCounters {
-        public int case1, case2;
+    @AuxCounters(AuxCounters.Type.OPERATIONS)
+    public static class OpCounters {
+        // These fields would be counted as metrics
+        public int case1;
+        public int case2;
 
-        @Setup(Level.Iteration)
-        public void clean() {
-            case1 = case2 = 0;
-        }
-
+        // This accessor will also produce a metric
         public int total() {
             return case1 + case2;
         }
     }
 
+    @State(Scope.Thread)
+    @AuxCounters(AuxCounters.Type.EVENTS)
+    public static class EventCounters {
+        // This field would be counted as metric
+        public int wows;
+    }
+
     /*
      * This code measures the "throughput" in two parts of the branch.
      * The @AuxCounters state above holds the counters which we increment
      * ourselves, and then let JMH to use their values in the performance
-     * calculations. Note how we reset the counters on each iteration.
+     * calculations.
      */
 
     @Benchmark
-    public void measure(AdditionalCounters counters) {
+    public void splitBranch(OpCounters counters) {
         if (Math.random() < 0.1) {
             counters.case1++;
         } else {
@@ -93,6 +96,16 @@
         }
     }
 
+    @Benchmark
+    public void runSETI(EventCounters counters) {
+        float random = (float) Math.random();
+        float wowSignal = (float) Math.PI / 4;
+        if (random == wowSignal) {
+            // WOW, that's unusual.
+            counters.wows++;
+        }
+    }
+
     /*
      * ============================== HOW TO RUN THIS TEST: ====================================
      *