Reset old generation limit on main frame context disposal.
BUG= Review URL: https://codereview.chromium.org/815933005 Cr-Commit-Position: refs/heads/master@{#25930}
This commit is contained in:
parent
d98d97ee17
commit
1903447927
@ -587,5 +587,8 @@ double GCTracer::AverageSurvivalRate() const {
|
||||
bool GCTracer::SurvivalEventsRecorded() const {
|
||||
return survival_events_.size() > 0;
|
||||
}
|
||||
|
||||
|
||||
void GCTracer::ResetSurvivalEvents() { survival_events_.reset(); }
|
||||
}
|
||||
} // namespace v8::internal
|
||||
|
@ -71,6 +71,11 @@ class RingBuffer {
|
||||
elements_[begin_] = element;
|
||||
}
|
||||
|
||||
void reset() {
|
||||
begin_ = 0;
|
||||
end_ = 0;
|
||||
}
|
||||
|
||||
private:
|
||||
T elements_[MAX_SIZE + 1];
|
||||
size_t begin_;
|
||||
@ -390,6 +395,9 @@ class GCTracer {
|
||||
// Returns true if at least one survival event was recorded.
|
||||
bool SurvivalEventsRecorded() const;
|
||||
|
||||
// Discard all recorded survival events.
|
||||
void ResetSurvivalEvents();
|
||||
|
||||
private:
|
||||
// Print one detailed trace line in name=value format.
|
||||
// TODO(ernstm): Move to Heap.
|
||||
|
@ -864,7 +864,10 @@ bool Heap::CollectGarbage(GarbageCollector collector, const char* gc_reason,
|
||||
|
||||
|
||||
int Heap::NotifyContextDisposed(bool dependant_context) {
|
||||
// TODO(hpayer): Reset heap shrinking if dependant_context is false.
|
||||
if (!dependant_context) {
|
||||
tracer()->ResetSurvivalEvents();
|
||||
old_generation_size_configured_ = false;
|
||||
}
|
||||
if (isolate()->concurrent_recompilation_enabled()) {
|
||||
// Flush the queued recompilation tasks.
|
||||
isolate()->optimizing_compiler_thread()->Flush();
|
||||
|
Loading…
Reference in New Issue
Block a user