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

Side by Side Diff: vm/benchmark_test.h

Issue 10915253: Set heap_growth_space_ratio to 100 so that the benchmark runs do not (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 #ifndef VM_BENCHMARK_TEST_H_ 5 #ifndef VM_BENCHMARK_TEST_H_
6 #define VM_BENCHMARK_TEST_H_ 6 #define VM_BENCHMARK_TEST_H_
7 7
8 #include "include/dart_api.h" 8 #include "include/dart_api.h"
9 9
10 #include "vm/dart.h" 10 #include "vm/dart.h"
11 #include "vm/globals.h" 11 #include "vm/globals.h"
12 #include "vm/heap.h" 12 #include "vm/heap.h"
13 #include "vm/isolate.h" 13 #include "vm/isolate.h"
14 #include "vm/object.h" 14 #include "vm/object.h"
15 #include "vm/zone.h" 15 #include "vm/zone.h"
16 16
17 namespace dart { 17 namespace dart {
18 18
19 DECLARE_FLAG(int, code_heap_size); 19 DECLARE_FLAG(int, code_heap_size);
20 DECLARE_FLAG(int, heap_growth_space_ratio);
20 21
21 // The BENCHMARK macro is used for benchmarking a specific functionality 22 // The BENCHMARK macro is used for benchmarking a specific functionality
22 // of the VM 23 // of the VM
23 #define BENCHMARK(name) \ 24 #define BENCHMARK(name) \
24 void Dart_Benchmark##name(Benchmark* benchmark); \ 25 void Dart_Benchmark##name(Benchmark* benchmark); \
25 static const Benchmark kRegister##name(Dart_Benchmark##name, #name); \ 26 static const Benchmark kRegister##name(Dart_Benchmark##name, #name); \
26 static void Dart_BenchmarkHelper##name(Benchmark* benchmark); \ 27 static void Dart_BenchmarkHelper##name(Benchmark* benchmark); \
27 void Dart_Benchmark##name(Benchmark* benchmark) { \ 28 void Dart_Benchmark##name(Benchmark* benchmark) { \
29 FLAG_heap_growth_space_ratio = 100; \
28 FLAG_code_heap_size = 12; \ 30 FLAG_code_heap_size = 12; \
29 BenchmarkIsolateScope __isolate__(benchmark); \ 31 BenchmarkIsolateScope __isolate__(benchmark); \
30 Zone __zone__(benchmark->isolate()); \ 32 Zone __zone__(benchmark->isolate()); \
31 HandleScope __hs__(benchmark->isolate()); \ 33 HandleScope __hs__(benchmark->isolate()); \
32 Dart_BenchmarkHelper##name(benchmark); \ 34 Dart_BenchmarkHelper##name(benchmark); \
33 } \ 35 } \
34 static void Dart_BenchmarkHelper##name(Benchmark* benchmark) 36 static void Dart_BenchmarkHelper##name(Benchmark* benchmark)
35 37
36 38
37 class Benchmark { 39 class Benchmark {
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 106
105 private: 107 private:
106 Benchmark* benchmark_; 108 Benchmark* benchmark_;
107 109
108 DISALLOW_COPY_AND_ASSIGN(BenchmarkIsolateScope); 110 DISALLOW_COPY_AND_ASSIGN(BenchmarkIsolateScope);
109 }; 111 };
110 112
111 } // namespace dart 113 } // namespace dart
112 114
113 #endif // VM_BENCHMARK_TEST_H_ 115 #endif // VM_BENCHMARK_TEST_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698