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

Side by Side Diff: src/heap/mark-compact.cc

Issue 1943423002: Updates incremental marking pass to collect object statistics. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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
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/mark-compact.h" 5 #include "src/heap/mark-compact.h"
6 6
7 #include "src/base/atomicops.h" 7 #include "src/base/atomicops.h"
8 #include "src/base/bits.h" 8 #include "src/base/bits.h"
9 #include "src/base/sys-info.h" 9 #include "src/base/sys-info.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 1275 matching lines...) Expand 10 before | Expand all | Expand 10 after
1286 UpdateRegExpCodeAgeAndFlush(heap, re, true); 1286 UpdateRegExpCodeAgeAndFlush(heap, re, true);
1287 UpdateRegExpCodeAgeAndFlush(heap, re, false); 1287 UpdateRegExpCodeAgeAndFlush(heap, re, false);
1288 // Visit the fields of the RegExp, including the updated FixedArray. 1288 // Visit the fields of the RegExp, including the updated FixedArray.
1289 VisitJSRegExp(map, object); 1289 VisitJSRegExp(map, object);
1290 } 1290 }
1291 }; 1291 };
1292 1292
1293 1293
1294 void MarkCompactMarkingVisitor::Initialize() { 1294 void MarkCompactMarkingVisitor::Initialize() {
1295 StaticMarkingVisitor<MarkCompactMarkingVisitor>::Initialize(); 1295 StaticMarkingVisitor<MarkCompactMarkingVisitor>::Initialize();
1296
1297 table_.Register(kVisitJSRegExp, &VisitRegExpAndFlushCode); 1296 table_.Register(kVisitJSRegExp, &VisitRegExpAndFlushCode);
1298
1299 if (FLAG_track_gc_object_stats) {
1300 ObjectStatsVisitor::Initialize(&table_);
1301 }
1302 } 1297 }
1303 1298
1304 1299
1305 class CodeMarkingVisitor : public ThreadVisitor { 1300 class CodeMarkingVisitor : public ThreadVisitor {
1306 public: 1301 public:
1307 explicit CodeMarkingVisitor(MarkCompactCollector* collector) 1302 explicit CodeMarkingVisitor(MarkCompactCollector* collector)
1308 : collector_(collector) {} 1303 : collector_(collector) {}
1309 1304
1310 void VisitThread(Isolate* isolate, ThreadLocalTop* top) { 1305 void VisitThread(Isolate* isolate, ThreadLocalTop* top) {
1311 collector_->PrepareThreadForCodeFlushing(isolate, top); 1306 collector_->PrepareThreadForCodeFlushing(isolate, top);
(...skipping 2635 matching lines...) Expand 10 before | Expand all | Expand 10 after
3947 MarkBit mark_bit = Marking::MarkBitFrom(host); 3942 MarkBit mark_bit = Marking::MarkBitFrom(host);
3948 if (Marking::IsBlack(mark_bit)) { 3943 if (Marking::IsBlack(mark_bit)) {
3949 RelocInfo rinfo(isolate(), pc, RelocInfo::CODE_TARGET, 0, host); 3944 RelocInfo rinfo(isolate(), pc, RelocInfo::CODE_TARGET, 0, host);
3950 RecordRelocSlot(host, &rinfo, target); 3945 RecordRelocSlot(host, &rinfo, target);
3951 } 3946 }
3952 } 3947 }
3953 } 3948 }
3954 3949
3955 } // namespace internal 3950 } // namespace internal
3956 } // namespace v8 3951 } // namespace v8
OLDNEW
« src/heap/incremental-marking.cc ('K') | « src/heap/incremental-marking.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698