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

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

Issue 1919743003: Add Profiler::DumpStackTrace (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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 | « no previous file | runtime/vm/profiler.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 21 matching lines...) Expand all
32 static void InitOnce(); 32 static void InitOnce();
33 static void Shutdown(); 33 static void Shutdown();
34 34
35 static void SetSampleDepth(intptr_t depth); 35 static void SetSampleDepth(intptr_t depth);
36 static void SetSamplePeriod(intptr_t period); 36 static void SetSamplePeriod(intptr_t period);
37 37
38 static SampleBuffer* sample_buffer() { 38 static SampleBuffer* sample_buffer() {
39 return sample_buffer_; 39 return sample_buffer_;
40 } 40 }
41 41
42 static void DumpStackTrace(bool native_stack_trace = true);
43
42 static void SampleAllocation(Thread* thread, intptr_t cid); 44 static void SampleAllocation(Thread* thread, intptr_t cid);
43 45
44 // SampleThread is called from inside the signal handler and hence it is very 46 // SampleThread is called from inside the signal handler and hence it is very
45 // critical that the implementation of SampleThread does not do any of the 47 // critical that the implementation of SampleThread does not do any of the
46 // following: 48 // following:
47 // * Accessing TLS -- Because on Windows the callback will be running in a 49 // * Accessing TLS -- Because on Windows the callback will be running in a
48 // different thread. 50 // different thread.
49 // * Allocating memory -- Because this takes locks which may already be 51 // * Allocating memory -- Because this takes locks which may already be
50 // held, resulting in a dead lock. 52 // held, resulting in a dead lock.
51 // * Taking a lock -- See above. 53 // * Taking a lock -- See above.
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 private: 655 private:
654 ZoneGrowableArray<ProcessedSample*> samples_; 656 ZoneGrowableArray<ProcessedSample*> samples_;
655 CodeLookupTable* code_lookup_table_; 657 CodeLookupTable* code_lookup_table_;
656 658
657 DISALLOW_COPY_AND_ASSIGN(ProcessedSampleBuffer); 659 DISALLOW_COPY_AND_ASSIGN(ProcessedSampleBuffer);
658 }; 660 };
659 661
660 } // namespace dart 662 } // namespace dart
661 663
662 #endif // VM_PROFILER_H_ 664 #endif // VM_PROFILER_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698