OLD | NEW |
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 1091 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1102 AllocationFilter filter(isolate, one_byte_string_class.id()); | 1102 AllocationFilter filter(isolate, one_byte_string_class.id()); |
1103 profile.Build(thread, &filter, Profile::kNoTags); | 1103 profile.Build(thread, &filter, Profile::kNoTags); |
1104 // We should now have two allocation samples. | 1104 // We should now have two allocation samples. |
1105 EXPECT_EQ(2, profile.sample_count()); | 1105 EXPECT_EQ(2, profile.sample_count()); |
1106 } | 1106 } |
1107 } | 1107 } |
1108 | 1108 |
1109 | 1109 |
1110 TEST_CASE(Profiler_StringInterpolation) { | 1110 TEST_CASE(Profiler_StringInterpolation) { |
1111 DisableNativeProfileScope dnps; | 1111 DisableNativeProfileScope dnps; |
| 1112 DisableBackgroundCompilationScope dbcs; |
1112 const char* kScript = "String foo(String a, String b) => '$a | $b';"; | 1113 const char* kScript = "String foo(String a, String b) => '$a | $b';"; |
1113 Dart_Handle lib = TestCase::LoadTestScript(kScript, NULL); | 1114 Dart_Handle lib = TestCase::LoadTestScript(kScript, NULL); |
1114 EXPECT_VALID(lib); | 1115 EXPECT_VALID(lib); |
1115 Library& root_library = Library::Handle(); | 1116 Library& root_library = Library::Handle(); |
1116 root_library ^= Api::UnwrapHandle(lib); | 1117 root_library ^= Api::UnwrapHandle(lib); |
1117 Isolate* isolate = thread->isolate(); | 1118 Isolate* isolate = thread->isolate(); |
1118 | 1119 |
1119 const Class& one_byte_string_class = | 1120 const Class& one_byte_string_class = |
1120 Class::Handle(isolate->object_store()->one_byte_string_class()); | 1121 Class::Handle(isolate->object_store()->one_byte_string_class()); |
1121 EXPECT(!one_byte_string_class.IsNull()); | 1122 EXPECT(!one_byte_string_class.IsNull()); |
(...skipping 1372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2494 EXPECT_SUBSTRING("\"positions\":[\"TempMove\",39]", js.ToCString()); | 2495 EXPECT_SUBSTRING("\"positions\":[\"TempMove\",39]", js.ToCString()); |
2495 // Verify exclusive ticks in main. | 2496 // Verify exclusive ticks in main. |
2496 EXPECT_SUBSTRING("\"exclusiveTicks\":[1,0]", js.ToCString()); | 2497 EXPECT_SUBSTRING("\"exclusiveTicks\":[1,0]", js.ToCString()); |
2497 // Verify inclusive ticks in main. | 2498 // Verify inclusive ticks in main. |
2498 EXPECT_SUBSTRING("\"inclusiveTicks\":[1,2]", js.ToCString()); | 2499 EXPECT_SUBSTRING("\"inclusiveTicks\":[1,2]", js.ToCString()); |
2499 } | 2500 } |
2500 | 2501 |
2501 #endif // !PRODUCT | 2502 #endif // !PRODUCT |
2502 | 2503 |
2503 } // namespace dart | 2504 } // namespace dart |
OLD | NEW |