Index: include/v8.h |
diff --git a/include/v8.h b/include/v8.h |
index 3079958d5868cb1182cae32223fa2677b8595b49..fe5a9b96a496abcb6baec5e4f20407f2af776522 100644 |
--- a/include/v8.h |
+++ b/include/v8.h |
@@ -5273,6 +5273,18 @@ class V8_EXPORT HeapObjectStatistics { |
friend class Isolate; |
}; |
+class V8_EXPORT HeapCodeStatistics { |
+ public: |
+ HeapCodeStatistics(); |
+ size_t code_and_metadata_size() { return code_and_metadata_size_; } |
+ size_t bytecode_and_metadata_size() { return bytecode_and_metadata_size_; } |
+ |
+ private: |
+ size_t code_and_metadata_size_; |
+ size_t bytecode_and_metadata_size_; |
+ |
+ friend class Isolate; |
+}; |
class RetainedObjectInfo; |
@@ -5780,6 +5792,15 @@ class V8_EXPORT Isolate { |
size_t type_index); |
/** |
+ * Get statistics about code and its metadata in the heap. |
+ * |
+ * \param object_statistics The HeapCodeStatistics object to fill in |
+ * statistics of code, bytecode and their metadata. |
+ * \returns true on success. |
+ */ |
+ bool GetHeapCodeAndMetadataStatistics(HeapCodeStatistics* object_statistics); |
+ |
+ /** |
* Get a call stack sample from the isolate. |
* \param state Execution state. |
* \param frames Caller allocated buffer to store stack frames. |