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

Unified Diff: runtime/bin/gen_snapshot.cc

Issue 2517683002: Don't include usage counters, etc in snapshots with code. If we already have code, eagerly recompil… (Closed)
Patch Set: . Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/bin/log_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/gen_snapshot.cc
diff --git a/runtime/bin/gen_snapshot.cc b/runtime/bin/gen_snapshot.cc
index 53babb7c9ae823aa44e9bbe500a8ebba655c5cc2..a4018426bfaa76f4c4eb9cc43d170c7ce1b3e63f 100644
--- a/runtime/bin/gen_snapshot.cc
+++ b/runtime/bin/gen_snapshot.cc
@@ -995,7 +995,7 @@ static Dart_QualifiedFunctionName* ParseEntryPointsManifestIfPresent() {
if ((entries == NULL) && IsSnapshottingForPrecompilation()) {
Log::PrintErr(
"Could not find native embedder entry points during precompilation\n");
- exit(255);
+ exit(kErrorExitCode);
}
return entries;
}
@@ -1081,7 +1081,7 @@ static void SetupForUriResolution() {
Log::PrintErr("%s", Dart_GetError(result));
Dart_ExitScope();
Dart_ShutdownIsolate();
- exit(255);
+ exit(kErrorExitCode);
}
// This is a generic dart snapshot which needs builtin library setup.
Dart_Handle library =
@@ -1101,7 +1101,7 @@ static void SetupForGenericSnapshotCreation() {
Log::PrintErr("Errors encountered while loading: %s\n", err_msg);
Dart_ExitScope();
Dart_ShutdownIsolate();
- exit(255);
+ exit(kErrorExitCode);
}
}
@@ -1166,7 +1166,7 @@ int main(int argc, char** argv) {
// Parse command line arguments.
if (ParseArguments(argc, argv, &vm_options, &app_script_name) < 0) {
PrintUsage();
- return 255;
+ return kErrorExitCode;
}
Thread::InitOnce();
@@ -1183,6 +1183,7 @@ int main(int argc, char** argv) {
if (IsSnapshottingForPrecompilation()) {
vm_options.AddArgument("--precompilation");
+ vm_options.AddArgument("--print_snapshot_sizes");
#if TARGET_ARCH_ARM
// This is for the iPod Touch 5th Generation (and maybe other older devices)
vm_options.AddArgument("--no-use_integer_division");
@@ -1213,7 +1214,7 @@ int main(int argc, char** argv) {
if (error != NULL) {
Log::PrintErr("VM initialization failed: %s\n", error);
free(error);
- return 255;
+ return kErrorExitCode;
}
IsolateData* isolate_data = new IsolateData(NULL, commandline_package_root,
@@ -1223,7 +1224,7 @@ int main(int argc, char** argv) {
if (isolate == NULL) {
Log::PrintErr("Error: %s", error);
free(error);
- exit(255);
+ exit(kErrorExitCode);
}
Dart_Handle result;
@@ -1276,9 +1277,9 @@ int main(int argc, char** argv) {
NULL, isolate_data, &error)
: Dart_CreateIsolate(NULL, NULL, NULL, NULL, isolate_data, &error);
if (isolate == NULL) {
- fprintf(stderr, "%s", error);
+ Log::PrintErr("%s", error);
free(error);
- exit(255);
+ exit(kErrorExitCode);
}
Dart_EnterScope();
result = Dart_SetEnvironmentCallback(EnvironmentCallback);
« no previous file with comments | « no previous file | runtime/bin/log_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698