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

Side by Side Diff: runtime/vm/debugger.cc

Issue 2691213003: Reland improvements to causal async stack traces (Closed)
Patch Set: Created 3 years, 10 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/debugger.h ('k') | runtime/vm/object.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 #include "vm/debugger.h" 5 #include "vm/debugger.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 8
9 #include "platform/address_sanitizer.h" 9 #include "platform/address_sanitizer.h"
10 10
(...skipping 1684 matching lines...) Expand 10 before | Expand all | Expand 10 after
1695 // frames but a historical record of how this asynchronous function was 1695 // frames but a historical record of how this asynchronous function was
1696 // activated. 1696 // activated.
1697 while (!async_stack_trace.IsNull()) { 1697 while (!async_stack_trace.IsNull()) {
1698 for (intptr_t i = 0; i < async_stack_trace.Length(); i++) { 1698 for (intptr_t i = 0; i < async_stack_trace.Length(); i++) {
1699 if (async_stack_trace.CodeAtFrame(i) == Code::null()) { 1699 if (async_stack_trace.CodeAtFrame(i) == Code::null()) {
1700 break; 1700 break;
1701 } 1701 }
1702 if (async_stack_trace.CodeAtFrame(i) == 1702 if (async_stack_trace.CodeAtFrame(i) ==
1703 StubCode::AsynchronousGapMarker_entry()->code()) { 1703 StubCode::AsynchronousGapMarker_entry()->code()) {
1704 stack_trace->AddMarker(ActivationFrame::kAsyncSuspensionMarker); 1704 stack_trace->AddMarker(ActivationFrame::kAsyncSuspensionMarker);
1705 // The frame immediately below the asynchronous gap marker is the
1706 // identical to the frame above the marker. Skip the frame to enhance
1707 // the readability of the trace.
1708 i++;
1705 } else { 1709 } else {
1706 code = Code::RawCast(async_stack_trace.CodeAtFrame(i)); 1710 code = Code::RawCast(async_stack_trace.CodeAtFrame(i));
1707 offset = Smi::RawCast(async_stack_trace.PcOffsetAtFrame(i)); 1711 offset = Smi::RawCast(async_stack_trace.PcOffsetAtFrame(i));
1708 uword pc = code.PayloadStart() + offset.Value(); 1712 uword pc = code.PayloadStart() + offset.Value();
1709 if (code.is_optimized()) { 1713 if (code.is_optimized()) {
1710 for (InlinedFunctionsIterator it(code, pc); !it.Done(); 1714 for (InlinedFunctionsIterator it(code, pc); !it.Done();
1711 it.Advance()) { 1715 it.Advance()) {
1712 inlined_code = it.code(); 1716 inlined_code = it.code();
1713 stack_trace->AddAsyncCausalFrame(pc, inlined_code); 1717 stack_trace->AddAsyncCausalFrame(pc, inlined_code);
1714 } 1718 }
(...skipping 2112 matching lines...) Expand 10 before | Expand all | Expand 10 after
3827 3831
3828 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { 3832 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) {
3829 ASSERT(bpt->next() == NULL); 3833 ASSERT(bpt->next() == NULL);
3830 bpt->set_next(code_breakpoints_); 3834 bpt->set_next(code_breakpoints_);
3831 code_breakpoints_ = bpt; 3835 code_breakpoints_ = bpt;
3832 } 3836 }
3833 3837
3834 #endif // !PRODUCT 3838 #endif // !PRODUCT
3835 3839
3836 } // namespace dart 3840 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/debugger.h ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698