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

Unified Diff: src/objects.h

Issue 1993653003: Initial support for emitting unwinding information in perf jitdump. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Enable with --perf-prof-unwinding-info. Created 4 years, 6 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/mips64/assembler-mips64.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 2b3ba1b222b933819c3f76dbc81e9da459f620dc..3cbee1eb87d2efc266b84c162791c7f4bf91b95e 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -5129,7 +5129,8 @@ class Code: public HeapObject {
// Returns the address right after the last instruction.
inline byte* instruction_end();
- // Returns the size of the instructions, padding, and relocation information.
+ // Returns the size of the instructions, padding, relocation and unwinding
+ // information.
inline int body_size();
// Returns the size of code and its metadata. This includes the size of code
@@ -5139,6 +5140,49 @@ class Code: public HeapObject {
// Returns the address of the first relocation info (read backwards!).
inline byte* relocation_start();
+ // [has_unwinding_info]: Whether this code object has unwinding information.
+ // If it doesn't, unwinding_information_start() will point to invalid data.
+ //
+ // The body of all code objects has the following layout.
+ //
+ // +--------------------------+ <-- instruction_start()
+ // | instructions |
+ // | ... |
+ // +--------------------------+
+ // | relocation info |
+ // | ... |
+ // +--------------------------+ <-- instruction_end()
+ //
+ // If has_unwinding_info() is false, instruction_end() points to the first
+ // memory location after the end of the code object. Otherwise, the body
+ // continues as follows:
+ //
+ // +--------------------------+
+ // | padding to the next |
+ // | 8-byte aligned address |
+ // +--------------------------+ <-- instruction_end()
+ // | [unwinding_info_size] |
+ // | as uint64_t |
+ // +--------------------------+ <-- unwinding_info_start()
+ // | unwinding info |
+ // | ... |
+ // +--------------------------+ <-- unwinding_info_end()
+ //
+ // and unwinding_info_end() points to the first memory location after the end
+ // of the code object.
+ //
+ DECL_BOOLEAN_ACCESSORS(has_unwinding_info)
+
+ // [unwinding_info_size]: Size of the unwinding information.
+ inline int unwinding_info_size() const;
+ inline void set_unwinding_info_size(int value);
+
+ // Returns the address of the unwinding information, if any.
+ inline byte* unwinding_info_start();
+
+ // Returns the address right after the end of the unwinding information.
+ inline byte* unwinding_info_end();
+
// Code entry point.
inline byte* entry();
@@ -5269,6 +5313,8 @@ class Code: public HeapObject {
static const int kHeaderSize =
(kHeaderPaddingStart + kCodeAlignmentMask) & ~kCodeAlignmentMask;
+ inline int GetUnwindingInfoSizeOffset() const;
+
class BodyDescriptor;
// Byte offsets within kKindSpecificFlags1Offset.
@@ -5287,9 +5333,11 @@ class Code: public HeapObject {
: public BitField<CacheHolderFlag, ICStateField::kNext, 2> {};
class KindField : public BitField<Kind, CacheHolderField::kNext, 5> {};
STATIC_ASSERT(NUMBER_OF_KINDS <= KindField::kMax);
- class ExtraICStateField : public BitField<ExtraICState, KindField::kNext,
- PlatformSmiTagging::kSmiValueSize -
- KindField::kNext + 1> {};
+ class HasUnwindingInfoField : public BitField<bool, KindField::kNext, 1> {};
+ class ExtraICStateField
+ : public BitField<ExtraICState, HasUnwindingInfoField::kNext,
+ PlatformSmiTagging::kSmiValueSize -
+ HasUnwindingInfoField::kNext + 1> {};
// KindSpecificFlags1 layout (STUB, BUILTIN and OPTIMIZED_FUNCTION)
static const int kStackSlotsFirstBit = 0;
« no previous file with comments | « src/mips64/assembler-mips64.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698