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

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

Issue 2603383004: Sane asynchronous debugging and stack traces (Closed)
Patch Set: rebase Created 3 years, 11 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/service/service.md ('k') | runtime/vm/stack_trace.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
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.
4
5 #ifndef RUNTIME_VM_STACK_TRACE_H_
6 #define RUNTIME_VM_STACK_TRACE_H_
7
8 #include "vm/allocation.h"
9 #include "vm/flag_list.h"
10 #include "vm/object.h"
11
12 namespace dart {
13
14 DECLARE_FLAG(bool, show_invisible_frames);
15
16 class StackTraceUtils : public AllStatic {
17 public:
18 /// Counts the number of stack frames.
19 /// Skips over the first |skip_frames|.
20 /// If |async_function| is not null, stops at the function that has
21 /// |async_function| as its parent.
22 static intptr_t CountFrames(
23 int skip_frames,
24 const Function& async_function,
25 bool count_invisible_frames = FLAG_show_invisible_frames);
26
27 /// Collects |count| frames into |code_array| and |pc_offset_array|.
28 /// Writing begins at |array_offset|.
29 /// Skips over the first |skip_frames|.
30 /// Returns the number of frames collected.
31 static intptr_t CollectFrames(
32 const Array& code_array,
33 const Array& pc_offset_array,
34 intptr_t array_offset,
35 intptr_t count,
36 int skip_frames,
37 bool collect_invisible_frames = FLAG_show_invisible_frames);
38
39 /// If |thread| has no async_stack_trace, does nothing.
40 /// Populates |async_function| with the top function of the async stack
41 /// trace. Populates |async_code_array| and |async_pc_offset_array| with
42 /// the thread's async_stack_trace.
43 /// Returns the length of the asynchronous stack trace.
44 static intptr_t ExtractAsyncStackTraceInfo(Thread* thread,
45 Function* async_function,
46 Array* async_code_array,
47 Array* async_pc_offset_array);
48 };
49
50 } // namespace dart
51
52 #endif // RUNTIME_VM_STACK_TRACE_H_
OLDNEW
« no previous file with comments | « runtime/vm/service/service.md ('k') | runtime/vm/stack_trace.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698