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

Side by Side Diff: src/runtime.cc

Issue 19956004: Flush parallel recompilation queues on context dispose notification. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 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 | « src/optimizing-compiler-thread.cc ('k') | test/cctest/test-deoptimization.cc » ('j') | 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 8442 matching lines...) Expand 10 before | Expand all | Expand 10 after
8453 } 8453 }
8454 bool sync_with_compiler_thread = true; 8454 bool sync_with_compiler_thread = true;
8455 if (args.length() == 2) { 8455 if (args.length() == 2) {
8456 CONVERT_ARG_HANDLE_CHECKED(String, sync, 1); 8456 CONVERT_ARG_HANDLE_CHECKED(String, sync, 1);
8457 if (sync->IsOneByteEqualTo(STATIC_ASCII_VECTOR("no sync"))) { 8457 if (sync->IsOneByteEqualTo(STATIC_ASCII_VECTOR("no sync"))) {
8458 sync_with_compiler_thread = false; 8458 sync_with_compiler_thread = false;
8459 } 8459 }
8460 } 8460 }
8461 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0); 8461 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
8462 if (FLAG_parallel_recompilation && sync_with_compiler_thread) { 8462 if (FLAG_parallel_recompilation && sync_with_compiler_thread) {
8463 while (function->IsMarkedForParallelRecompilation() || 8463 while (function->IsInRecompileQueue() ||
8464 function->IsInRecompileQueue() ||
8465 function->IsMarkedForInstallingRecompiledCode()) { 8464 function->IsMarkedForInstallingRecompiledCode()) {
8466 isolate->optimizing_compiler_thread()->InstallOptimizedFunctions(); 8465 isolate->optimizing_compiler_thread()->InstallOptimizedFunctions();
8467 OS::Sleep(50); 8466 OS::Sleep(50);
8468 } 8467 }
8469 } 8468 }
8470 if (FLAG_always_opt) { 8469 if (FLAG_always_opt) {
8471 // We may have always opt, but that is more best-effort than a real 8470 // We may have always opt, but that is more best-effort than a real
8472 // promise, so we still say "no" if it is not optimized. 8471 // promise, so we still say "no" if it is not optimized.
8473 return function->IsOptimized() ? Smi::FromInt(3) // 3 == "always". 8472 return function->IsOptimized() ? Smi::FromInt(3) // 3 == "always".
8474 : Smi::FromInt(2); // 2 == "no". 8473 : Smi::FromInt(2); // 2 == "no".
(...skipping 5490 matching lines...) Expand 10 before | Expand all | Expand 10 after
13965 // Handle last resort GC and make sure to allow future allocations 13964 // Handle last resort GC and make sure to allow future allocations
13966 // to grow the heap without causing GCs (if possible). 13965 // to grow the heap without causing GCs (if possible).
13967 isolate->counters()->gc_last_resort_from_js()->Increment(); 13966 isolate->counters()->gc_last_resort_from_js()->Increment();
13968 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, 13967 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags,
13969 "Runtime::PerformGC"); 13968 "Runtime::PerformGC");
13970 } 13969 }
13971 } 13970 }
13972 13971
13973 13972
13974 } } // namespace v8::internal 13973 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/optimizing-compiler-thread.cc ('k') | test/cctest/test-deoptimization.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698