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

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

Issue 2845053003: Fix asserts in StackFrameIterator which were effectively disabled (Closed)
Patch Set: remote two assertions which cannot be made Created 3 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
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 #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 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 sample, 444 sample,
445 sample_buffer, 445 sample_buffer,
446 skip_count), 446 skip_count),
447 pc_(reinterpret_cast<uword*>(pc)), 447 pc_(reinterpret_cast<uword*>(pc)),
448 fp_(reinterpret_cast<uword*>(fp)), 448 fp_(reinterpret_cast<uword*>(fp)),
449 sp_(reinterpret_cast<uword*>(sp)), 449 sp_(reinterpret_cast<uword*>(sp)),
450 stack_upper_(stack_upper), 450 stack_upper_(stack_upper),
451 stack_lower_(stack_lower), 451 stack_lower_(stack_lower),
452 has_exit_frame_(exited_dart_code) { 452 has_exit_frame_(exited_dart_code) {
453 if (exited_dart_code) { 453 if (exited_dart_code) {
454 // On windows the profiler does not run on the thread being profiled.
455 #if defined(_WIN32)
456 const bool kAllowIteratingOtherThread = true;
457 #else
458 const bool kAllowIteratingOtherThread = false;
459 #endif
454 StackFrameIterator iterator(StackFrameIterator::kDontValidateFrames, 460 StackFrameIterator iterator(StackFrameIterator::kDontValidateFrames,
455 thread); 461 thread, kAllowIteratingOtherThread);
456 pc_ = NULL; 462 pc_ = NULL;
457 fp_ = NULL; 463 fp_ = NULL;
458 sp_ = NULL; 464 sp_ = NULL;
459 if (!iterator.HasNextFrame()) { 465 if (!iterator.HasNextFrame()) {
460 return; 466 return;
461 } 467 }
462 // Ensure we are able to get to the exit frame. 468 // Ensure we are able to get to the exit frame.
463 StackFrame* frame = iterator.NextFrame(); 469 StackFrame* frame = iterator.NextFrame();
464 if (!frame->IsExitFrame()) { 470 if (!frame->IsExitFrame()) {
465 return; 471 return;
(...skipping 1138 matching lines...) Expand 10 before | Expand all | Expand 10 after
1604 1610
1605 1611
1606 ProcessedSampleBuffer::ProcessedSampleBuffer() 1612 ProcessedSampleBuffer::ProcessedSampleBuffer()
1607 : code_lookup_table_(new CodeLookupTable(Thread::Current())) { 1613 : code_lookup_table_(new CodeLookupTable(Thread::Current())) {
1608 ASSERT(code_lookup_table_ != NULL); 1614 ASSERT(code_lookup_table_ != NULL);
1609 } 1615 }
1610 1616
1611 #endif // !PRODUCT 1617 #endif // !PRODUCT
1612 1618
1613 } // namespace dart 1619 } // namespace dart
OLDNEW
« runtime/vm/debugger.cc ('K') | « runtime/vm/os_win.cc ('k') | runtime/vm/runtime_entry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698