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

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

Issue 1545853002: Handle duration events when filtering the timeline for a time range (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 12 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 | « no previous file | runtime/vm/timeline.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 "vm/bootstrap_natives.h" 5 #include "vm/bootstrap_natives.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 8
9 #include "vm/native_entry.h" 9 #include "vm/native_entry.h"
10 #include "vm/object.h" 10 #include "vm/object.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 duration, 118 duration,
119 args.ToCString()); 119 args.ToCString());
120 120
121 TimelineEvent* event = isolate->GetDartStream()->StartEvent(); 121 TimelineEvent* event = isolate->GetDartStream()->StartEvent();
122 if (event == NULL) { 122 if (event == NULL) {
123 // Stream was turned off. 123 // Stream was turned off.
124 return Object::null(); 124 return Object::null();
125 } 125 }
126 // json was allocated in the zone and a copy will be stored in event. 126 // json was allocated in the zone and a copy will be stored in event.
127 event->SerializedJSON(json, start.AsInt64Value(), end.AsInt64Value()); 127 event->SerializedJSON(json, start.AsInt64Value(), end.AsInt64Value());
128 event->SetSerializedJSONIsDuration(true);
128 event->Complete(); 129 event->Complete();
129 130
130 return Object::null(); 131 return Object::null();
131 } 132 }
132 133
133 134
134 DEFINE_NATIVE_ENTRY(Timeline_reportInstantEvent, 4) { 135 DEFINE_NATIVE_ENTRY(Timeline_reportInstantEvent, 4) {
135 GET_NON_NULL_NATIVE_ARGUMENT(Integer, start, arguments->NativeArgAt(0)); 136 GET_NON_NULL_NATIVE_ARGUMENT(Integer, start, arguments->NativeArgAt(0));
136 GET_NON_NULL_NATIVE_ARGUMENT(String, category, arguments->NativeArgAt(1)); 137 GET_NON_NULL_NATIVE_ARGUMENT(String, category, arguments->NativeArgAt(1));
137 GET_NON_NULL_NATIVE_ARGUMENT(String, name, arguments->NativeArgAt(2)); 138 GET_NON_NULL_NATIVE_ARGUMENT(String, name, arguments->NativeArgAt(2));
(...skipping 30 matching lines...) Expand all
168 return Object::null(); 169 return Object::null();
169 } 170 }
170 // json was allocated in the zone and a copy will be stored in event. 171 // json was allocated in the zone and a copy will be stored in event.
171 event->SerializedJSON(json, start.AsInt64Value(), 0); 172 event->SerializedJSON(json, start.AsInt64Value(), 0);
172 event->Complete(); 173 event->Complete();
173 174
174 return Object::null(); 175 return Object::null();
175 } 176 }
176 177
177 } // namespace dart 178 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/timeline.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698