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

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

Issue 2510093005: Revert "Fix tsan failure" (Closed)
Patch Set: Created 4 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_test.cc ('k') | no next file » | 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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 RUNTIME_VM_STACK_FRAME_H_ 5 #ifndef RUNTIME_VM_STACK_FRAME_H_
6 #define RUNTIME_VM_STACK_FRAME_H_ 6 #define RUNTIME_VM_STACK_FRAME_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/object.h" 9 #include "vm/object.h"
10 #include "vm/stub_code.h" 10 #include "vm/stub_code.h"
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 140
141 uword fp_; 141 uword fp_;
142 uword sp_; 142 uword sp_;
143 uword pc_; 143 uword pc_;
144 Thread* thread_; 144 Thread* thread_;
145 145
146 // The iterators FrameSetIterator and StackFrameIterator set the private 146 // The iterators FrameSetIterator and StackFrameIterator set the private
147 // fields fp_ and sp_ when they return the respective frame objects. 147 // fields fp_ and sp_ when they return the respective frame objects.
148 friend class FrameSetIterator; 148 friend class FrameSetIterator;
149 friend class StackFrameIterator; 149 friend class StackFrameIterator;
150 friend class ProfilerDartStackWalker;
151 DISALLOW_COPY_AND_ASSIGN(StackFrame); 150 DISALLOW_COPY_AND_ASSIGN(StackFrame);
152 }; 151 };
153 152
154 153
155 // Exit frame is used to mark the transition from dart code into dart VM 154 // Exit frame is used to mark the transition from dart code into dart VM
156 // runtime code. 155 // runtime code.
157 class ExitFrame : public StackFrame { 156 class ExitFrame : public StackFrame {
158 public: 157 public:
159 bool IsValid() const { return sp() == 0; } 158 bool IsValid() const { return sp() == 0; }
160 bool IsDartFrame(bool validate = true) const { return false; } 159 bool IsDartFrame(bool validate = true) const { return false; }
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 void SetupLastExitFrameData(); 279 void SetupLastExitFrameData();
281 void SetupNextExitFrameData(); 280 void SetupNextExitFrameData();
282 281
283 bool validate_; // Validate each frame as we traverse the frames. 282 bool validate_; // Validate each frame as we traverse the frames.
284 EntryFrame entry_; // Singleton entry frame returned by NextEntryFrame(). 283 EntryFrame entry_; // Singleton entry frame returned by NextEntryFrame().
285 ExitFrame exit_; // Singleton exit frame returned by NextExitFrame(). 284 ExitFrame exit_; // Singleton exit frame returned by NextExitFrame().
286 FrameSetIterator frames_; 285 FrameSetIterator frames_;
287 StackFrame* current_frame_; // Points to the current frame in the iterator. 286 StackFrame* current_frame_; // Points to the current frame in the iterator.
288 Thread* thread_; 287 Thread* thread_;
289 288
290 friend class ProfilerDartStackWalker;
291 DISALLOW_COPY_AND_ASSIGN(StackFrameIterator); 289 DISALLOW_COPY_AND_ASSIGN(StackFrameIterator);
292 }; 290 };
293 291
294 292
295 // Iterator for iterating over all dart frames (skips over exit frames, 293 // Iterator for iterating over all dart frames (skips over exit frames,
296 // entry frames and stub frames). 294 // entry frames and stub frames).
297 // A DartFrameIterator can be initialized with an isolate other than the 295 // A DartFrameIterator can be initialized with an isolate other than the
298 // current thread's isolate. Because this is generally a bad idea, 296 // current thread's isolate. Because this is generally a bad idea,
299 // it is only allowed on Windows- where it is needed for the profiler. 297 // it is only allowed on Windows- where it is needed for the profiler.
300 // It is the responsibility of users of DartFrameIterator to ensure that the 298 // It is the responsibility of users of DartFrameIterator to ensure that the
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 400
403 401
404 DART_FORCE_INLINE static uword LocalVarAddress(uword fp, intptr_t index) { 402 DART_FORCE_INLINE static uword LocalVarAddress(uword fp, intptr_t index) {
405 return fp + LocalVarIndex(0, index) * kWordSize; 403 return fp + LocalVarIndex(0, index) * kWordSize;
406 } 404 }
407 405
408 406
409 } // namespace dart 407 } // namespace dart
410 408
411 #endif // RUNTIME_VM_STACK_FRAME_H_ 409 #endif // RUNTIME_VM_STACK_FRAME_H_
OLDNEW
« no previous file with comments | « runtime/vm/profiler_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698