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

Unified Diff: include/v8.h

Issue 1997363002: Adds support for collecting statistics about code and its metadata. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments from Hannes. Created 4 years, 7 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698