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

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

Issue 338014: Fix retainer profile test regression (Closed)
Patch Set: Created 11 years, 1 month 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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 } 141 }
142 142
143 void VisitPointer(Object** o) { 143 void VisitPointer(Object** o) {
144 if ((*o)->IsFixedArray() && !inside_array_) { 144 if ((*o)->IsFixedArray() && !inside_array_) {
145 // Traverse one level deep for data members that are fixed arrays. 145 // Traverse one level deep for data members that are fixed arrays.
146 // This covers the case of 'elements' and 'properties' of JSObject, 146 // This covers the case of 'elements' and 'properties' of JSObject,
147 // and function contexts. 147 // and function contexts.
148 inside_array_ = true; 148 inside_array_ = true;
149 FixedArray::cast(*o)->Iterate(this); 149 FixedArray::cast(*o)->Iterate(this);
150 inside_array_ = false; 150 inside_array_ = false;
151 } else { 151 } else if ((*o)->IsHeapObject()) {
152 profile_->StoreReference(cluster_, HeapObject::cast(*o)); 152 profile_->StoreReference(cluster_, HeapObject::cast(*o));
153 } 153 }
154 } 154 }
155 155
156 void VisitPointers(Object** start, Object** end) { 156 void VisitPointers(Object** start, Object** end) {
157 for (Object** p = start; p < end; p++) VisitPointer(p); 157 for (Object** p = start; p < end; p++) VisitPointer(p);
158 } 158 }
159 159
160 private: 160 private:
161 const JSObjectsCluster& cluster_; 161 const JSObjectsCluster& cluster_;
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after
685 GlobalHandles::MakeWeak(handle.location(), 685 GlobalHandles::MakeWeak(handle.location(),
686 static_cast<void*>(stack.start()), 686 static_cast<void*>(stack.start()),
687 StackWeakReferenceCallback); 687 StackWeakReferenceCallback);
688 } 688 }
689 689
690 690
691 #endif // ENABLE_LOGGING_AND_PROFILING 691 #endif // ENABLE_LOGGING_AND_PROFILING
692 692
693 693
694 } } // namespace v8::internal 694 } } // 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