[heap] Add store and slots buffer clearing timers to --trace-gc-nvp.

Review URL: https://codereview.chromium.org/1412123006

Cr-Commit-Position: refs/heads/master@{#31515}
This commit is contained in:
hpayer 2015-10-23 04:20:27 -07:00 committed by Commit bot
parent 505efa5a72
commit 20df4b7fcf
3 changed files with 19 additions and 5 deletions

View File

@ -485,6 +485,8 @@ void GCTracer::PrintNVP() const {
"mark_weakrefs=%.1f "
"mark_globalhandles=%.1f "
"mark_codeflush=%.1f "
"store_buffer_clear=%.1f "
"slots_buffer_clear=%.1f "
"sweep=%.2f "
"sweepns=%.2f "
"sweepos=%.2f "
@ -548,6 +550,8 @@ void GCTracer::PrintNVP() const {
current_.scopes[Scope::MC_MARK_WEAK_REFERENCES],
current_.scopes[Scope::MC_MARK_GLOBAL_HANDLES],
current_.scopes[Scope::MC_MARK_CODE_FLUSH],
current_.scopes[Scope::MC_STORE_BUFFER_CLEAR],
current_.scopes[Scope::MC_SLOTS_BUFFER_CLEAR],
current_.scopes[Scope::MC_SWEEP],
current_.scopes[Scope::MC_SWEEP_NEWSPACE],
current_.scopes[Scope::MC_SWEEP_OLDSPACE],

View File

@ -109,6 +109,8 @@ class GCTracer {
MC_MARK_WEAK_REFERENCES,
MC_MARK_GLOBAL_HANDLES,
MC_MARK_CODE_FLUSH,
MC_STORE_BUFFER_CLEAR,
MC_SLOTS_BUFFER_CLEAR,
MC_SWEEP,
MC_SWEEP_NEWSPACE,
MC_SWEEP_OLDSPACE,

View File

@ -297,12 +297,20 @@ bool MarkCompactCollector::StartCompaction(CompactionMode mode) {
void MarkCompactCollector::ClearInvalidStoreAndSlotsBufferEntries() {
heap_->store_buffer()->ClearInvalidStoreBufferEntries();
{
GCTracer::Scope gc_scope(heap()->tracer(),
GCTracer::Scope::MC_STORE_BUFFER_CLEAR);
heap_->store_buffer()->ClearInvalidStoreBufferEntries();
}
int number_of_pages = evacuation_candidates_.length();
for (int i = 0; i < number_of_pages; i++) {
Page* p = evacuation_candidates_[i];
SlotsBuffer::RemoveInvalidSlots(heap_, p->slots_buffer());
{
GCTracer::Scope gc_scope(heap()->tracer(),
GCTracer::Scope::MC_SLOTS_BUFFER_CLEAR);
int number_of_pages = evacuation_candidates_.length();
for (int i = 0; i < number_of_pages; i++) {
Page* p = evacuation_candidates_[i];
SlotsBuffer::RemoveInvalidSlots(heap_, p->slots_buffer());
}
}
}