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

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

Issue 1128363003: Do not sample memory histograms in short idle notifications. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
« 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/v8.h" 5 #include "src/v8.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/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/base/once.h" 10 #include "src/base/once.h"
(...skipping 4626 matching lines...) Expand 10 before | Expand all | Expand 10 after
4637 heap_state.scavenge_speed_in_bytes_per_ms = 4637 heap_state.scavenge_speed_in_bytes_per_ms =
4638 static_cast<size_t>(tracer()->ScavengeSpeedInBytesPerMillisecond()); 4638 static_cast<size_t>(tracer()->ScavengeSpeedInBytesPerMillisecond());
4639 heap_state.used_new_space_size = new_space_.Size(); 4639 heap_state.used_new_space_size = new_space_.Size();
4640 heap_state.new_space_capacity = new_space_.Capacity(); 4640 heap_state.new_space_capacity = new_space_.Capacity();
4641 heap_state.new_space_allocation_throughput_in_bytes_per_ms = 4641 heap_state.new_space_allocation_throughput_in_bytes_per_ms =
4642 static_cast<size_t>( 4642 static_cast<size_t>(
4643 tracer()->NewSpaceAllocationThroughputInBytesPerMillisecond()); 4643 tracer()->NewSpaceAllocationThroughputInBytesPerMillisecond());
4644 4644
4645 GCIdleTimeAction action = 4645 GCIdleTimeAction action =
4646 gc_idle_time_handler_.Compute(idle_time_in_ms, heap_state); 4646 gc_idle_time_handler_.Compute(idle_time_in_ms, heap_state);
4647
4647 isolate()->counters()->gc_idle_time_allotted_in_ms()->AddSample( 4648 isolate()->counters()->gc_idle_time_allotted_in_ms()->AddSample(
4648 static_cast<int>(idle_time_in_ms)); 4649 static_cast<int>(idle_time_in_ms));
4649 int committed_memory = static_cast<int>(CommittedMemory() / KB); 4650 if (is_long_idle_notification) {
4650 int used_memory = static_cast<int>(heap_state.size_of_objects / KB); 4651 int committed_memory = static_cast<int>(CommittedMemory() / KB);
4651 isolate()->counters()->aggregated_memory_heap_committed()->AddSample( 4652 int used_memory = static_cast<int>(heap_state.size_of_objects / KB);
4652 start_ms, committed_memory); 4653 isolate()->counters()->aggregated_memory_heap_committed()->AddSample(
4653 isolate()->counters()->aggregated_memory_heap_used()->AddSample(start_ms, 4654 start_ms, committed_memory);
4654 used_memory); 4655 isolate()->counters()->aggregated_memory_heap_used()->AddSample(
4656 start_ms, used_memory);
4657 }
4655 4658
4656 bool result = false; 4659 bool result = false;
4657 switch (action.type) { 4660 switch (action.type) {
4658 case DONE: 4661 case DONE:
4659 result = true; 4662 result = true;
4660 break; 4663 break;
4661 case DO_INCREMENTAL_MARKING: { 4664 case DO_INCREMENTAL_MARKING: {
4662 if (incremental_marking()->IsStopped()) { 4665 if (incremental_marking()->IsStopped()) {
4663 incremental_marking()->Start(); 4666 incremental_marking()->Start();
4664 } 4667 }
(...skipping 1821 matching lines...) Expand 10 before | Expand all | Expand 10 after
6486 } 6489 }
6487 delete list; 6490 delete list;
6488 } else { 6491 } else {
6489 prev = list; 6492 prev = list;
6490 } 6493 }
6491 list = next; 6494 list = next;
6492 } 6495 }
6493 } 6496 }
6494 } 6497 }
6495 } // namespace v8::internal 6498 } // namespace v8::internal
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