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

Side by Side Diff: src/compiler.cc

Issue 16410005: Do not GC prior to every parallel recompile. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 932 matching lines...) Expand 10 before | Expand all | Expand 10 after
943 shared->set_language_mode(language_mode); 943 shared->set_language_mode(language_mode);
944 info->SaveHandles(); 944 info->SaveHandles();
945 945
946 if (Rewriter::Rewrite(*info) && Scope::Analyze(*info)) { 946 if (Rewriter::Rewrite(*info) && Scope::Analyze(*info)) {
947 OptimizingCompiler* compiler = 947 OptimizingCompiler* compiler =
948 new(info->zone()) OptimizingCompiler(*info); 948 new(info->zone()) OptimizingCompiler(*info);
949 OptimizingCompiler::Status status = compiler->CreateGraph(); 949 OptimizingCompiler::Status status = compiler->CreateGraph();
950 if (status == OptimizingCompiler::SUCCEEDED) { 950 if (status == OptimizingCompiler::SUCCEEDED) {
951 info.Detach(); 951 info.Detach();
952 shared->code()->set_profiler_ticks(0); 952 shared->code()->set_profiler_ticks(0);
953 // Do a scavenge to put off the next scavenge as far as possible.
954 // This may ease the issue that GVN blocks the next scavenge.
955 isolate->heap()->CollectGarbage(NEW_SPACE, "parallel recompile");
956 isolate->optimizing_compiler_thread()->QueueForOptimization(compiler); 953 isolate->optimizing_compiler_thread()->QueueForOptimization(compiler);
957 } else if (status == OptimizingCompiler::BAILED_OUT) { 954 } else if (status == OptimizingCompiler::BAILED_OUT) {
958 isolate->clear_pending_exception(); 955 isolate->clear_pending_exception();
959 InstallFullCode(*info); 956 InstallFullCode(*info);
960 } 957 }
961 } 958 }
962 } 959 }
963 } 960 }
964 961
965 if (shared->code()->back_edges_patched_for_osr()) { 962 if (shared->code()->back_edges_patched_for_osr()) {
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
1164 } 1161 }
1165 } 1162 }
1166 1163
1167 GDBJIT(AddCode(Handle<String>(shared->DebugName()), 1164 GDBJIT(AddCode(Handle<String>(shared->DebugName()),
1168 Handle<Script>(info->script()), 1165 Handle<Script>(info->script()),
1169 Handle<Code>(info->code()), 1166 Handle<Code>(info->code()),
1170 info)); 1167 info));
1171 } 1168 }
1172 1169
1173 } } // namespace v8::internal 1170 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698