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

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

Issue 230863005: Initial UserTag and dart:profiler library (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 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 | Annotate | Revision Log
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/code_observers.h" 9 #include "vm/code_observers.h"
10 #include "vm/globals.h" 10 #include "vm/globals.h"
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 } 142 }
143 143
144 uword vm_tag() const { 144 uword vm_tag() const {
145 return vm_tag_; 145 return vm_tag_;
146 } 146 }
147 void set_vm_tag(uword tag) { 147 void set_vm_tag(uword tag) {
148 ASSERT(tag != VMTag::kInvalidTagId); 148 ASSERT(tag != VMTag::kInvalidTagId);
149 vm_tag_ = tag; 149 vm_tag_ = tag;
150 } 150 }
151 151
152 uword user_tag() const {
153 return user_tag_;
154 }
155 void set_user_tag(uword tag) {
156 user_tag_ = tag;
157 }
158
152 private: 159 private:
153 int64_t timestamp_; 160 int64_t timestamp_;
154 ThreadId tid_; 161 ThreadId tid_;
155 Isolate* isolate_; 162 Isolate* isolate_;
156 uword vm_tag_; 163 uword vm_tag_;
164 uword user_tag_;
157 uword pcs_[kSampleFramesSize]; 165 uword pcs_[kSampleFramesSize];
158 }; 166 };
159 167
160 168
161 // Ring buffer of Samples that is (usually) shared by many isolates. 169 // Ring buffer of Samples that is (usually) shared by many isolates.
162 class SampleBuffer { 170 class SampleBuffer {
163 public: 171 public:
164 static const intptr_t kDefaultBufferCapacity = 120000; // 2 minutes @ 1000hz. 172 static const intptr_t kDefaultBufferCapacity = 120000; // 2 minutes @ 1000hz.
165 173
166 explicit SampleBuffer(intptr_t capacity = kDefaultBufferCapacity) { 174 explicit SampleBuffer(intptr_t capacity = kDefaultBufferCapacity) {
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 intptr_t capacity_; 225 intptr_t capacity_;
218 uintptr_t cursor_; 226 uintptr_t cursor_;
219 227
220 DISALLOW_COPY_AND_ASSIGN(SampleBuffer); 228 DISALLOW_COPY_AND_ASSIGN(SampleBuffer);
221 }; 229 };
222 230
223 231
224 } // namespace dart 232 } // namespace dart
225 233
226 #endif // VM_PROFILER_H_ 234 #endif // VM_PROFILER_H_
OLDNEW
« runtime/vm/object.cc ('K') | « runtime/vm/object_store.cc ('k') | runtime/vm/profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698