Chromium Code Reviews| Index: runtime/vm/profiler_test.cc |
| diff --git a/runtime/vm/profiler_test.cc b/runtime/vm/profiler_test.cc |
| index 63ac759d663f9ef4f976a8cad0496adee1d9176d..a88e26e21b2ba5159197bd68d7fa66b998c0a42e 100644 |
| --- a/runtime/vm/profiler_test.cc |
| +++ b/runtime/vm/profiler_test.cc |
| @@ -875,10 +875,10 @@ TEST_CASE(Profiler_ClassAllocation) { |
| root_library ^= Api::UnwrapHandle(lib); |
| Isolate* isolate = thread->isolate(); |
| - const Class& class_class = |
| - Class::Handle(Object::class_class()); |
| - EXPECT(!class_class.IsNull()); |
| - class_class.SetTraceAllocation(true); |
| + const Class& closure_class = |
| + Class::Handle(Isolate::Current()->object_store()->closure_class()); |
| + EXPECT(!closure_class.IsNull()); |
| + closure_class.SetTraceAllocation(true); |
| // Invoke "foo" which during compilation, triggers a closure class allocation. |
|
rmacnak
2016/01/19 19:27:12
Doesn't allocate a class anymore.
regis
2016/01/19 23:15:29
Removed "class".
|
| Dart_Handle result = Dart_Invoke(lib, NewString("foo"), 0, NULL); |
| @@ -888,7 +888,7 @@ TEST_CASE(Profiler_ClassAllocation) { |
| StackZone zone(thread); |
| HANDLESCOPE(thread); |
| Profile profile(isolate); |
| - AllocationFilter filter(isolate, class_class.id()); |
| + AllocationFilter filter(isolate, closure_class.id()); |
| filter.set_enable_vm_ticks(true); |
| profile.Build(thread, &filter, Profile::kNoTags); |
| // We should have one allocation sample. |
| @@ -897,17 +897,12 @@ TEST_CASE(Profiler_ClassAllocation) { |
| walker.Reset(Profile::kExclusiveCode); |
| EXPECT(walker.Down()); |
| -#if defined(TARGET_OS_WINDOWS) |
| - // TODO(johnmccutchan): Hookup native symbol resolver on Windows. |
| - EXPECT_SUBSTRING("[Native]", walker.CurrentName()); |
| -#else |
| - EXPECT_SUBSTRING("dart::Profiler::SampleAllocation", walker.CurrentName()); |
| -#endif |
| + EXPECT_SUBSTRING("foo", walker.CurrentName()); |
| EXPECT(!walker.Down()); |
| } |
| - // Disable allocation tracing for Class. |
| - class_class.SetTraceAllocation(false); |
| + // Disable allocation tracing for Closure. |
| + closure_class.SetTraceAllocation(false); |
| // Invoke "bar" which during compilation, triggers a closure class allocation. |
|
rmacnak
2016/01/19 19:27:11
Doesn't allocate a class anymore.
regis
2016/01/19 23:15:30
Removed "class".
|
| result = Dart_Invoke(lib, NewString("bar"), 0, NULL); |
| @@ -917,7 +912,7 @@ TEST_CASE(Profiler_ClassAllocation) { |
| StackZone zone(thread); |
| HANDLESCOPE(thread); |
| Profile profile(isolate); |
| - AllocationFilter filter(isolate, class_class.id()); |
| + AllocationFilter filter(isolate, closure_class.id()); |
| filter.set_enable_vm_ticks(true); |
| profile.Build(thread, &filter, Profile::kNoTags); |
| // We should still only have one allocation sample. |