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

Side by Side Diff: runtime/vm/raw_object.h

Issue 1435533003: Make profiler work without Instructions -> Code pointer (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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
« no previous file with comments | « runtime/vm/profiler_service.cc ('k') | runtime/vm/raw_object.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_RAW_OBJECT_H_ 5 #ifndef VM_RAW_OBJECT_H_
6 #define VM_RAW_OBJECT_H_ 6 #define VM_RAW_OBJECT_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/atomic.h" 9 #include "vm/atomic.h"
10 #include "vm/globals.h" 10 #include "vm/globals.h"
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after
619 friend class InstructionsReader; // tags_ check 619 friend class InstructionsReader; // tags_ check
620 friend class InstructionsWriter; 620 friend class InstructionsWriter;
621 friend class SnapshotReader; 621 friend class SnapshotReader;
622 friend class SnapshotWriter; 622 friend class SnapshotWriter;
623 friend class String; 623 friend class String;
624 friend class TypedData; 624 friend class TypedData;
625 friend class TypedDataView; 625 friend class TypedDataView;
626 friend class WeakProperty; // StorePointer 626 friend class WeakProperty; // StorePointer
627 friend class Instance; // StorePointer 627 friend class Instance; // StorePointer
628 friend class StackFrame; // GetCodeObject assertion. 628 friend class StackFrame; // GetCodeObject assertion.
629 friend class CodeLookupTableBuilder; // profiler
629 630
630 DISALLOW_ALLOCATION(); 631 DISALLOW_ALLOCATION();
631 DISALLOW_IMPLICIT_CONSTRUCTORS(RawObject); 632 DISALLOW_IMPLICIT_CONSTRUCTORS(RawObject);
632 }; 633 };
633 634
634 635
635 class RawClass : public RawObject { 636 class RawClass : public RawObject {
636 public: 637 public:
637 enum ClassFinalizedState { 638 enum ClassFinalizedState {
638 kAllocated = 0, // Initial state. 639 kAllocated = 0, // Initial state.
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
1102 Entry* first_entry() { return &ptr()->data()[0]; } 1103 Entry* first_entry() { return &ptr()->data()[0]; }
1103 1104
1104 friend class Object; 1105 friend class Object;
1105 friend class SnapshotReader; 1106 friend class SnapshotReader;
1106 }; 1107 };
1107 1108
1108 1109
1109 class RawInstructions : public RawObject { 1110 class RawInstructions : public RawObject {
1110 RAW_HEAP_OBJECT_IMPLEMENTATION(Instructions); 1111 RAW_HEAP_OBJECT_IMPLEMENTATION(Instructions);
1111 1112
1112 RawObject** from() {
1113 return reinterpret_cast<RawObject**>(&ptr()->code_);
1114 }
1115 RawCode* code_;
1116 RawObject** to() {
1117 return reinterpret_cast<RawObject**>(&ptr()->code_);
1118 }
1119
1120 int32_t size_; 1113 int32_t size_;
1121 1114
1122 // Variable length data follows here. 1115 // Variable length data follows here.
1123 uint8_t* data() { OPEN_ARRAY_START(uint8_t, uint8_t); } 1116 uint8_t* data() { OPEN_ARRAY_START(uint8_t, uint8_t); }
1124 1117
1125 // Private helper function used while visiting stack frames. The 1118 // Private helper function used while visiting stack frames. The
1126 // code which iterates over dart frames is also called during GC and 1119 // code which iterates over dart frames is also called during GC and
1127 // is not allowed to create handles. 1120 // is not allowed to create handles.
1128 static bool ContainsPC(RawInstructions* raw_instr, uword pc); 1121 static bool ContainsPC(RawInstructions* raw_instr, uword pc);
1129 1122
(...skipping 1137 matching lines...) Expand 10 before | Expand all | Expand 10 after
2267 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == 2260 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid ==
2268 kTypedDataInt8ArrayViewCid + 15); 2261 kTypedDataInt8ArrayViewCid + 15);
2269 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); 2262 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14);
2270 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); 2263 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1);
2271 return (kNullCid - kTypedDataInt8ArrayCid); 2264 return (kNullCid - kTypedDataInt8ArrayCid);
2272 } 2265 }
2273 2266
2274 } // namespace dart 2267 } // namespace dart
2275 2268
2276 #endif // VM_RAW_OBJECT_H_ 2269 #endif // VM_RAW_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/profiler_service.cc ('k') | runtime/vm/raw_object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698