Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 2748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2759 * Collection of V8 heap information. | 2759 * Collection of V8 heap information. |
| 2760 * | 2760 * |
| 2761 * Instances of this class can be passed to v8::V8::HeapStatistics to | 2761 * Instances of this class can be passed to v8::V8::HeapStatistics to |
| 2762 * get heap statistics from V8. | 2762 * get heap statistics from V8. |
| 2763 */ | 2763 */ |
| 2764 class V8EXPORT HeapStatistics { | 2764 class V8EXPORT HeapStatistics { |
| 2765 public: | 2765 public: |
| 2766 HeapStatistics(); | 2766 HeapStatistics(); |
| 2767 size_t total_heap_size() { return total_heap_size_; } | 2767 size_t total_heap_size() { return total_heap_size_; } |
| 2768 size_t total_heap_size_executable() { return total_heap_size_executable_; } | 2768 size_t total_heap_size_executable() { return total_heap_size_executable_; } |
| 2769 size_t committed_physical_size() { return committed_physical_size_; } | |
|
Michael Starzinger
2012/09/27 09:46:16
Can we rename this to "total_physical_size"? This
alph
2012/09/27 12:51:13
Done.
| |
| 2769 size_t used_heap_size() { return used_heap_size_; } | 2770 size_t used_heap_size() { return used_heap_size_; } |
| 2770 size_t heap_size_limit() { return heap_size_limit_; } | 2771 size_t heap_size_limit() { return heap_size_limit_; } |
| 2771 | 2772 |
| 2772 private: | 2773 private: |
| 2773 void set_total_heap_size(size_t size) { total_heap_size_ = size; } | 2774 void set_total_heap_size(size_t size) { total_heap_size_ = size; } |
| 2774 void set_total_heap_size_executable(size_t size) { | 2775 void set_total_heap_size_executable(size_t size) { |
| 2775 total_heap_size_executable_ = size; | 2776 total_heap_size_executable_ = size; |
| 2776 } | 2777 } |
| 2778 void set_committed_physical_size(size_t size) { | |
| 2779 committed_physical_size_ = size; | |
| 2780 } | |
| 2777 void set_used_heap_size(size_t size) { used_heap_size_ = size; } | 2781 void set_used_heap_size(size_t size) { used_heap_size_ = size; } |
| 2778 void set_heap_size_limit(size_t size) { heap_size_limit_ = size; } | 2782 void set_heap_size_limit(size_t size) { heap_size_limit_ = size; } |
| 2779 | 2783 |
| 2780 size_t total_heap_size_; | 2784 size_t total_heap_size_; |
| 2781 size_t total_heap_size_executable_; | 2785 size_t total_heap_size_executable_; |
| 2786 size_t committed_physical_size_; | |
| 2782 size_t used_heap_size_; | 2787 size_t used_heap_size_; |
| 2783 size_t heap_size_limit_; | 2788 size_t heap_size_limit_; |
| 2784 | 2789 |
| 2785 friend class V8; | 2790 friend class V8; |
| 2786 }; | 2791 }; |
| 2787 | 2792 |
| 2788 | 2793 |
| 2789 class RetainedObjectInfo; | 2794 class RetainedObjectInfo; |
| 2790 | 2795 |
| 2791 /** | 2796 /** |
| (...skipping 1862 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4654 | 4659 |
| 4655 | 4660 |
| 4656 } // namespace v8 | 4661 } // namespace v8 |
| 4657 | 4662 |
| 4658 | 4663 |
| 4659 #undef V8EXPORT | 4664 #undef V8EXPORT |
| 4660 #undef TYPE_CHECK | 4665 #undef TYPE_CHECK |
| 4661 | 4666 |
| 4662 | 4667 |
| 4663 #endif // V8_H_ | 4668 #endif // V8_H_ |
| OLD | NEW |