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

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

Issue 1412733008: Switch profiler from isolates to threads (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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/profiler_service.cc ('k') | runtime/vm/stub_code.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 828 matching lines...) Expand 10 before | Expand all | Expand 10 after
839 // We should have one allocation sample. 839 // We should have one allocation sample.
840 EXPECT_EQ(1, profile.sample_count()); 840 EXPECT_EQ(1, profile.sample_count());
841 ProfileTrieWalker walker(&profile); 841 ProfileTrieWalker walker(&profile);
842 842
843 walker.Reset(Profile::kExclusiveCode); 843 walker.Reset(Profile::kExclusiveCode);
844 EXPECT(walker.Down()); 844 EXPECT(walker.Down());
845 #if defined(TARGET_OS_WINDOWS) 845 #if defined(TARGET_OS_WINDOWS)
846 // TODO(johnmccutchan): Hookup native symbol resolver on Windows. 846 // TODO(johnmccutchan): Hookup native symbol resolver on Windows.
847 EXPECT_SUBSTRING("[Native]", walker.CurrentName()); 847 EXPECT_SUBSTRING("[Native]", walker.CurrentName());
848 #else 848 #else
849 EXPECT_SUBSTRING("dart::Profiler::RecordAllocation", walker.CurrentName()); 849 EXPECT_SUBSTRING("dart::Profiler::SampleAllocation", walker.CurrentName());
850 #endif 850 #endif
851 EXPECT(!walker.Down()); 851 EXPECT(!walker.Down());
852 } 852 }
853 853
854 // Disable allocation tracing for Class. 854 // Disable allocation tracing for Class.
855 class_class.SetTraceAllocation(false); 855 class_class.SetTraceAllocation(false);
856 856
857 // Invoke "bar" which during compilation, triggers a closure class allocation. 857 // Invoke "bar" which during compilation, triggers a closure class allocation.
858 result = Dart_Invoke(lib, NewString("bar"), 0, NULL); 858 result = Dart_Invoke(lib, NewString("bar"), 0, NULL);
859 EXPECT_VALID(result); 859 EXPECT_VALID(result);
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after
1473 EXPECT(walker.Down()); 1473 EXPECT(walker.Down());
1474 EXPECT_STREQ("go", walker.CurrentName()); 1474 EXPECT_STREQ("go", walker.CurrentName());
1475 EXPECT(walker.Down()); 1475 EXPECT(walker.Down());
1476 EXPECT_STREQ("main", walker.CurrentName()); 1476 EXPECT_STREQ("main", walker.CurrentName());
1477 EXPECT(!walker.Down()); 1477 EXPECT(!walker.Down());
1478 } 1478 }
1479 } 1479 }
1480 1480
1481 } // namespace dart 1481 } // namespace dart
1482 1482
OLDNEW
« no previous file with comments | « runtime/vm/profiler_service.cc ('k') | runtime/vm/stub_code.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698