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

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

Issue 1748953003: - Add assertions in MutexLocker/MonitorLocker to ensure that the code enclosed (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: code-review-comments Created 4 years, 9 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
« no previous file with comments | « runtime/vm/port.cc ('k') | runtime/vm/thread_pool.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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_PROFILER_H_ 5 #ifndef VM_PROFILER_H_
6 #define VM_PROFILER_H_ 6 #define VM_PROFILER_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/bitfield.h" 9 #include "vm/bitfield.h"
10 #include "vm/code_observers.h" 10 #include "vm/code_observers.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 // * Accessing TLS -- Because on Windows the callback will be running in a 47 // * Accessing TLS -- Because on Windows the callback will be running in a
48 // different thread. 48 // different thread.
49 // * Allocating memory -- Because this takes locks which may already be 49 // * Allocating memory -- Because this takes locks which may already be
50 // held, resulting in a dead lock. 50 // held, resulting in a dead lock.
51 // * Taking a lock -- See above. 51 // * Taking a lock -- See above.
52 static void SampleThread(Thread* thread, 52 static void SampleThread(Thread* thread,
53 const InterruptedThreadState& state); 53 const InterruptedThreadState& state);
54 54
55 private: 55 private:
56 static bool initialized_; 56 static bool initialized_;
57 static Monitor* monitor_;
58 57
59 static SampleBuffer* sample_buffer_; 58 static SampleBuffer* sample_buffer_;
60 59
61 friend class Thread; 60 friend class Thread;
62 }; 61 };
63 62
64 63
65 class SampleVisitor : public ValueObject { 64 class SampleVisitor : public ValueObject {
66 public: 65 public:
67 explicit SampleVisitor(Isolate* isolate) : isolate_(isolate), visited_(0) { } 66 explicit SampleVisitor(Isolate* isolate) : isolate_(isolate), visited_(0) { }
(...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after
634 private: 633 private:
635 ZoneGrowableArray<ProcessedSample*> samples_; 634 ZoneGrowableArray<ProcessedSample*> samples_;
636 CodeLookupTable* code_lookup_table_; 635 CodeLookupTable* code_lookup_table_;
637 636
638 DISALLOW_COPY_AND_ASSIGN(ProcessedSampleBuffer); 637 DISALLOW_COPY_AND_ASSIGN(ProcessedSampleBuffer);
639 }; 638 };
640 639
641 } // namespace dart 640 } // namespace dart
642 641
643 #endif // VM_PROFILER_H_ 642 #endif // VM_PROFILER_H_
OLDNEW
« no previous file with comments | « runtime/vm/port.cc ('k') | runtime/vm/thread_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698