| 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 #include "platform/address_sanitizer.h" | 5 #include "platform/address_sanitizer.h" |
| 6 #include "platform/memory_sanitizer.h" | 6 #include "platform/memory_sanitizer.h" |
| 7 #include "platform/utils.h" | 7 #include "platform/utils.h" |
| 8 | 8 |
| 9 #include "vm/allocation.h" | 9 #include "vm/allocation.h" |
| 10 #include "vm/atomic.h" | 10 #include "vm/atomic.h" |
| (...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 void ClearProfileVisitor::VisitSample(Sample* sample) { | 328 void ClearProfileVisitor::VisitSample(Sample* sample) { |
| 329 sample->Clear(); | 329 sample->Clear(); |
| 330 } | 330 } |
| 331 | 331 |
| 332 | 332 |
| 333 static void DumpStackFrame(intptr_t frame_index, uword pc) { | 333 static void DumpStackFrame(intptr_t frame_index, uword pc) { |
| 334 uintptr_t start = 0; | 334 uintptr_t start = 0; |
| 335 char* native_symbol_name = | 335 char* native_symbol_name = |
| 336 NativeSymbolResolver::LookupSymbolName(pc, &start); | 336 NativeSymbolResolver::LookupSymbolName(pc, &start); |
| 337 if (native_symbol_name == NULL) { | 337 if (native_symbol_name == NULL) { |
| 338 OS::PrintErr("Frame[%" Pd "] = `unknown symbol` [0x%" Px "]\n", | 338 OS::PrintErr(" [0x%" Pp "] Unknown symbol\n", pc); |
| 339 frame_index, pc); | |
| 340 } else { | 339 } else { |
| 341 OS::PrintErr("Frame[%" Pd "] = `%s` [0x%" Px "]\n", | 340 OS::PrintErr(" [0x%" Pp "] %s\n", pc, native_symbol_name); |
| 342 frame_index, native_symbol_name, pc); | |
| 343 NativeSymbolResolver::FreeSymbolName(native_symbol_name); | 341 NativeSymbolResolver::FreeSymbolName(native_symbol_name); |
| 344 } | 342 } |
| 345 } | 343 } |
| 346 | 344 |
| 347 | 345 |
| 348 static void DumpStackFrame(intptr_t frame_index, | 346 static void DumpStackFrame(intptr_t frame_index, |
| 349 uword pc, | 347 uword pc, |
| 350 const Code& code) { | 348 const Code& code) { |
| 351 if (code.IsNull()) { | 349 if (code.IsNull()) { |
| 352 DumpStackFrame(frame_index, pc); | 350 DumpStackFrame(frame_index, pc); |
| (...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1026 } else { | 1024 } else { |
| 1027 ProfilerDartStackWalker dart_stack_walker(isolate, | 1025 ProfilerDartStackWalker dart_stack_walker(isolate, |
| 1028 NULL, | 1026 NULL, |
| 1029 NULL, | 1027 NULL, |
| 1030 stack_lower, | 1028 stack_lower, |
| 1031 stack_upper, | 1029 stack_upper, |
| 1032 pc, | 1030 pc, |
| 1033 fp, | 1031 fp, |
| 1034 sp); | 1032 sp); |
| 1035 } | 1033 } |
| 1036 OS::PrintErr("-- End of DumpStackTrace"); | 1034 OS::PrintErr("-- End of DumpStackTrace\n"); |
| 1037 } | 1035 } |
| 1038 | 1036 |
| 1039 | 1037 |
| 1040 void Profiler::SampleAllocation(Thread* thread, intptr_t cid) { | 1038 void Profiler::SampleAllocation(Thread* thread, intptr_t cid) { |
| 1041 ASSERT(thread != NULL); | 1039 ASSERT(thread != NULL); |
| 1042 OSThread* os_thread = thread->os_thread(); | 1040 OSThread* os_thread = thread->os_thread(); |
| 1043 ASSERT(os_thread != NULL); | 1041 ASSERT(os_thread != NULL); |
| 1044 Isolate* isolate = thread->isolate(); | 1042 Isolate* isolate = thread->isolate(); |
| 1045 if (!CheckIsolate(isolate)) { | 1043 if (!CheckIsolate(isolate)) { |
| 1046 return; | 1044 return; |
| (...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1596 | 1594 |
| 1597 | 1595 |
| 1598 ProcessedSampleBuffer::ProcessedSampleBuffer() | 1596 ProcessedSampleBuffer::ProcessedSampleBuffer() |
| 1599 : code_lookup_table_(new CodeLookupTable(Thread::Current())) { | 1597 : code_lookup_table_(new CodeLookupTable(Thread::Current())) { |
| 1600 ASSERT(code_lookup_table_ != NULL); | 1598 ASSERT(code_lookup_table_ != NULL); |
| 1601 } | 1599 } |
| 1602 | 1600 |
| 1603 #endif // !PRODUCT | 1601 #endif // !PRODUCT |
| 1604 | 1602 |
| 1605 } // namespace dart | 1603 } // namespace dart |
| OLD | NEW |