當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。