OLD | NEW |
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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 } | 226 } |
227 | 227 |
228 bool leaf_frame_is_dart() const { | 228 bool leaf_frame_is_dart() const { |
229 return LeafFrameIsDart::decode(state_); | 229 return LeafFrameIsDart::decode(state_); |
230 } | 230 } |
231 | 231 |
232 void set_leaf_frame_is_dart(bool leaf_frame_is_dart) { | 232 void set_leaf_frame_is_dart(bool leaf_frame_is_dart) { |
233 state_ = LeafFrameIsDart::update(leaf_frame_is_dart, state_); | 233 state_ = LeafFrameIsDart::update(leaf_frame_is_dart, state_); |
234 } | 234 } |
235 | 235 |
| 236 bool ignore_sample() const { |
| 237 return IgnoreBit::decode(state_); |
| 238 } |
| 239 |
| 240 void set_ignore_sample(bool ignore_sample) { |
| 241 state_ = IgnoreBit::update(ignore_sample, state_); |
| 242 } |
| 243 |
236 static void InitOnce(); | 244 static void InitOnce(); |
237 | 245 |
238 static intptr_t instance_size() { | 246 static intptr_t instance_size() { |
239 return instance_size_; | 247 return instance_size_; |
240 } | 248 } |
241 | 249 |
242 uword* GetPCArray() const; | 250 uword* GetPCArray() const; |
243 | 251 |
244 private: | 252 private: |
245 static intptr_t instance_size_; | 253 static intptr_t instance_size_; |
246 static intptr_t pcs_length_; | 254 static intptr_t pcs_length_; |
247 enum StateBits { | 255 enum StateBits { |
248 kProcessedBit = 0, | 256 kProcessedBit = 0, |
249 kLeafFrameIsDartBit = 1, | 257 kLeafFrameIsDartBit = 1, |
| 258 kIgnoreBit = 2, |
250 }; | 259 }; |
251 class ProcessedBit : public BitField<bool, kProcessedBit, 1> {}; | 260 class ProcessedBit : public BitField<bool, kProcessedBit, 1> {}; |
252 class LeafFrameIsDart : public BitField<bool, kLeafFrameIsDartBit, 1> {}; | 261 class LeafFrameIsDart : public BitField<bool, kLeafFrameIsDartBit, 1> {}; |
| 262 class IgnoreBit : public BitField<bool, kIgnoreBit, 1> {}; |
253 | 263 |
254 int64_t timestamp_; | 264 int64_t timestamp_; |
255 ThreadId tid_; | 265 ThreadId tid_; |
256 Isolate* isolate_; | 266 Isolate* isolate_; |
257 uword pc_marker_; | 267 uword pc_marker_; |
258 uword vm_tag_; | 268 uword vm_tag_; |
259 uword user_tag_; | 269 uword user_tag_; |
260 uword sp_; | 270 uword sp_; |
261 uword fp_; | 271 uword fp_; |
262 uword state_; | 272 uword state_; |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 intptr_t capacity_; | 326 intptr_t capacity_; |
317 uintptr_t cursor_; | 327 uintptr_t cursor_; |
318 | 328 |
319 DISALLOW_COPY_AND_ASSIGN(SampleBuffer); | 329 DISALLOW_COPY_AND_ASSIGN(SampleBuffer); |
320 }; | 330 }; |
321 | 331 |
322 | 332 |
323 } // namespace dart | 333 } // namespace dart |
324 | 334 |
325 #endif // VM_PROFILER_H_ | 335 #endif // VM_PROFILER_H_ |
OLD | NEW |