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

Side by Side Diff: src/heap/heap.cc

Issue 1771753002: Revert of Use v8::kGCCallbackFlagCollectAllAvailableGarbage in Heap::CollectAllAvailableGarbage (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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
« 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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/heap/heap.h" 5 #include "src/heap/heap.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api.h" 8 #include "src/api.h"
9 #include "src/ast/scopeinfo.h" 9 #include "src/ast/scopeinfo.h"
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 877 matching lines...) Expand 10 before | Expand all | Expand 10 after
888 DisallowHeapAllocation no_recursive_gc; 888 DisallowHeapAllocation no_recursive_gc;
889 isolate()->optimizing_compile_dispatcher()->Flush(); 889 isolate()->optimizing_compile_dispatcher()->Flush();
890 } 890 }
891 isolate()->ClearSerializerData(); 891 isolate()->ClearSerializerData();
892 set_current_gc_flags(kMakeHeapIterableMask | kReduceMemoryFootprintMask); 892 set_current_gc_flags(kMakeHeapIterableMask | kReduceMemoryFootprintMask);
893 isolate_->compilation_cache()->Clear(); 893 isolate_->compilation_cache()->Clear();
894 const int kMaxNumberOfAttempts = 7; 894 const int kMaxNumberOfAttempts = 7;
895 const int kMinNumberOfAttempts = 2; 895 const int kMinNumberOfAttempts = 2;
896 for (int attempt = 0; attempt < kMaxNumberOfAttempts; attempt++) { 896 for (int attempt = 0; attempt < kMaxNumberOfAttempts; attempt++) {
897 if (!CollectGarbage(MARK_COMPACTOR, gc_reason, NULL, 897 if (!CollectGarbage(MARK_COMPACTOR, gc_reason, NULL,
898 v8::kGCCallbackFlagCollectAllAvailableGarbage) && 898 v8::kGCCallbackFlagForced) &&
899 attempt + 1 >= kMinNumberOfAttempts) { 899 attempt + 1 >= kMinNumberOfAttempts) {
900 break; 900 break;
901 } 901 }
902 } 902 }
903 set_current_gc_flags(kNoGCFlags); 903 set_current_gc_flags(kNoGCFlags);
904 new_space_.Shrink(); 904 new_space_.Shrink();
905 UncommitFromSpace(); 905 UncommitFromSpace();
906 } 906 }
907 907
908 908
(...skipping 5435 matching lines...) Expand 10 before | Expand all | Expand 10 after
6344 } 6344 }
6345 6345
6346 6346
6347 // static 6347 // static
6348 int Heap::GetStaticVisitorIdForMap(Map* map) { 6348 int Heap::GetStaticVisitorIdForMap(Map* map) {
6349 return StaticVisitorBase::GetVisitorId(map); 6349 return StaticVisitorBase::GetVisitorId(map);
6350 } 6350 }
6351 6351
6352 } // namespace internal 6352 } // namespace internal
6353 } // namespace v8 6353 } // namespace v8
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