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

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

Issue 1220483002: Fix expected function names in Profiler_ToggleRecordAllocation test (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | no next file » | 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 "platform/assert.h" 5 #include "platform/assert.h"
6 6
7 #include "vm/dart_api_impl.h" 7 #include "vm/dart_api_impl.h"
8 #include "vm/dart_api_state.h" 8 #include "vm/dart_api_state.h"
9 #include "vm/globals.h" 9 #include "vm/globals.h"
10 #include "vm/profiler.h" 10 #include "vm/profiler.h"
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 EXPECT(walker.Down()); 273 EXPECT(walker.Down());
274 EXPECT_STREQ("main", walker.CurrentName()); 274 EXPECT_STREQ("main", walker.CurrentName());
275 EXPECT(walker.Down()); 275 EXPECT(walker.Down());
276 EXPECT_STREQ("B.boo", walker.CurrentName()); 276 EXPECT_STREQ("B.boo", walker.CurrentName());
277 EXPECT(!walker.Down()); 277 EXPECT(!walker.Down());
278 278
279 // Exclusive function: boo -> main. 279 // Exclusive function: boo -> main.
280 walker.Reset(Profile::kExclusiveFunction); 280 walker.Reset(Profile::kExclusiveFunction);
281 // Move down from the root. 281 // Move down from the root.
282 EXPECT(walker.Down()); 282 EXPECT(walker.Down());
283 EXPECT_STREQ("boo", walker.CurrentName()); 283 EXPECT_STREQ("B.boo", walker.CurrentName());
284 EXPECT(walker.Down()); 284 EXPECT(walker.Down());
285 EXPECT_STREQ("main", walker.CurrentName()); 285 EXPECT_STREQ("main", walker.CurrentName());
286 EXPECT(!walker.Down()); 286 EXPECT(!walker.Down());
287 287
288 // Inclusive function: main -> boo. 288 // Inclusive function: main -> boo.
289 walker.Reset(Profile::kInclusiveFunction); 289 walker.Reset(Profile::kInclusiveFunction);
290 // Move down from the root. 290 // Move down from the root.
291 EXPECT(walker.Down()); 291 EXPECT(walker.Down());
292 EXPECT_STREQ("main", walker.CurrentName()); 292 EXPECT_STREQ("main", walker.CurrentName());
293 EXPECT(walker.Down()); 293 EXPECT(walker.Down());
294 EXPECT_STREQ("boo", walker.CurrentName()); 294 EXPECT_STREQ("B.boo", walker.CurrentName());
295 EXPECT(!walker.Down()); 295 EXPECT(!walker.Down());
296 } 296 }
297 297
298 // Turn off allocation tracing for A. 298 // Turn off allocation tracing for A.
299 class_a.SetTraceAllocation(false); 299 class_a.SetTraceAllocation(false);
300 300
301 result = Dart_Invoke(lib, NewString("main"), 0, NULL); 301 result = Dart_Invoke(lib, NewString("main"), 0, NULL);
302 EXPECT_VALID(result); 302 EXPECT_VALID(result);
303 303
304 { 304 {
305 Isolate* isolate = Isolate::Current(); 305 Isolate* isolate = Isolate::Current();
306 StackZone zone(isolate); 306 StackZone zone(isolate);
307 HANDLESCOPE(isolate); 307 HANDLESCOPE(isolate);
308 Profile profile(isolate); 308 Profile profile(isolate);
309 AllocationFilter filter(isolate, class_a.id()); 309 AllocationFilter filter(isolate, class_a.id());
310 profile.Build(&filter, Profile::kNoTags); 310 profile.Build(&filter, Profile::kNoTags);
311 // We should still only have one allocation sample. 311 // We should still only have one allocation sample.
312 EXPECT_EQ(1, profile.sample_count()); 312 EXPECT_EQ(1, profile.sample_count());
313 } 313 }
314 } 314 }
315 315
316 } // namespace dart 316 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698