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

Unified Diff: src/objects.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 | « src/log.cc ('k') | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index 0bce56c402ab7de3f98b3cf605e86f7524676a0c..3bc6ef9330e0677808a40c7f82bcab4e22bebb55 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -4448,6 +4448,10 @@ class BytecodeArray : public FixedArrayBase {
inline int instruction_size();
+ // Returns the size of bytecode and its metadata. This includes the size of
+ // bytecode, constant pool, source position table, and handler table.
+ inline int SizeIncludingMetadata();
+
int SourcePosition(int offset);
int SourceStatementPosition(int offset);
@@ -5125,6 +5129,10 @@ class Code: public HeapObject {
// Returns the size of the instructions, padding, and relocation information.
inline int body_size();
+ // Returns the size of code and its metadata. This includes the size of code
+ // relocation information, deoptimization data and handler table.
+ inline int SizeIncludingMetadata();
+
// Returns the address of the first relocation info (read backwards!).
inline byte* relocation_start();
@@ -5356,8 +5364,11 @@ class AbstractCode : public HeapObject {
CODE_KIND_LIST(DEFINE_CODE_KIND_ENUM)
#undef DEFINE_CODE_KIND_ENUM
INTERPRETED_FUNCTION,
+ NUMBER_OF_KINDS
};
+ static const char* Kind2String(Kind kind);
+
int SourcePosition(int offset);
int SourceStatementPosition(int offset);
@@ -5367,9 +5378,12 @@ class AbstractCode : public HeapObject {
// Returns the address right after the last instruction.
inline Address instruction_end();
- // Returns the of the code instructions.
+ // Returns the size of the code instructions.
inline int instruction_size();
+ // Returns the size of instructions and the metadata.
+ inline int SizeIncludingMetadata();
+
// Returns true if pc is inside this object's instructions.
inline bool contains(byte* pc);
« no previous file with comments | « src/log.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698