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

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

Issue 2803013004: Mark optimized code for the crash handler and disassembler output. (Closed)
Patch Set: . Created 3 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
« no previous file with comments | « runtime/vm/profiler_test.cc ('k') | no next file » | 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/stack_frame.h" 5 #include "vm/stack_frame.h"
6 6
7 #include "platform/memory_sanitizer.h" 7 #include "platform/memory_sanitizer.h"
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/deopt_instructions.h" 9 #include "vm/deopt_instructions.h"
10 #include "vm/isolate.h" 10 #include "vm/isolate.h"
(...skipping 21 matching lines...) Expand all
32 const intptr_t cid = code->ptr()->owner_->GetClassId(); 32 const intptr_t cid = code->ptr()->owner_->GetClassId();
33 ASSERT(cid == kNullCid || cid == kClassCid || cid == kFunctionCid); 33 ASSERT(cid == kNullCid || cid == kClassCid || cid == kFunctionCid);
34 return cid == kNullCid || cid == kClassCid; 34 return cid == kNullCid || cid == kClassCid;
35 } 35 }
36 36
37 37
38 const char* StackFrame::ToCString() const { 38 const char* StackFrame::ToCString() const {
39 ASSERT(thread_ == Thread::Current()); 39 ASSERT(thread_ == Thread::Current());
40 Zone* zone = Thread::Current()->zone(); 40 Zone* zone = Thread::Current()->zone();
41 if (IsDartFrame()) { 41 if (IsDartFrame()) {
42 const Code& code = Code::Handle(LookupDartCode()); 42 const Code& code = Code::Handle(zone, LookupDartCode());
43 ASSERT(!code.IsNull()); 43 ASSERT(!code.IsNull());
44 const Object& owner = Object::Handle(code.owner()); 44 const Object& owner = Object::Handle(zone, code.owner());
45 ASSERT(!owner.IsNull()); 45 ASSERT(!owner.IsNull());
46 if (owner.IsFunction()) { 46 if (owner.IsFunction()) {
47 const char* opt = code.is_optimized() ? "*" : "";
47 const Function& function = Function::Cast(owner); 48 const Function& function = Function::Cast(owner);
48 return zone->PrintToString( 49 return zone->PrintToString(
49 "[%-8s : sp(%#" Px ") fp(%#" Px ") pc(%#" Px ") %s ]", GetName(), 50 "[%-8s : sp(%#" Px ") fp(%#" Px ") pc(%#" Px ") %s%s ]", GetName(),
50 sp(), fp(), pc(), function.ToFullyQualifiedCString()); 51 sp(), fp(), pc(), opt, function.ToFullyQualifiedCString());
51 } else { 52 } else {
52 return zone->PrintToString( 53 return zone->PrintToString(
53 "[%-8s : sp(%#" Px ") fp(%#" Px ") pc(%#" Px ") %s ]", GetName(), 54 "[%-8s : sp(%#" Px ") fp(%#" Px ") pc(%#" Px ") %s ]", GetName(),
54 sp(), fp(), pc(), owner.ToCString()); 55 sp(), fp(), pc(), owner.ToCString());
55 } 56 }
56 } else { 57 } else {
57 return zone->PrintToString("[%-8s : sp(%#" Px ") fp(%#" Px ") pc(%#" Px 58 return zone->PrintToString("[%-8s : sp(%#" Px ") fp(%#" Px ") pc(%#" Px
58 ")]", 59 ")]",
59 GetName(), sp(), fp(), pc()); 60 GetName(), sp(), fp(), pc());
60 } 61 }
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 StackFrameIterator frames(StackFrameIterator::kValidateFrames); 580 StackFrameIterator frames(StackFrameIterator::kValidateFrames);
580 StackFrame* frame = frames.NextFrame(); 581 StackFrame* frame = frames.NextFrame();
581 while (frame != NULL) { 582 while (frame != NULL) {
582 frame = frames.NextFrame(); 583 frame = frames.NextFrame();
583 } 584 }
584 } 585 }
585 #endif 586 #endif
586 587
587 588
588 } // namespace dart 589 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/profiler_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698