| 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 <cstring> | 5 #include <cstring> | 
| 6 | 6 | 
| 7 #include "platform/assert.h" | 7 #include "platform/assert.h" | 
| 8 | 8 | 
| 9 #include "vm/dart_api_impl.h" | 9 #include "vm/dart_api_impl.h" | 
| 10 #include "vm/dart_api_state.h" | 10 #include "vm/dart_api_state.h" | 
| 11 #include "vm/globals.h" | 11 #include "vm/globals.h" | 
| 12 #include "vm/timeline.h" | 12 #include "vm/timeline.h" | 
| 13 #include "vm/timeline_analysis.h" | 13 #include "vm/timeline_analysis.h" | 
| 14 #include "vm/unit_test.h" | 14 #include "vm/unit_test.h" | 
| 15 | 15 | 
| 16 namespace dart { | 16 namespace dart { | 
| 17 | 17 | 
|  | 18 #ifndef PRODUCT | 
|  | 19 | 
| 18 class TimelineRecorderOverride : public ValueObject { | 20 class TimelineRecorderOverride : public ValueObject { | 
| 19  public: | 21  public: | 
| 20   explicit TimelineRecorderOverride(TimelineEventRecorder* new_recorder) | 22   explicit TimelineRecorderOverride(TimelineEventRecorder* new_recorder) | 
| 21       : recorder_(Timeline::recorder()) { | 23       : recorder_(Timeline::recorder()) { | 
| 22     Timeline::recorder_ = new_recorder; | 24     Timeline::recorder_ = new_recorder; | 
| 23   } | 25   } | 
| 24 | 26 | 
| 25   ~TimelineRecorderOverride() { | 27   ~TimelineRecorderOverride() { | 
| 26     Timeline::recorder_ = recorder_; | 28     Timeline::recorder_ = recorder_; | 
| 27   } | 29   } | 
| (...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 847 | 849 | 
| 848   { | 850   { | 
| 849     TimelinePauses pauses(zone, isolate, recorder); | 851     TimelinePauses pauses(zone, isolate, recorder); | 
| 850     pauses.Setup(); | 852     pauses.Setup(); | 
| 851     pauses.CalculatePauseTimesForThread(tid); | 853     pauses.CalculatePauseTimesForThread(tid); | 
| 852     EXPECT(pauses.has_error()); | 854     EXPECT(pauses.has_error()); | 
| 853   } | 855   } | 
| 854   TimelineTestHelper::Clear(recorder); | 856   TimelineTestHelper::Clear(recorder); | 
| 855 } | 857 } | 
| 856 | 858 | 
|  | 859 #endif  // !PRODUCT | 
|  | 860 | 
| 857 }  // namespace dart | 861 }  // namespace dart | 
| OLD | NEW | 
|---|