当前位置: 首页>>代码示例>>Java>>正文


Java Scope类代码示例

本文整理汇总了Java中org.openjdk.jmh.annotations.Scope的典型用法代码示例。如果您正苦于以下问题:Java Scope类的具体用法?Java Scope怎么用?Java Scope使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Scope类属于org.openjdk.jmh.annotations包,在下文中一共展示了Scope类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initializeMethod

import org.openjdk.jmh.annotations.Scope; //导入依赖的package包/类
@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;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:13,代码来源:GraalCompilerState.java

示例2: GraphState

import org.openjdk.jmh.annotations.Scope; //导入依赖的package包/类
@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;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:14,代码来源:GraphState.java

示例3: initializeMethod

import org.openjdk.jmh.annotations.Scope; //导入依赖的package包/类
@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;
}
 
开发者ID:graalvm,项目名称:graal-core,代码行数:13,代码来源:GraalCompilerState.java

示例4: GraphState

import org.openjdk.jmh.annotations.Scope; //导入依赖的package包/类
@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;
}
 
开发者ID:graalvm,项目名称:graal-core,代码行数:16,代码来源:GraphState.java

示例5: identifier

import org.openjdk.jmh.annotations.Scope; //导入依赖的package包/类
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);
    }
}
 
开发者ID:msteindorfer,项目名称:jmh,代码行数:14,代码来源:Identifiers.java

示例6: StateObject

import org.openjdk.jmh.annotations.Scope; //导入依赖的package包/类
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>();
}
 
开发者ID:msteindorfer,项目名称:jmh,代码行数:14,代码来源:StateObject.java

示例7: bindImplicit

import org.openjdk.jmh.annotations.Scope; //导入依赖的package包/类
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);
}
 
开发者ID:msteindorfer,项目名称:jmh,代码行数:11,代码来源:StateObjectHandler.java


注:本文中的org.openjdk.jmh.annotations.Scope类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。