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

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

Issue 1919283003: Fixes and enables FindCodeObject test for dbc (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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/tests/vm/vm.status ('k') | no next file » | 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 #include "vm/class_finalizer.h" 6 #include "vm/class_finalizer.h"
7 #include "vm/compiler.h" 7 #include "vm/compiler.h"
8 #include "vm/object.h" 8 #include "vm/object.h"
9 #include "vm/pages.h" 9 #include "vm/pages.h"
10 #include "vm/stack_frame.h" 10 #include "vm/stack_frame.h"
11 #include "vm/symbols.h" 11 #include "vm/symbols.h"
12 #include "vm/unit_test.h" 12 #include "vm/unit_test.h"
13 13
14 namespace dart { 14 namespace dart {
15 15
16 VM_TEST_CASE(FindCodeObject) { 16 VM_TEST_CASE(FindCodeObject) {
17 #if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64) 17 #if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64)
18 const int kLoopCount = 50000; 18 const int kLoopCount = 50000;
19 const int kScriptSize = 512 * KB;
20 #elif defined(TARGET_ARCH_DBC)
21 const int kLoopCount = 60000;
22 const int kScriptSize = 1 * MB;
19 #else 23 #else
20 const int kLoopCount = 25000; 24 const int kLoopCount = 25000;
25 const int kScriptSize = 512 * KB;
21 #endif 26 #endif
22 const int kScriptSize = 512 * KB;
23 const int kNumFunctions = 1024; 27 const int kNumFunctions = 1024;
24 char scriptChars[kScriptSize]; 28 char scriptChars[kScriptSize];
25 29
26 // Get access to the code index table. 30 // Get access to the code index table.
27 Isolate* isolate = Isolate::Current(); 31 Isolate* isolate = Isolate::Current();
28 ASSERT(isolate != NULL); 32 ASSERT(isolate != NULL);
29 33
30 StackZone zone(thread); 34 StackZone zone(thread);
31 String& url = String::Handle(String::New("dart-test:FindCodeObject")); 35 String& url = String::Handle(String::New("dart-test:FindCodeObject"));
32 String& source = String::Handle(); 36 String& source = String::Handle();
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 EXPECT(code.Size() > 16); 153 EXPECT(code.Size() > 16);
150 pc = code.EntryPoint() + 16; 154 pc = code.EntryPoint() + 16;
151 EXPECT(code.Size() > (PageSpace::kPageSizeInWords << kWordSizeLog2)); 155 EXPECT(code.Size() > (PageSpace::kPageSizeInWords << kWordSizeLog2));
152 EXPECT(Code::LookupCode(pc) == code.raw()); 156 EXPECT(Code::LookupCode(pc) == code.raw());
153 EXPECT(code.Size() > (1 * MB)); 157 EXPECT(code.Size() > (1 * MB));
154 pc = code.EntryPoint() + (1 * MB); 158 pc = code.EntryPoint() + (1 * MB);
155 EXPECT(Code::LookupCode(pc) == code.raw()); 159 EXPECT(Code::LookupCode(pc) == code.raw());
156 } 160 }
157 161
158 } // namespace dart 162 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/tests/vm/vm.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698