comparison jvmci/jdk.vm.ci.common/src/jdk/vm/ci/common/InitTimer.java @ 23700:9e1235406b59

[Findbugs] various warnings reported for JVMCI sources (JDK-8159613)
author Doug Simon <doug.simon@oracle.com>
date Sat, 18 Jun 2016 13:19:01 +0200
parents 3e8ce13f4e12
children
comparison
equal deleted inserted replaced
23699:8f9709f61cd4 23700:9e1235406b59
28 * A facility for timing a step in the runtime initialization sequence. This is independent from all 28 * A facility for timing a step in the runtime initialization sequence. This is independent from all
29 * other JVMCI code so as to not perturb the initialization sequence. It is enabled by setting the 29 * other JVMCI code so as to not perturb the initialization sequence. It is enabled by setting the
30 * {@code "jvmci.inittimer"} system property to {@code "true"}. 30 * {@code "jvmci.inittimer"} system property to {@code "true"}.
31 */ 31 */
32 public final class InitTimer implements AutoCloseable { 32 public final class InitTimer implements AutoCloseable {
33 final String name; 33 private final String name;
34 final long start; 34 private final long start;
35 35
36 private InitTimer(String name) { 36 private InitTimer(String name) {
37 int n = nesting.getAndIncrement(); 37 int n = nesting.getAndIncrement();
38 if (n == 0) { 38 if (n == 0) {
39 initializingThread = Thread.currentThread(); 39 initializingThread = Thread.currentThread();
74 public static final String SPACES = " "; 74 public static final String SPACES = " ";
75 75
76 /** 76 /**
77 * Used to assert the invariant that all related initialization happens on the same thread. 77 * Used to assert the invariant that all related initialization happens on the same thread.
78 */ 78 */
79 public static Thread initializingThread; 79 static Thread initializingThread;
80 } 80 }