OLD | NEW |
---|---|
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_V8_PROFILER_H_ | 5 #ifndef V8_V8_PROFILER_H_ |
6 #define V8_V8_PROFILER_H_ | 6 #define V8_V8_PROFILER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 #include "v8.h" // NOLINT(build/include) | 9 #include "v8.h" // NOLINT(build/include) |
10 | 10 |
(...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
687 */ | 687 */ |
688 void SetRetainedObjectInfo(UniqueId id, RetainedObjectInfo* info); | 688 void SetRetainedObjectInfo(UniqueId id, RetainedObjectInfo* info); |
689 | 689 |
690 private: | 690 private: |
691 HeapProfiler(); | 691 HeapProfiler(); |
692 ~HeapProfiler(); | 692 ~HeapProfiler(); |
693 HeapProfiler(const HeapProfiler&); | 693 HeapProfiler(const HeapProfiler&); |
694 HeapProfiler& operator=(const HeapProfiler&); | 694 HeapProfiler& operator=(const HeapProfiler&); |
695 }; | 695 }; |
696 | 696 |
697 | |
698 /** | 697 /** |
699 * Interface for providing information about embedder's objects | 698 * Interface for providing information about embedder's objects |
700 * held by global handles. This information is reported in two ways: | 699 * held by global handles. This information is reported in two ways: |
701 * | 700 * |
702 * 1. When calling AddObjectGroup, an embedder may pass | 701 * 1. When calling AddObjectGroup, an embedder may pass |
703 * RetainedObjectInfo instance describing the group. To collect | 702 * RetainedObjectInfo instance describing the group. To collect |
704 * this information while taking a heap snapshot, V8 calls GC | 703 * this information while taking a heap snapshot, V8 calls GC |
705 * prologue and epilogue callbacks. | 704 * prologue and epilogue callbacks. |
706 * | 705 * |
707 * 2. When a heap snapshot is collected, V8 additionally | 706 * 2. When a heap snapshot is collected, V8 additionally |
708 * requests RetainedObjectInfos for persistent handles that | 707 * requests RetainedObjectInfos for persistent handles that |
709 * were not previously reported via AddObjectGroup. | 708 * were not previously reported via AddObjectGroup. |
710 * | 709 * |
711 * Thus, if an embedder wants to provide information about native | 710 * Thus, if an embedder wants to provide information about native |
712 * objects for heap snapshots, he can do it in a GC prologue | 711 * objects for heap snapshots, it can do it in a GC prologue |
Michael Achenbach
2016/06/22 14:59:59
Isn't the phrase for humans "they"?
jochen (gone - plz use gerrit)
2016/06/22 15:02:23
"the embedder" is a piece of software (at least ho
Marcel Hlopko
2016/06/22 15:02:40
I assumed embedder == blink, not the programmer...
Michael Achenbach
2016/06/22 15:04:12
Got it!
| |
713 * handler, and / or by assigning wrapper class ids in the following way: | 712 * handler, and / or by assigning wrapper class ids in the following way: |
714 * | 713 * |
715 * 1. Bind a callback to class id by calling SetWrapperClassInfoProvider. | 714 * 1. Bind a callback to class id by calling SetWrapperClassInfoProvider. |
716 * 2. Call SetWrapperClassId on certain persistent handles. | 715 * 2. Call SetWrapperClassId on certain persistent handles. |
717 * | 716 * |
718 * V8 takes ownership of RetainedObjectInfo instances passed to it and | 717 * V8 takes ownership of RetainedObjectInfo instances passed to it and |
719 * keeps them alive only during snapshot collection. Afterwards, they | 718 * keeps them alive only during snapshot collection. Afterwards, they |
720 * are freed by calling the Dispose class function. | 719 * are freed by calling the Dispose class function. |
721 */ | 720 */ |
722 class V8_EXPORT RetainedObjectInfo { // NOLINT | 721 class V8_EXPORT RetainedObjectInfo { // NOLINT |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
779 uint32_t index; // Index of the time interval that was changed. | 778 uint32_t index; // Index of the time interval that was changed. |
780 uint32_t count; // New value of count field for the interval with this index. | 779 uint32_t count; // New value of count field for the interval with this index. |
781 uint32_t size; // New value of size field for the interval with this index. | 780 uint32_t size; // New value of size field for the interval with this index. |
782 }; | 781 }; |
783 | 782 |
784 | 783 |
785 } // namespace v8 | 784 } // namespace v8 |
786 | 785 |
787 | 786 |
788 #endif // V8_V8_PROFILER_H_ | 787 #endif // V8_V8_PROFILER_H_ |
OLD | NEW |