mirror of
https://github.com/dart-lang/sdk
synced 2024-09-15 22:00:09 +00:00
[VM/Runtime] - Remove TimelineEventBlockIterator which is dead code.
Dead since ff2fd8fe54
.
TEST=Deleted code, no new functionality added. Regular CI runs.
Change-Id: I95716abfe9807eba48dbbc7fa3efc7f58cd1b11d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/209760
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
This commit is contained in:
parent
5447c3981e
commit
f21c9d54ea
|
@ -62,7 +62,6 @@ class Mutex {
|
|||
friend class MutexLocker;
|
||||
friend class SafepointMutexLocker;
|
||||
friend class OSThreadIterator;
|
||||
friend class TimelineEventBlockIterator;
|
||||
friend class TimelineEventRecorder;
|
||||
friend class PageSpace;
|
||||
friend void Dart_TestMutex();
|
||||
|
|
|
@ -1516,44 +1516,6 @@ void TimelineEventBlock::Finish() {
|
|||
#endif
|
||||
}
|
||||
|
||||
TimelineEventBlockIterator::TimelineEventBlockIterator(
|
||||
TimelineEventRecorder* recorder)
|
||||
: current_(NULL), recorder_(NULL) {
|
||||
Reset(recorder);
|
||||
}
|
||||
|
||||
TimelineEventBlockIterator::~TimelineEventBlockIterator() {
|
||||
Reset(NULL);
|
||||
}
|
||||
|
||||
void TimelineEventBlockIterator::Reset(TimelineEventRecorder* recorder) {
|
||||
// Clear current.
|
||||
current_ = NULL;
|
||||
if (recorder_ != NULL) {
|
||||
// Unlock old recorder.
|
||||
recorder_->lock_.Unlock();
|
||||
}
|
||||
recorder_ = recorder;
|
||||
if (recorder_ == NULL) {
|
||||
return;
|
||||
}
|
||||
// Lock new recorder.
|
||||
recorder_->lock_.Lock();
|
||||
// Queue up first block.
|
||||
current_ = recorder_->GetHeadBlockLocked();
|
||||
}
|
||||
|
||||
bool TimelineEventBlockIterator::HasNext() const {
|
||||
return current_ != NULL;
|
||||
}
|
||||
|
||||
TimelineEventBlock* TimelineEventBlockIterator::Next() {
|
||||
ASSERT(current_ != NULL);
|
||||
TimelineEventBlock* r = current_;
|
||||
current_ = current_->next();
|
||||
return r;
|
||||
}
|
||||
|
||||
void DartTimelineEventHelpers::ReportTaskEvent(Thread* thread,
|
||||
TimelineEvent* event,
|
||||
int64_t id,
|
||||
|
|
|
@ -757,7 +757,6 @@ class TimelineEventRecorder : public MallocAllocated {
|
|||
int64_t time_high_micros_;
|
||||
|
||||
friend class TimelineEvent;
|
||||
friend class TimelineEventBlockIterator;
|
||||
friend class TimelineStream;
|
||||
friend class TimelineTestHelper;
|
||||
friend class Timeline;
|
||||
|
@ -887,25 +886,6 @@ class TimelineEventEndlessRecorder : public TimelineEventRecorder {
|
|||
friend class TimelineTestHelper;
|
||||
};
|
||||
|
||||
// An iterator for blocks.
|
||||
class TimelineEventBlockIterator {
|
||||
public:
|
||||
explicit TimelineEventBlockIterator(TimelineEventRecorder* recorder);
|
||||
~TimelineEventBlockIterator();
|
||||
|
||||
void Reset(TimelineEventRecorder* recorder);
|
||||
|
||||
// Returns false when there are no more blocks.
|
||||
bool HasNext() const;
|
||||
|
||||
// Returns the next block and moves forward.
|
||||
TimelineEventBlock* Next();
|
||||
|
||||
private:
|
||||
TimelineEventBlock* current_;
|
||||
TimelineEventRecorder* recorder_;
|
||||
};
|
||||
|
||||
// The TimelineEventPlatformRecorder records timeline events to a platform
|
||||
// specific destination. It's implementation is in the timeline_{linux,...}.cc
|
||||
// files.
|
||||
|
|
Loading…
Reference in a new issue