Reviewers: mvstanton,
Message:
PTAL
https://codereview.chromium.org/880253007/diff/1/src/type-feedback-vector.cc
File src/type-feedback-vector.cc (left):
https://codereview.chromium.org/880253007/diff/1/src/type-feedback-vector.cc#oldcode138
src/type-feedback-vector.cc:138: // TODO(mvstanton): is this ic_age
granular enough? it comes from
I am going to remove clearing based on ic_age in another CL.
Description:
Remove flush_monomorphic_ics flag.
Since v8:3629 is fixed, ICs and handlers do not retain objects.
Please review this at https://codereview.chromium.org/880253007/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+4, -23 lines):
M src/heap/heap.h
M src/heap/heap.cc
M src/heap/objects-visiting-inl.h
M src/type-feedback-vector.cc
Index: src/heap/heap.cc
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index
05c302fb99742a3e109c2dfc96ee84bca8f4c9f9..1a5182198f6abb833138ab7d9ac081bc142a1075
100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -81,7 +81,6 @@ Heap::Heap()
always_allocate_scope_depth_(0),
contexts_disposed_(0),
global_ic_age_(0),
- flush_monomorphic_ics_(false),
scan_on_scavenge_pages_(0),
new_space_(this),
old_pointer_space_(NULL),
@@ -877,7 +876,6 @@ int Heap::NotifyContextDisposed(bool dependant_context)
{
// Flush the queued recompilation tasks.
isolate()->optimizing_compiler_thread()->Flush();
}
- flush_monomorphic_ics_ = true;
AgeInlineCaches();
tracer()->AddContextDisposalTime(base::OS::TimeCurrentMillis());
return ++contexts_disposed_;
@@ -1245,8 +1243,6 @@ void Heap::MarkCompactEpilogue() {
isolate_->counters()->objs_since_last_full()->Set(0);
- flush_monomorphic_ics_ = false;
-
incremental_marking()->Epilogue();
}
Index: src/heap/heap.h
diff --git a/src/heap/heap.h b/src/heap/heap.h
index
2975d09f63de15cb16e33a0d1c19ba030b5fc976..dcf0a983074dfabe0cf0ae7e7b0588e8e7c7a169
100644
--- a/src/heap/heap.h
+++ b/src/heap/heap.h
@@ -1350,8 +1350,6 @@ class Heap {
global_ic_age_ = (global_ic_age_ + 1) &
SharedFunctionInfo::ICAgeBits::kMax;
}
- bool flush_monomorphic_ics() { return flush_monomorphic_ics_; }
-
int64_t amount_of_external_allocated_memory() {
return amount_of_external_allocated_memory_;
}
@@ -1538,8 +1536,6 @@ class Heap {
int global_ic_age_;
- bool flush_monomorphic_ics_;
-
int scan_on_scavenge_pages_;
NewSpace new_space_;
Index: src/heap/objects-visiting-inl.h
diff --git a/src/heap/objects-visiting-inl.h
b/src/heap/objects-visiting-inl.h
index
0571b321f0c6aa87907ca9bcb47500d404477f7e..abdccc2ebd20de4582032f091b9bfc88dc5f4651
100644
--- a/src/heap/objects-visiting-inl.h
+++ b/src/heap/objects-visiting-inl.h
@@ -262,10 +262,8 @@ void
StaticMarkingVisitor<StaticVisitor>::VisitCodeTarget(Heap* heap,
// when they might be keeping a Context alive, or when the heap is about
// to be serialized.
if (FLAG_cleanup_code_caches_at_gc && target->is_inline_cache_stub() &&
- !target->is_call_stub() &&
- ((heap->flush_monomorphic_ics() && !target->embeds_maps_weakly()) ||
- heap->isolate()->serializer_enabled() ||
- target->ic_age() != heap->global_ic_age())) {
+ !target->is_call_stub() && (heap->isolate()->serializer_enabled() ||
+ target->ic_age() !=
heap->global_ic_age())) {
ICUtility::Clear(heap->isolate(), rinfo->pc(),
rinfo->host()->constant_pool());
target = Code::GetCodeFromTargetAddress(rinfo->target_address());
Index: src/type-feedback-vector.cc
diff --git a/src/type-feedback-vector.cc b/src/type-feedback-vector.cc
index
bb22cac1e39113cae9a72afd727500064af26357..79afa2dad2dc31d60d735eaf9f746b1c917159c2
100644
--- a/src/type-feedback-vector.cc
+++ b/src/type-feedback-vector.cc
@@ -133,17 +133,8 @@ Handle<TypeFeedbackVector> TypeFeedbackVector::Copy(
// This logic is copied from
// StaticMarkingVisitor<StaticVisitor>::VisitCodeTarget.
static bool ClearLogic(Heap* heap, int ic_age) {
- if (FLAG_cleanup_code_caches_at_gc &&
- (heap->flush_monomorphic_ics() ||
- // TODO(mvstanton): is this ic_age granular enough? it comes from
- // the SharedFunctionInfo which may change on a different schedule
- // than ic targets.
- // ic_age != heap->global_ic_age() ||
- // is_invalidated_weak_stub ||
- heap->isolate()->serializer_enabled())) {
- return true;
- }
- return false;
+ return FLAG_cleanup_code_caches_at_gc &&
+ heap->isolate()->serializer_enabled();
}
--
--
v8-dev mailing list
[email protected]
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 [email protected].
For more options, visit https://groups.google.com/d/optout.