Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(405)

Side by Side Diff: pkg/compiler/tool/perf.dart

Issue 2800643002: Register deferred load impact through ResolutionEnqueuerListener (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /// An entrypoint used to run portions of dart2js and measure its performance. 5 /// An entrypoint used to run portions of dart2js and measure its performance.
6 library compiler.tool.perf; 6 library compiler.tool.perf;
7 7
8 import 'dart:async'; 8 import 'dart:async';
9 import 'dart:io'; 9 import 'dart:io';
10 10
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 supportSerialization: serialization.supportSerialization); 358 supportSerialization: serialization.supportSerialization);
359 359
360 phase = Compiler.PHASE_RESOLVING; 360 phase = Compiler.PHASE_RESOLVING;
361 resolutionEnqueuer.applyImpact(mainImpact); 361 resolutionEnqueuer.applyImpact(mainImpact);
362 // Note: we enqueue everything in the program so we measure generating 362 // Note: we enqueue everything in the program so we measure generating
363 // kernel for the entire code, not just what's reachable from main. 363 // kernel for the entire code, not just what's reachable from main.
364 libraryLoader.libraries.forEach((LibraryElement library) { 364 libraryLoader.libraries.forEach((LibraryElement library) {
365 resolutionEnqueuer.applyImpact(computeImpactForLibrary(library)); 365 resolutionEnqueuer.applyImpact(computeImpactForLibrary(library));
366 }); 366 });
367 367
368 if (deferredLoadTask.isProgramSplit) {
369 resolutionEnqueuer
370 .applyImpact(backend.computeDeferredLoadingImpact());
371 }
372 resolveLibraryMetadata(); 368 resolveLibraryMetadata();
373 reporter.log('Resolving...'); 369 reporter.log('Resolving...');
374 processQueue(resolutionEnqueuer, mainFunction, libraryLoader.libraries); 370 processQueue(resolutionEnqueuer, mainFunction, libraryLoader.libraries);
375 resolutionEnqueuer.logSummary(reporter.log); 371 resolutionEnqueuer.logSummary(reporter.log);
376 372
377 (reporter as CompilerDiagnosticReporter) 373 (reporter as CompilerDiagnosticReporter)
378 .reportSuppressedMessagesSummary(); 374 .reportSuppressedMessagesSummary();
379 375
380 if (compilationFailed) { 376 if (compilationFailed) {
381 // TODO(sigmund): more diagnostics? 377 // TODO(sigmund): more diagnostics?
382 print('compilation failed!'); 378 print('compilation failed!');
383 exit(1); 379 exit(1);
384 } 380 }
385 381
386 closeResolution(); 382 closeResolution();
387 var program = (backend as dynamic).kernelTask.program; 383 var program = (backend as dynamic).kernelTask.program;
388 print('total libraries: ${program.libraries.length}'); 384 print('total libraries: ${program.libraries.length}');
389 }); 385 });
390 } 386 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_backend/resolution_listener.dart ('k') | tests/compiler/dart2js/kernel/closed_world_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698