| Index: runtime/vm/object_graph.cc
|
| diff --git a/runtime/vm/object_graph.cc b/runtime/vm/object_graph.cc
|
| index 879e87ca07c1702aa69f9382b19ffeaef951b606..ad6f8614821e9e866f971ef954992724c482045a 100644
|
| --- a/runtime/vm/object_graph.cc
|
| +++ b/runtime/vm/object_graph.cc
|
| @@ -261,9 +261,25 @@ class RetainingPathVisitor : public ObjectGraph::Visitor {
|
|
|
| intptr_t length() const { return length_; }
|
|
|
| + bool ShouldSkip(RawObject* obj) {
|
| + // A retaining path through ICData is never the only retaining path,
|
| + // and it is less informative than its alternatives.
|
| + intptr_t cid = obj->GetClassId();
|
| + switch (cid) {
|
| + case kICDataCid:
|
| + return true;
|
| + default:
|
| + return false;
|
| + }
|
| + }
|
| +
|
| virtual Direction VisitObject(ObjectGraph::StackIterator* it) {
|
| if (it->Get() != obj_) {
|
| - return kProceed;
|
| + if (ShouldSkip(it->Get())) {
|
| + return kBacktrack;
|
| + } else {
|
| + return kProceed;
|
| + }
|
| } else {
|
| HANDLESCOPE(Isolate::Current());
|
| Object& current = Object::Handle();
|
|
|