Java 类org.openjdk.jmh.annotations.Scope 实例源码
项目:openjdk-jdk10
文件:GraalCompilerState.java
@SuppressWarnings("try")
protected void initializeMethod() {
GraalState graal = new GraalState();
ResolvedJavaMethod method = graal.metaAccess.lookupJavaMethod(getMethod());
StructuredGraph structuredGraph = null;
try (DebugContext.Scope s = debug.scope("GraphState", method)) {
structuredGraph = preprocessOriginal(getGraph(graal, method, useProfilingInfo()));
} catch (Throwable t) {
debug.handle(t);
}
this.originalGraph = structuredGraph;
}
项目:openjdk-jdk10
文件:GraphState.java
@SuppressWarnings("try")
public GraphState() {
GraalState graal = new GraalState();
DebugContext debug = graal.debug;
ResolvedJavaMethod method = graal.metaAccess.lookupJavaMethod(getMethodFromMethodSpec(getClass()));
StructuredGraph structuredGraph = null;
try (DebugContext.Scope s = debug.scope("GraphState", method)) {
structuredGraph = preprocessOriginal(getGraph(graal, method));
} catch (Throwable t) {
debug.handle(t);
}
this.originalGraph = structuredGraph;
}
项目:graal-core
文件:GraalCompilerState.java
@SuppressWarnings("try")
protected void initializeMethod() {
GraalState graal = new GraalState();
ResolvedJavaMethod method = graal.metaAccess.lookupJavaMethod(getMethod());
StructuredGraph structuredGraph = null;
try (Debug.Scope s = Debug.scope("GraphState", method)) {
structuredGraph = preprocessOriginal(getGraph(graal, method, useProfilingInfo()));
} catch (Throwable t) {
Debug.handle(t);
}
this.originalGraph = structuredGraph;
}
项目:graal-core
文件:GraphState.java
@SuppressWarnings("try")
public GraphState() {
GraalState graal = new GraalState();
// Ensure a debug configuration for this thread is initialized
DebugEnvironment.ensureInitialized(graal.options);
ResolvedJavaMethod method = graal.metaAccess.lookupJavaMethod(getMethodFromMethodSpec(getClass()));
StructuredGraph structuredGraph = null;
try (Debug.Scope s = Debug.scope("GraphState", method)) {
structuredGraph = preprocessOriginal(getGraph(graal, method));
} catch (Throwable t) {
Debug.handle(t);
}
this.originalGraph = structuredGraph;
}
项目:jmh
文件:Identifiers.java
public String identifier(Scope scope) {
switch (scope) {
case Benchmark:
case Group: {
return "G";
}
case Thread: {
return String.valueOf(index++);
}
default:
throw new GenerationException("Unknown scope: " + scope, null);
}
}
项目:jmh
文件:StateObject.java
public StateObject(Identifiers identifiers, ClassInfo info, Scope scope) {
this.packageName = info.getPackageName() + ".generated";
this.userType = info.getQualifiedName();
this.type = identifiers.getJMHtype(info);
this.scope = scope;
String id = identifiers.collapseTypeName(userType) + identifiers.identifier(scope);
this.localIdentifier = "l_" + id;
this.fieldIdentifier = "f_" + id;
this.params = new TreeMap<String, FieldInfo>();
this.helpers = new TreeSet<HelperMethodInvocation>();
}
项目:jmh
文件:StateObjectHandler.java
public void bindImplicit(ClassInfo ci, String label, Scope scope) {
State ann = BenchmarkGeneratorUtils.getAnnSuper(ci, State.class);
StateObject so = new StateObject(identifiers, ci, (ann != null) ? ann.value() : scope);
stateObjects.add(so);
implicits.put(label, so);
bindState(null, so, ci);
Set<StateObject> seen = new HashSet<StateObject>();
recursiveStateResolve(null, ci, so, seen);
}