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

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

Issue 2612043002: Fixes to patch files necessary to use the analyzer (Closed)
Patch Set: Created 3 years, 11 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
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 757 matching lines...) Expand 10 before | Expand all | Expand 10 after
768 ProfileTrieWalker walker(&profile); 768 ProfileTrieWalker walker(&profile);
769 769
770 walker.Reset(Profile::kExclusiveCode); 770 walker.Reset(Profile::kExclusiveCode);
771 EXPECT(walker.Down()); 771 EXPECT(walker.Down());
772 EXPECT_STREQ("DRT_AllocateArray", walker.CurrentName()); 772 EXPECT_STREQ("DRT_AllocateArray", walker.CurrentName());
773 EXPECT(walker.Down()); 773 EXPECT(walker.Down());
774 EXPECT_STREQ("[Stub] AllocateArray", walker.CurrentName()); 774 EXPECT_STREQ("[Stub] AllocateArray", walker.CurrentName());
775 EXPECT(walker.Down()); 775 EXPECT(walker.Down());
776 EXPECT_STREQ("_List._List", walker.CurrentName()); 776 EXPECT_STREQ("_List._List", walker.CurrentName());
777 EXPECT(walker.Down()); 777 EXPECT(walker.Down());
778 EXPECT_STREQ("List.List", walker.CurrentName()); 778 EXPECT_STREQ("List.List._internal", walker.CurrentName());
779 EXPECT(walker.Down()); 779 EXPECT(walker.Down());
780 EXPECT_STREQ("foo", walker.CurrentName()); 780 EXPECT_STREQ("foo", walker.CurrentName());
781 EXPECT(!walker.Down()); 781 EXPECT(!walker.Down());
782 } 782 }
783 783
784 array_class.SetTraceAllocation(false); 784 array_class.SetTraceAllocation(false);
785 result = Dart_Invoke(lib, NewString("foo"), 0, NULL); 785 result = Dart_Invoke(lib, NewString("foo"), 0, NULL);
786 EXPECT_VALID(result); 786 EXPECT_VALID(result);
787 787
788 { 788 {
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
822 walker.Reset(Profile::kExclusiveCode); 822 walker.Reset(Profile::kExclusiveCode);
823 EXPECT(walker.Down()); 823 EXPECT(walker.Down());
824 EXPECT_STREQ("DRT_AllocateArray", walker.CurrentName()); 824 EXPECT_STREQ("DRT_AllocateArray", walker.CurrentName());
825 EXPECT(walker.Down()); 825 EXPECT(walker.Down());
826 EXPECT_STREQ("[Stub] AllocateArray", walker.CurrentName()); 826 EXPECT_STREQ("[Stub] AllocateArray", walker.CurrentName());
827 EXPECT(walker.Down()); 827 EXPECT(walker.Down());
828 EXPECT_STREQ("_List._List", walker.CurrentName()); 828 EXPECT_STREQ("_List._List", walker.CurrentName());
829 EXPECT(walker.Down()); 829 EXPECT(walker.Down());
830 EXPECT_STREQ("_GrowableList._GrowableList", walker.CurrentName()); 830 EXPECT_STREQ("_GrowableList._GrowableList", walker.CurrentName());
831 EXPECT(walker.Down()); 831 EXPECT(walker.Down());
832 EXPECT_STREQ("List.List", walker.CurrentName()); 832 EXPECT_STREQ("List.List._internal", walker.CurrentName());
833 EXPECT(walker.Down()); 833 EXPECT(walker.Down());
834 EXPECT_STREQ("bar", walker.CurrentName()); 834 EXPECT_STREQ("bar", walker.CurrentName());
835 EXPECT(!walker.Down()); 835 EXPECT(!walker.Down());
836 } 836 }
837 } 837 }
838 838
839 839
840 TEST_CASE(Profiler_ContextAllocation) { 840 TEST_CASE(Profiler_ContextAllocation) {
841 DisableNativeProfileScope dnps; 841 DisableNativeProfileScope dnps;
842 const char* kScript = 842 const char* kScript =
(...skipping 1759 matching lines...) Expand 10 before | Expand all | Expand 10 after
2602 EXPECT_SUBSTRING("\"positions\":[\"TempMove\",39]", js.ToCString()); 2602 EXPECT_SUBSTRING("\"positions\":[\"TempMove\",39]", js.ToCString());
2603 // Verify exclusive ticks in main. 2603 // Verify exclusive ticks in main.
2604 EXPECT_SUBSTRING("\"exclusiveTicks\":[1,0]", js.ToCString()); 2604 EXPECT_SUBSTRING("\"exclusiveTicks\":[1,0]", js.ToCString());
2605 // Verify inclusive ticks in main. 2605 // Verify inclusive ticks in main.
2606 EXPECT_SUBSTRING("\"inclusiveTicks\":[1,2]", js.ToCString()); 2606 EXPECT_SUBSTRING("\"inclusiveTicks\":[1,2]", js.ToCString());
2607 } 2607 }
2608 2608
2609 #endif // !PRODUCT 2609 #endif // !PRODUCT
2610 2610
2611 } // namespace dart 2611 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698