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 1352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1363 EXPECT_STREQ("B.choo", walker.CurrentName()); | 1363 EXPECT_STREQ("B.choo", walker.CurrentName()); |
1364 EXPECT(walker.Down()); | 1364 EXPECT(walker.Down()); |
1365 EXPECT_STREQ("[Inline End]", walker.CurrentName()); | 1365 EXPECT_STREQ("[Inline End]", walker.CurrentName()); |
1366 EXPECT(!walker.Down()); | 1366 EXPECT(!walker.Down()); |
1367 } | 1367 } |
1368 } | 1368 } |
1369 | 1369 |
1370 | 1370 |
1371 TEST_CASE(Profiler_ChainedSamples) { | 1371 TEST_CASE(Profiler_ChainedSamples) { |
1372 MaxProfileDepthScope mpds(32); | 1372 MaxProfileDepthScope mpds(32); |
| 1373 DisableNativeProfileScope dnps; |
| 1374 |
1373 // Each sample holds 8 stack frames. | 1375 // Each sample holds 8 stack frames. |
1374 // This chain is 20 stack frames deep. | 1376 // This chain is 20 stack frames deep. |
1375 const char* kScript = | 1377 const char* kScript = |
1376 "class A {\n" | 1378 "class A {\n" |
1377 " var a;\n" | 1379 " var a;\n" |
1378 " var b;\n" | 1380 " var b;\n" |
1379 "}\n" | 1381 "}\n" |
1380 "class B {\n" | 1382 "class B {\n" |
1381 " static boo() {\n" | 1383 " static boo() {\n" |
1382 " return new A();\n" | 1384 " return new A();\n" |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1470 EXPECT(walker.Down()); | 1472 EXPECT(walker.Down()); |
1471 EXPECT_STREQ("go", walker.CurrentName()); | 1473 EXPECT_STREQ("go", walker.CurrentName()); |
1472 EXPECT(walker.Down()); | 1474 EXPECT(walker.Down()); |
1473 EXPECT_STREQ("main", walker.CurrentName()); | 1475 EXPECT_STREQ("main", walker.CurrentName()); |
1474 EXPECT(!walker.Down()); | 1476 EXPECT(!walker.Down()); |
1475 } | 1477 } |
1476 } | 1478 } |
1477 | 1479 |
1478 } // namespace dart | 1480 } // namespace dart |
1479 | 1481 |
OLD | NEW |