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

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

Issue 1289113003: Add TimelinePauses analysis and tests (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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/timeline.h ('k') | runtime/vm/timeline_analysis.h » ('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) 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
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
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
OLDNEW
« no previous file with comments | « runtime/vm/timeline.h ('k') | runtime/vm/timeline_analysis.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698