Reviewers: Hannes Payer,
Message:
PTAL. In the next CL I will remove long_idle_notification handling when
transitioning to reduce memory mode.
https://codereview.chromium.org/1159153003/diff/1/src/heap/heap.cc
File src/heap/heap.cc (left):
https://codereview.chromium.org/1159153003/diff/1/src/heap/heap.cc#oldcode4777
src/heap/heap.cc:4777: start_ms, used_memory);
We already sample this after each scavenge. That should be sufficient.
https://codereview.chromium.org/1159153003/diff/1/src/heap/heap.cc
File src/heap/heap.cc (right):
https://codereview.chromium.org/1159153003/diff/1/src/heap/heap.cc#newcode4824
src/heap/heap.cc:4824: tracer()->SampleAllocation(start_ms,
NewSpaceAllocationCounter(),
Added a guard in SampleAllocation to not sample too frequently.
Description:
Remove special handling of long idle notifications.
BUG=
Please review this at https://codereview.chromium.org/1159153003/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+5, -21 lines):
M src/heap/gc-tracer.cc
M src/heap/heap.cc
Index: src/heap/gc-tracer.cc
diff --git a/src/heap/gc-tracer.cc b/src/heap/gc-tracer.cc
index
11c682de1c6433b9e01024e1a94b4f42f508939e..e4d992c9e793c499e8fa9173db37b7b2ffe6a725
100644
--- a/src/heap/gc-tracer.cc
+++ b/src/heap/gc-tracer.cc
@@ -273,7 +273,7 @@ void GCTracer::SampleAllocation(double current_ms,
size_t old_generation_allocated_bytes =
old_generation_counter_bytes -
old_generation_allocation_counter_bytes_;
double duration = current_ms - allocation_time_ms_;
- const double kMinDurationMs = 1;
+ const double kMinDurationMs = 100;
if (duration < kMinDurationMs) {
// Do not sample small durations to avoid precision errors.
return;
Index: src/heap/heap.cc
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index
38968ad0b33b026b2a6087a908044a9026d8c009..a7c963fa190b5fe63caba9311a52806fbae5aa97
100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -4756,8 +4756,7 @@ bool Heap::PerformIdleTimeAction(GCIdleTimeAction
action,
void Heap::IdleNotificationEpilogue(GCIdleTimeAction action,
GCIdleTimeHandler::HeapState
heap_state,
- double start_ms, double deadline_in_ms,
- bool is_long_idle_notification) {
+ double start_ms, double
deadline_in_ms) {
double idle_time_in_ms = deadline_in_ms - start_ms;
double current_time = MonotonicallyIncreasingTimeInMs();
last_idle_notification_time_ = current_time;
@@ -4768,15 +4767,6 @@ void Heap::IdleNotificationEpilogue(GCIdleTimeAction
action,
isolate()->counters()->gc_idle_time_allotted_in_ms()->AddSample(
static_cast<int>(idle_time_in_ms));
- if (is_long_idle_notification) {
- int committed_memory = static_cast<int>(CommittedMemory() / KB);
- int used_memory = static_cast<int>(heap_state.size_of_objects / KB);
- isolate()->counters()->aggregated_memory_heap_committed()->AddSample(
- start_ms, committed_memory);
- isolate()->counters()->aggregated_memory_heap_used()->AddSample(
- start_ms, used_memory);
- }
-
if (deadline_difference >= 0) {
if (action.type != DONE && action.type != DO_NOTHING) {
isolate()->counters()->gc_idle_time_limit_undershot()->AddSample(
@@ -4830,14 +4820,9 @@ bool Heap::IdleNotification(double
deadline_in_seconds) {
isolate_->counters()->gc_idle_notification());
double start_ms = MonotonicallyIncreasingTimeInMs();
double idle_time_in_ms = deadline_in_ms - start_ms;
- bool is_long_idle_notification =
- static_cast<size_t>(idle_time_in_ms) >
- GCIdleTimeHandler::kMaxFrameRenderingIdleTime;
- if (is_long_idle_notification) {
- tracer()->SampleAllocation(start_ms, NewSpaceAllocationCounter(),
- OldGenerationAllocationCounter());
- }
+ tracer()->SampleAllocation(start_ms, NewSpaceAllocationCounter(),
+ OldGenerationAllocationCounter());
GCIdleTimeHandler::HeapState heap_state = ComputeHeapState();
@@ -4847,8 +4832,7 @@ bool Heap::IdleNotification(double
deadline_in_seconds) {
bool result = PerformIdleTimeAction(action, heap_state, deadline_in_ms,
is_long_idle_notification);
- IdleNotificationEpilogue(action, heap_state, start_ms, deadline_in_ms,
- is_long_idle_notification);
+ IdleNotificationEpilogue(action, heap_state, start_ms, deadline_in_ms);
return result;
}
--
--
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.