| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 4745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4756 return static_cast<int>(ToInternal(this)->id()); | 4756 return static_cast<int>(ToInternal(this)->id()); |
| 4757 } | 4757 } |
| 4758 | 4758 |
| 4759 | 4759 |
| 4760 int HeapGraphNode::GetSelfSize() const { | 4760 int HeapGraphNode::GetSelfSize() const { |
| 4761 IsDeadCheck("v8::HeapGraphNode::GetSelfSize"); | 4761 IsDeadCheck("v8::HeapGraphNode::GetSelfSize"); |
| 4762 return ToInternal(this)->self_size(); | 4762 return ToInternal(this)->self_size(); |
| 4763 } | 4763 } |
| 4764 | 4764 |
| 4765 | 4765 |
| 4766 int HeapGraphNode::GetReachableSize() const { | 4766 int HeapGraphNode::GetRetainedSize(bool exact) const { |
| 4767 IsDeadCheck("v8::HeapSnapshot::GetReachableSize"); | 4767 IsDeadCheck("v8::HeapSnapshot::GetRetainedSize"); |
| 4768 return ToInternal(this)->ReachableSize(); | 4768 return ToInternal(this)->RetainedSize(exact); |
| 4769 } | 4769 } |
| 4770 | 4770 |
| 4771 | 4771 |
| 4772 int HeapGraphNode::GetRetainedSize() const { | |
| 4773 IsDeadCheck("v8::HeapSnapshot::GetRetainedSize"); | |
| 4774 return ToInternal(this)->RetainedSize(); | |
| 4775 } | |
| 4776 | |
| 4777 | |
| 4778 int HeapGraphNode::GetChildrenCount() const { | 4772 int HeapGraphNode::GetChildrenCount() const { |
| 4779 IsDeadCheck("v8::HeapSnapshot::GetChildrenCount"); | 4773 IsDeadCheck("v8::HeapSnapshot::GetChildrenCount"); |
| 4780 return ToInternal(this)->children().length(); | 4774 return ToInternal(this)->children().length(); |
| 4781 } | 4775 } |
| 4782 | 4776 |
| 4783 | 4777 |
| 4784 const HeapGraphEdge* HeapGraphNode::GetChild(int index) const { | 4778 const HeapGraphEdge* HeapGraphNode::GetChild(int index) const { |
| 4785 IsDeadCheck("v8::HeapSnapshot::GetChild"); | 4779 IsDeadCheck("v8::HeapSnapshot::GetChild"); |
| 4786 return reinterpret_cast<const HeapGraphEdge*>( | 4780 return reinterpret_cast<const HeapGraphEdge*>( |
| 4787 &ToInternal(this)->children()[index]); | 4781 &ToInternal(this)->children()[index]); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 4807 } | 4801 } |
| 4808 | 4802 |
| 4809 | 4803 |
| 4810 const HeapGraphPath* HeapGraphNode::GetRetainingPath(int index) const { | 4804 const HeapGraphPath* HeapGraphNode::GetRetainingPath(int index) const { |
| 4811 IsDeadCheck("v8::HeapSnapshot::GetRetainingPath"); | 4805 IsDeadCheck("v8::HeapSnapshot::GetRetainingPath"); |
| 4812 return reinterpret_cast<const HeapGraphPath*>( | 4806 return reinterpret_cast<const HeapGraphPath*>( |
| 4813 ToInternal(this)->GetRetainingPaths()->at(index)); | 4807 ToInternal(this)->GetRetainingPaths()->at(index)); |
| 4814 } | 4808 } |
| 4815 | 4809 |
| 4816 | 4810 |
| 4811 const HeapGraphNode* HeapGraphNode::GetDominatorNode() const { |
| 4812 IsDeadCheck("v8::HeapSnapshot::GetDominatorNode"); |
| 4813 return reinterpret_cast<const HeapGraphNode*>(ToInternal(this)->dominator()); |
| 4814 } |
| 4815 |
| 4816 |
| 4817 const HeapGraphNode* HeapSnapshotsDiff::GetAdditionsRoot() const { | 4817 const HeapGraphNode* HeapSnapshotsDiff::GetAdditionsRoot() const { |
| 4818 IsDeadCheck("v8::HeapSnapshotsDiff::GetAdditionsRoot"); | 4818 IsDeadCheck("v8::HeapSnapshotsDiff::GetAdditionsRoot"); |
| 4819 i::HeapSnapshotsDiff* diff = | 4819 i::HeapSnapshotsDiff* diff = |
| 4820 const_cast<i::HeapSnapshotsDiff*>( | 4820 const_cast<i::HeapSnapshotsDiff*>( |
| 4821 reinterpret_cast<const i::HeapSnapshotsDiff*>(this)); | 4821 reinterpret_cast<const i::HeapSnapshotsDiff*>(this)); |
| 4822 return reinterpret_cast<const HeapGraphNode*>(diff->additions_root()); | 4822 return reinterpret_cast<const HeapGraphNode*>(diff->additions_root()); |
| 4823 } | 4823 } |
| 4824 | 4824 |
| 4825 | 4825 |
| 4826 const HeapGraphNode* HeapSnapshotsDiff::GetDeletionsRoot() const { | 4826 const HeapGraphNode* HeapSnapshotsDiff::GetDeletionsRoot() const { |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5005 | 5005 |
| 5006 | 5006 |
| 5007 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { | 5007 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { |
| 5008 HandleScopeImplementer* thread_local = | 5008 HandleScopeImplementer* thread_local = |
| 5009 reinterpret_cast<HandleScopeImplementer*>(storage); | 5009 reinterpret_cast<HandleScopeImplementer*>(storage); |
| 5010 thread_local->IterateThis(v); | 5010 thread_local->IterateThis(v); |
| 5011 return storage + ArchiveSpacePerThread(); | 5011 return storage + ArchiveSpacePerThread(); |
| 5012 } | 5012 } |
| 5013 | 5013 |
| 5014 } } // namespace v8::internal | 5014 } } // namespace v8::internal |
| OLD | NEW |