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

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

Issue 376333002: vm/service/observatory: Add coverage for functions, some tests, and fix buggy filter (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: add observatory deployed/ Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « runtime/bin/vmservice/client/lib/src/service/object.dart ('k') | runtime/vm/coverage_test.cc » ('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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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/coverage.h" 5 #include "vm/coverage.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 8
9 #include "vm/compiler.h" 9 #include "vm/compiler.h"
10 #include "vm/isolate.h" 10 #include "vm/isolate.h"
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 // We stay within this loop while we are seeing functions from the same 168 // We stay within this loop while we are seeing functions from the same
169 // source URI. 169 // source URI.
170 while (i < functions.Length()) { 170 while (i < functions.Length()) {
171 function ^= functions.At(i); 171 function ^= functions.At(i);
172 script = function.script(); 172 script = function.script();
173 url = script.url(); 173 url = script.url();
174 if (!url.Equals(saved_url)) { 174 if (!url.Equals(saved_url)) {
175 pos_to_line.Clear(); 175 pos_to_line.Clear();
176 break; 176 break;
177 } 177 }
178 if (!filter->ShouldOutputCoverageFor(lib, saved_url, cls, function)) {
179 i++;
180 continue;
181 }
178 CompileAndAdd(function, hits_arr, pos_to_line); 182 CompileAndAdd(function, hits_arr, pos_to_line);
179 if (function.HasImplicitClosureFunction()) { 183 if (function.HasImplicitClosureFunction()) {
180 function = function.ImplicitClosureFunction(); 184 function = function.ImplicitClosureFunction();
181 CompileAndAdd(function, hits_arr, pos_to_line); 185 CompileAndAdd(function, hits_arr, pos_to_line);
182 } 186 }
183 i++; 187 i++;
184 } 188 }
185 } 189 }
186 190
187 GrowableObjectArray& closures = 191 GrowableObjectArray& closures =
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 cls = it.GetNextClass(); 283 cls = it.GetNextClass();
280 ASSERT(!cls.IsNull()); 284 ASSERT(!cls.IsNull());
281 PrintClass(lib, cls, jsarr, filter); 285 PrintClass(lib, cls, jsarr, filter);
282 } 286 }
283 } 287 }
284 } 288 }
285 } 289 }
286 290
287 291
288 } // namespace dart 292 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/bin/vmservice/client/lib/src/service/object.dart ('k') | runtime/vm/coverage_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698