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

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

Issue 1782003002: Simplify the VM's typed_data constructors. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: added comment Created 4 years, 9 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 | « runtime/vm/method_recognizer.h ('k') | runtime/vm/symbols.h » ('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 "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 971 matching lines...) Expand 10 before | Expand all | Expand 10 after
982 HANDLESCOPE(thread); 982 HANDLESCOPE(thread);
983 Profile profile(isolate); 983 Profile profile(isolate);
984 AllocationFilter filter(isolate, float32_list_class.id()); 984 AllocationFilter filter(isolate, float32_list_class.id());
985 profile.Build(thread, &filter, Profile::kNoTags); 985 profile.Build(thread, &filter, Profile::kNoTags);
986 // We should have one allocation sample. 986 // We should have one allocation sample.
987 EXPECT_EQ(1, profile.sample_count()); 987 EXPECT_EQ(1, profile.sample_count());
988 ProfileTrieWalker walker(&profile); 988 ProfileTrieWalker walker(&profile);
989 989
990 walker.Reset(Profile::kExclusiveCode); 990 walker.Reset(Profile::kExclusiveCode);
991 EXPECT(walker.Down()); 991 EXPECT(walker.Down());
992 EXPECT_STREQ("_Float32Array._new", walker.CurrentName());
993 EXPECT(walker.Down());
994 EXPECT_STREQ("_Float32Array._Float32Array", walker.CurrentName()); 992 EXPECT_STREQ("_Float32Array._Float32Array", walker.CurrentName());
995 EXPECT(walker.Down()); 993 EXPECT(walker.Down());
996 EXPECT_STREQ("Float32List.Float32List", walker.CurrentName()); 994 EXPECT_STREQ("Float32List.Float32List", walker.CurrentName());
997 EXPECT(walker.Down()); 995 EXPECT(walker.Down());
998 EXPECT_STREQ("foo", walker.CurrentName()); 996 EXPECT_STREQ("foo", walker.CurrentName());
999 EXPECT(!walker.Down()); 997 EXPECT(!walker.Down());
1000 } 998 }
1001 999
1002 float32_list_class.SetTraceAllocation(false); 1000 float32_list_class.SetTraceAllocation(false);
1003 result = Dart_Invoke(lib, NewString("foo"), 0, NULL); 1001 result = Dart_Invoke(lib, NewString("foo"), 0, NULL);
(...skipping 1293 matching lines...) Expand 10 before | Expand all | Expand 10 after
2297 EXPECT_EQ(1, walker.CurrentInclusiveTicks()); 2295 EXPECT_EQ(1, walker.CurrentInclusiveTicks());
2298 EXPECT_EQ(0, walker.CurrentExclusiveTicks()); 2296 EXPECT_EQ(0, walker.CurrentExclusiveTicks());
2299 EXPECT_STREQ("bacon", walker.CurrentToken()); 2297 EXPECT_STREQ("bacon", walker.CurrentToken());
2300 EXPECT(!walker.Down()); 2298 EXPECT(!walker.Down());
2301 } 2299 }
2302 } 2300 }
2303 2301
2304 #endif // !PRODUCT 2302 #endif // !PRODUCT
2305 2303
2306 } // namespace dart 2304 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/method_recognizer.h ('k') | runtime/vm/symbols.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698