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

Side by Side 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: Rebase. 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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_OBJECTS_H_ 5 #ifndef V8_OBJECTS_H_
6 #define V8_OBJECTS_H_ 6 #define V8_OBJECTS_H_
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 9
10 #include "src/assert-scope.h" 10 #include "src/assert-scope.h"
(...skipping 4892 matching lines...) Expand 10 before | Expand all | Expand 10 after
4903 static const char* ICState2String(InlineCacheState state); 4903 static const char* ICState2String(InlineCacheState state);
4904 static void PrintExtraICState(std::ostream& os, // NOLINT 4904 static void PrintExtraICState(std::ostream& os, // NOLINT
4905 Kind kind, ExtraICState extra); 4905 Kind kind, ExtraICState extra);
4906 void Disassemble(const char* name, std::ostream& os); // NOLINT 4906 void Disassemble(const char* name, std::ostream& os); // NOLINT
4907 #endif // ENABLE_DISASSEMBLER 4907 #endif // ENABLE_DISASSEMBLER
4908 4908
4909 // [instruction_size]: Size of the native instructions 4909 // [instruction_size]: Size of the native instructions
4910 inline int instruction_size() const; 4910 inline int instruction_size() const;
4911 inline void set_instruction_size(int value); 4911 inline void set_instruction_size(int value);
4912 4912
4913 // [unwinding_info_size]: Size of the unwinding information.
4914 inline int unwinding_info_size() const;
4915 inline void set_unwinding_info_size(int value);
4916
4913 // [relocation_info]: Code relocation information 4917 // [relocation_info]: Code relocation information
4914 DECL_ACCESSORS(relocation_info, ByteArray) 4918 DECL_ACCESSORS(relocation_info, ByteArray)
4915 void InvalidateRelocation(); 4919 void InvalidateRelocation();
4916 void InvalidateEmbeddedObjects(); 4920 void InvalidateEmbeddedObjects();
4917 4921
4918 // [handler_table]: Fixed array containing offsets of exception handlers. 4922 // [handler_table]: Fixed array containing offsets of exception handlers.
4919 DECL_ACCESSORS(handler_table, FixedArray) 4923 DECL_ACCESSORS(handler_table, FixedArray)
4920 4924
4921 // [deoptimization_data]: Array containing data for deopt. 4925 // [deoptimization_data]: Array containing data for deopt.
4922 DECL_ACCESSORS(deoptimization_data, FixedArray) 4926 DECL_ACCESSORS(deoptimization_data, FixedArray)
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
4978 inline bool is_compare_ic_stub(); 4982 inline bool is_compare_ic_stub();
4979 inline bool is_to_boolean_ic_stub(); 4983 inline bool is_to_boolean_ic_stub();
4980 inline bool is_optimized_code(); 4984 inline bool is_optimized_code();
4981 inline bool is_wasm_code(); 4985 inline bool is_wasm_code();
4982 4986
4983 inline bool IsCodeStubOrIC(); 4987 inline bool IsCodeStubOrIC();
4984 4988
4985 inline void set_raw_kind_specific_flags1(int value); 4989 inline void set_raw_kind_specific_flags1(int value);
4986 inline void set_raw_kind_specific_flags2(int value); 4990 inline void set_raw_kind_specific_flags2(int value);
4987 4991
4992 // [has_unwinding_info]: Whether this code object has unwinding information.
4993 // If it doesn't, unwinding_information_start() will point to invalid data.
4994 DECL_BOOLEAN_ACCESSORS(has_unwinding_info)
rmcilroy 2016/06/21 13:47:44 nit - move down to near unwinding_info_start. Als
Stefano Sanfilippo 2016/06/23 15:23:44 Done.
4995
4988 // Testers for interpreter builtins. 4996 // Testers for interpreter builtins.
4989 inline bool is_interpreter_trampoline_builtin(); 4997 inline bool is_interpreter_trampoline_builtin();
4990 4998
4991 // [is_crankshafted]: For kind STUB or ICs, tells whether or not a code 4999 // [is_crankshafted]: For kind STUB or ICs, tells whether or not a code
4992 // object was generated by either the hydrogen or the TurboFan optimizing 5000 // object was generated by either the hydrogen or the TurboFan optimizing
4993 // compiler (but it may not be an optimized function). 5001 // compiler (but it may not be an optimized function).
4994 inline bool is_crankshafted(); 5002 inline bool is_crankshafted();
4995 inline bool is_hydrogen_stub(); // Crankshafted, but not a function. 5003 inline bool is_hydrogen_stub(); // Crankshafted, but not a function.
4996 inline void set_is_crankshafted(bool value); 5004 inline void set_is_crankshafted(bool value);
4997 5005
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
5118 5126
5119 // Convert an entry address into an object. 5127 // Convert an entry address into an object.
5120 static inline Object* GetObjectFromEntryAddress(Address location_of_address); 5128 static inline Object* GetObjectFromEntryAddress(Address location_of_address);
5121 5129
5122 // Returns the address of the first instruction. 5130 // Returns the address of the first instruction.
5123 inline byte* instruction_start(); 5131 inline byte* instruction_start();
5124 5132
5125 // Returns the address right after the last instruction. 5133 // Returns the address right after the last instruction.
5126 inline byte* instruction_end(); 5134 inline byte* instruction_end();
5127 5135
5128 // Returns the size of the instructions, padding, and relocation information. 5136 // Returns the size of the instructions, padding, and relocation information.
rmcilroy 2016/06/21 13:47:44 update comment.
Stefano Sanfilippo 2016/06/23 15:23:44 Done.
5129 inline int body_size(); 5137 inline int body_size();
5130 5138
5131 // Returns the size of code and its metadata. This includes the size of code 5139 // Returns the size of code and its metadata. This includes the size of code
5132 // relocation information, deoptimization data and handler table. 5140 // relocation information, deoptimization data and handler table.
5133 inline int SizeIncludingMetadata(); 5141 inline int SizeIncludingMetadata();
5134 5142
5135 // Returns the address of the first relocation info (read backwards!). 5143 // Returns the address of the first relocation info (read backwards!).
5136 inline byte* relocation_start(); 5144 inline byte* relocation_start();
5137 5145
5146 // Returns the address of the unwinding information.
rmcilroy 2016/06/21 13:47:44 information, if any.
Stefano Sanfilippo 2016/06/23 15:23:44 Done.
5147 inline byte* unwinding_info_start();
5148
5149 // Returns the address past the end of the unwinding information.
rmcilroy 2016/06/21 13:47:44 /s/past/right after/
Stefano Sanfilippo 2016/06/23 15:23:44 Done.
5150 inline byte* unwinding_info_end();
5151
5138 // Code entry point. 5152 // Code entry point.
5139 inline byte* entry(); 5153 inline byte* entry();
5140 5154
5141 // Returns true if pc is inside this object's instructions. 5155 // Returns true if pc is inside this object's instructions.
5142 inline bool contains(byte* pc); 5156 inline bool contains(byte* pc);
5143 5157
5144 // Relocate the code by delta bytes. Called to signal that this code 5158 // Relocate the code by delta bytes. Called to signal that this code
5145 // object has been moved by delta bytes. 5159 // object has been moved by delta bytes.
5146 void Relocate(intptr_t delta); 5160 void Relocate(intptr_t delta);
5147 5161
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
5276 : public BitField<bool, 2, 1> {}; 5290 : public BitField<bool, 2, 1> {};
5277 // Bit 3 in this bitfield is unused. 5291 // Bit 3 in this bitfield is unused.
5278 class ProfilerTicksField : public BitField<int, 4, 28> {}; 5292 class ProfilerTicksField : public BitField<int, 4, 28> {};
5279 5293
5280 // Flags layout. BitField<type, shift, size>. 5294 // Flags layout. BitField<type, shift, size>.
5281 class ICStateField : public BitField<InlineCacheState, 0, 3> {}; 5295 class ICStateField : public BitField<InlineCacheState, 0, 3> {};
5282 class CacheHolderField 5296 class CacheHolderField
5283 : public BitField<CacheHolderFlag, ICStateField::kNext, 2> {}; 5297 : public BitField<CacheHolderFlag, ICStateField::kNext, 2> {};
5284 class KindField : public BitField<Kind, CacheHolderField::kNext, 5> {}; 5298 class KindField : public BitField<Kind, CacheHolderField::kNext, 5> {};
5285 STATIC_ASSERT(NUMBER_OF_KINDS <= KindField::kMax); 5299 STATIC_ASSERT(NUMBER_OF_KINDS <= KindField::kMax);
5286 class ExtraICStateField : public BitField<ExtraICState, KindField::kNext, 5300 class HasUnwindingInfoField : public BitField<bool, KindField::kNext, 1> {};
5287 PlatformSmiTagging::kSmiValueSize - 5301 class ExtraICStateField
5288 KindField::kNext + 1> {}; 5302 : public BitField<ExtraICState, HasUnwindingInfoField::kNext,
5303 PlatformSmiTagging::kSmiValueSize -
5304 HasUnwindingInfoField::kNext + 1> {};
5289 5305
5290 // KindSpecificFlags1 layout (STUB, BUILTIN and OPTIMIZED_FUNCTION) 5306 // KindSpecificFlags1 layout (STUB, BUILTIN and OPTIMIZED_FUNCTION)
5291 static const int kStackSlotsFirstBit = 0; 5307 static const int kStackSlotsFirstBit = 0;
5292 static const int kStackSlotsBitCount = 24; 5308 static const int kStackSlotsBitCount = 24;
5293 static const int kMarkedForDeoptimizationBit = 5309 static const int kMarkedForDeoptimizationBit =
5294 kStackSlotsFirstBit + kStackSlotsBitCount; 5310 kStackSlotsFirstBit + kStackSlotsBitCount;
5295 static const int kIsTurbofannedBit = kMarkedForDeoptimizationBit + 1; 5311 static const int kIsTurbofannedBit = kMarkedForDeoptimizationBit + 1;
5296 static const int kCanHaveWeakObjects = kIsTurbofannedBit + 1; 5312 static const int kCanHaveWeakObjects = kIsTurbofannedBit + 1;
5297 5313
5298 STATIC_ASSERT(kStackSlotsFirstBit + kStackSlotsBitCount <= 32); 5314 STATIC_ASSERT(kStackSlotsFirstBit + kStackSlotsBitCount <= 32);
(...skipping 5507 matching lines...) Expand 10 before | Expand all | Expand 10 after
10806 } 10822 }
10807 return value; 10823 return value;
10808 } 10824 }
10809 }; 10825 };
10810 10826
10811 10827
10812 } // NOLINT, false-positive due to second-order macros. 10828 } // NOLINT, false-positive due to second-order macros.
10813 } // NOLINT, false-positive due to second-order macros. 10829 } // NOLINT, false-positive due to second-order macros.
10814 10830
10815 #endif // V8_OBJECTS_H_ 10831 #endif // V8_OBJECTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698