public void print() { print(totalTime); }
@Override public void close() { stop(); } }
try { String imageName = universe.getBigBang().getHostVM().getImageName(); try (StopTimer t = new Timer(imageName, "(parse)").start()) { parseAll(); try (StopTimer ignored = new Timer(imageName, "(inline)").start()) { inlineTrivialMethods(debug); try (StopTimer t = new Timer(imageName, "(compile)").start()) { compileAll();
return -1; Timer totalTimer = new Timer("[total]", false); ForkJoinPool analysisExecutor = null; ForkJoinPool compilationExecutor = null; OptionValues parsedHostedOptions = null; try (StopTimer ignored = totalTimer.start()) { ImageClassLoader imageClassLoader; Timer classlistTimer = new Timer("classlist", false); try (StopTimer ignored1 = classlistTimer.start()) { imageClassLoader = ImageClassLoader.create(NativeImageGenerator.defaultPlatform(classLoader), classpath, classLoader); totalTimer.setPrefix(imageName); classlistTimer.setPrefix(imageName); classlistTimer.print(); ImageSingletonsSupportImpl.HostedManagement.clearInThread(); totalTimer.print(); return 0;
try (StopTimer t = new Timer(imageName, "analysis").start()) { Timer processFeaturesTimer = new Timer(imageName, "(features)", false); try (StopTimer t2 = processFeaturesTimer.start()) { int numTypes = aUniverse.getTypes().size(); int numMethods = aUniverse.getMethods().size(); bigbang.typeFlowTimer.print(); bigbang.checkObjectsTimer.print(); processFeaturesTimer.print();
@SuppressWarnings("try") public boolean doTypeflow() throws InterruptedException { boolean didSomeWork; try (StopTimer ignored = typeFlowTimer.start()) { executor.start(); executor.complete(); didSomeWork = (executor.getPostedOperations() > 0); executor.shutdown(); } /* Initialize for the next iteration. */ executor.init(timing); return didSomeWork; }
@SuppressWarnings("try") private NativeLibraries setupNativeLibraries(String imageName, ConstantReflectionProvider aConstantReflection, MetaAccessProvider aMetaAccess, SnippetReflectionProvider aSnippetReflection, CEnumCallWrapperSubstitutionProcessor cEnumProcessor) { try (StopTimer ignored = new Timer(imageName, "(cap)").start()) { NativeLibraries nativeLibs = new NativeLibraries(aConstantReflection, aMetaAccess, aSnippetReflection, ConfigurationValues.getTarget()); cEnumProcessor.setNativeLibraries(nativeLibs); processNativeLibraryImports(nativeLibs, aMetaAccess); ImageSingletons.add(SizeOfSupport.class, new SizeOfSupportImpl(nativeLibs, aMetaAccess)); ImageSingletons.add(CConstantValueSupport.class, new CConstantValueSupportImpl(nativeLibs, aMetaAccess)); if (CAnnotationProcessorCache.Options.ExitAfterCAPCache.getValue()) { throw new InterruptImageBuilding("Exiting image generation because of " + SubstrateOptionsParser.commandArgument(CAnnotationProcessorCache.Options.ExitAfterCAPCache, "+")); } return nativeLibs; } }
try (StopTimer t = checkObjectsTimer.start()) {
HostedMetaAccess hMetaAccess; SharedRuntimeConfigurationBuilder runtime; try (StopTimer t = new Timer(imageName, "universe").start()) { hUniverse = new HostedUniverse(bigbang); hMetaAccess = new HostedMetaAccess(hUniverse, bigbang.getMetaAccess()); try (StopTimer t = new Timer(imageName, "compile").start()) { compileQueue = HostedConfiguration.instance().createCompileQueue(debug, featureHandler, hUniverse, runtime, DeoptTester.enabled(), bigbang.getProviders().getSnippetReflection(), compilationExecutor); try (StopTimer t = new Timer(imageName, "image").start()) { featureHandler.forEachFeature(feature -> feature.beforeImageWrite(beforeConfig)); try (StopTimer t = new Timer(imageName, "write").start()) {
public void stop() { long addTime = System.nanoTime() - startTime; totalTime += addTime; if (autoPrint) { print(addTime); } }
ForkJoinPool analysisExecutor, SnippetReflectionProvider originalSnippetReflection, DebugContext debug) { try (Indent ignored = debug.logAndIndent("setup native-image builder")) { try (StopTimer ignored1 = new Timer(imageName, "setup").start()) { Platform platform = defaultPlatform(loader.getClassLoader()); SubstrateTargetDescription target = createTarget(platform);