< prev index next >

src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/SnippetTemplate.java

Print this page

        

*** 222,241 **** return true; } } /** ! * Times instantiations of all templates derived form this snippet. ! * ! * @see SnippetTemplate#instantiationTimer */ private final TimerKey instantiationTimer; /** * Counts instantiations of all templates derived from this snippet. - * - * @see SnippetTemplate#instantiationCounter */ private final CounterKey instantiationCounter; protected abstract Lazy lazy(); --- 222,237 ---- return true; } } /** ! * Times instantiations of all templates derived from this snippet. */ private final TimerKey instantiationTimer; /** * Counts instantiations of all templates derived from this snippet. */ private final CounterKey instantiationCounter; protected abstract Lazy lazy();
*** 704,715 **** this.snippetReflection = snippetReflection; this.info = args.info; Object[] constantArgs = getConstantArgs(args); StructuredGraph snippetGraph = providers.getReplacements().getSnippet(args.info.method, args.info.original, constantArgs); - instantiationTimer = DebugContext.timer("SnippetTemplateInstantiationTime[%#s]", args); - instantiationCounter = DebugContext.counter("SnippetTemplateInstantiationCount[%#s]", args); ResolvedJavaMethod method = snippetGraph.method(); Signature signature = method.getSignature(); PhaseContext phaseContext = new PhaseContext(providers); --- 700,709 ----
*** 1076,1099 **** * The nodes to be inlined when this specialization is instantiated. */ private final ArrayList<Node> nodes; /** - * Times instantiations of this template. - * - * @see SnippetInfo#instantiationTimer - */ - private final TimerKey instantiationTimer; - - /** - * Counts instantiations of this template. - * - * @see SnippetInfo#instantiationCounter - */ - private final CounterKey instantiationCounter; - - /** * Gets the instantiation-time bindings to this template's parameters. * * @return the map that will be used to bind arguments to parameters when inlining this template */ private EconomicMap<Node, Node> bind(StructuredGraph replaceeGraph, MetaAccessProvider metaAccess, Arguments args) { --- 1070,1079 ----
*** 1404,1416 **** */ @SuppressWarnings("try") public UnmodifiableEconomicMap<Node, Node> instantiate(MetaAccessProvider metaAccess, FixedNode replacee, UsageReplacer replacer, Arguments args, boolean killReplacee) { DebugContext debug = replacee.getDebug(); assert assertSnippetKills(replacee); ! try (DebugCloseable a = args.info.instantiationTimer.start(debug); DebugCloseable b = instantiationTimer.start(debug)) { args.info.instantiationCounter.increment(debug); - instantiationCounter.increment(debug); // Inline the snippet nodes, replacing parameters with the given args in the process StartNode entryPointNode = snippet.start(); FixedNode firstCFGNode = entryPointNode.next(); StructuredGraph replaceeGraph = replacee.graph(); EconomicMap<Node, Node> replacements = bind(replaceeGraph, metaAccess, args); --- 1384,1395 ---- */ @SuppressWarnings("try") public UnmodifiableEconomicMap<Node, Node> instantiate(MetaAccessProvider metaAccess, FixedNode replacee, UsageReplacer replacer, Arguments args, boolean killReplacee) { DebugContext debug = replacee.getDebug(); assert assertSnippetKills(replacee); ! try (DebugCloseable a = args.info.instantiationTimer.start(debug)) { args.info.instantiationCounter.increment(debug); // Inline the snippet nodes, replacing parameters with the given args in the process StartNode entryPointNode = snippet.start(); FixedNode firstCFGNode = entryPointNode.next(); StructuredGraph replaceeGraph = replacee.graph(); EconomicMap<Node, Node> replacements = bind(replaceeGraph, metaAccess, args);
*** 1559,1569 **** public void instantiate(MetaAccessProvider metaAccess, FloatingNode replacee, UsageReplacer replacer, LoweringTool tool, Arguments args) { DebugContext debug = replacee.getDebug(); assert assertSnippetKills(replacee); try (DebugCloseable a = args.info.instantiationTimer.start(debug)) { args.info.instantiationCounter.increment(debug); - instantiationCounter.increment(debug); // Inline the snippet nodes, replacing parameters with the given args in the process StartNode entryPointNode = snippet.start(); FixedNode firstCFGNode = entryPointNode.next(); StructuredGraph replaceeGraph = replacee.graph(); --- 1538,1547 ----
*** 1612,1622 **** public void instantiate(MetaAccessProvider metaAccess, FloatingNode replacee, UsageReplacer replacer, Arguments args) { DebugContext debug = replacee.getDebug(); assert assertSnippetKills(replacee); try (DebugCloseable a = args.info.instantiationTimer.start(debug)) { args.info.instantiationCounter.increment(debug); - instantiationCounter.increment(debug); // Inline the snippet nodes, replacing parameters with the given args in the process StartNode entryPointNode = snippet.start(); assert entryPointNode.next() == (memoryAnchor == null ? returnNode : memoryAnchor) : entryPointNode.next(); StructuredGraph replaceeGraph = replacee.graph(); --- 1590,1599 ----
< prev index next >