| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 <cstdlib> | 5 #include <cstdlib> |
| 6 | 6 |
| 7 #include "vm/isolate.h" | 7 #include "vm/isolate.h" |
| 8 #include "vm/json_stream.h" | 8 #include "vm/json_stream.h" |
| 9 #include "vm/lockers.h" | 9 #include "vm/lockers.h" |
| 10 #include "vm/object.h" | 10 #include "vm/object.h" |
| (...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 639 if (!event->IsValid()) { | 639 if (!event->IsValid()) { |
| 640 continue; | 640 continue; |
| 641 } | 641 } |
| 642 events->AddValue(event); | 642 events->AddValue(event); |
| 643 } | 643 } |
| 644 current = current->next(); | 644 current = current->next(); |
| 645 } | 645 } |
| 646 } | 646 } |
| 647 | 647 |
| 648 | 648 |
| 649 void TimelineEventEndlessRecorder::Clear() { |
| 650 TimelineEventBlock* current = head_; |
| 651 while (current != NULL) { |
| 652 TimelineEventBlock* next = current->next(); |
| 653 delete current; |
| 654 current = next; |
| 655 } |
| 656 head_ = NULL; |
| 657 block_index_ = 0; |
| 658 Thread* thread = Thread::Current(); |
| 659 thread->set_timeline_block(NULL); |
| 660 } |
| 661 |
| 662 |
| 649 TimelineEventBlock::TimelineEventBlock(intptr_t block_index) | 663 TimelineEventBlock::TimelineEventBlock(intptr_t block_index) |
| 650 : next_(NULL), | 664 : next_(NULL), |
| 651 length_(0), | 665 length_(0), |
| 652 block_index_(block_index) { | 666 block_index_(block_index) { |
| 653 } | 667 } |
| 654 | 668 |
| 655 | 669 |
| 656 TimelineEventBlock::~TimelineEventBlock() { | 670 TimelineEventBlock::~TimelineEventBlock() { |
| 657 Reset(); | 671 Reset(); |
| 658 } | 672 } |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 748 | 762 |
| 749 | 763 |
| 750 TimelineEventBlock* TimelineEventBlockIterator::Next() { | 764 TimelineEventBlock* TimelineEventBlockIterator::Next() { |
| 751 ASSERT(current_ != NULL); | 765 ASSERT(current_ != NULL); |
| 752 TimelineEventBlock* r = current_; | 766 TimelineEventBlock* r = current_; |
| 753 current_ = current_->next(); | 767 current_ = current_->next(); |
| 754 return r; | 768 return r; |
| 755 } | 769 } |
| 756 | 770 |
| 757 } // namespace dart | 771 } // namespace dart |
| OLD | NEW |