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

Unified Diff: src/debug/debug.cc

Issue 1423713018: [debugger] Move clearing of optimized code map out of GC. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_opt-code-map-rework-2
Patch Set: Addressed comments. Created 5 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 | src/heap/objects-visiting-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug/debug.cc
diff --git a/src/debug/debug.cc b/src/debug/debug.cc
index d99435c845756c5757a50498a5374662a8b22492..b680fdefd72e7070a58b2fb7530d05d424e2cda6 100644
--- a/src/debug/debug.cc
+++ b/src/debug/debug.cc
@@ -1305,8 +1305,16 @@ bool Debug::PrepareFunctionForBreakPoints(Handle<SharedFunctionInfo> shared) {
List<Handle<JSFunction> > functions;
List<Handle<JSGeneratorObject> > suspended_generators;
- if (!shared->optimized_code_map()->IsSmi()) {
- shared->ClearOptimizedCodeMap();
+ // Flush all optimized code maps. Note that the below heap iteration does not
+ // cover this, because the given function might have been inlined into code
+ // for which no JSFunction exists.
+ {
+ SharedFunctionInfo::Iterator iterator(isolate_);
+ while (SharedFunctionInfo* shared = iterator.Next()) {
+ if (!shared->optimized_code_map()->IsSmi()) {
+ shared->ClearOptimizedCodeMap();
+ }
+ }
}
// Make sure we abort incremental marking.
« no previous file with comments | « no previous file | src/heap/objects-visiting-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698