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

Side by Side Diff: runtime/vm/benchmark_test.h

Issue 11036033: Do not override (lower) the VM's code heap size for benchmarks tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 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 DECLARE_FLAG(int, heap_growth_space_ratio);
21 21
22 // The BENCHMARK macro is used for benchmarking a specific functionality 22 // The BENCHMARK macro is used for benchmarking a specific functionality
23 // of the VM 23 // of the VM
24 #define BENCHMARK(name) \ 24 #define BENCHMARK(name) \
25 void Dart_Benchmark##name(Benchmark* benchmark); \ 25 void Dart_Benchmark##name(Benchmark* benchmark); \
26 static const Benchmark kRegister##name(Dart_Benchmark##name, #name); \ 26 static const Benchmark kRegister##name(Dart_Benchmark##name, #name); \
27 static void Dart_BenchmarkHelper##name(Benchmark* benchmark); \ 27 static void Dart_BenchmarkHelper##name(Benchmark* benchmark); \
28 void Dart_Benchmark##name(Benchmark* benchmark) { \ 28 void Dart_Benchmark##name(Benchmark* benchmark) { \
29 FLAG_heap_growth_space_ratio = 100; \ 29 FLAG_heap_growth_space_ratio = 100; \
30 FLAG_code_heap_size = 12; \
31 BenchmarkIsolateScope __isolate__(benchmark); \ 30 BenchmarkIsolateScope __isolate__(benchmark); \
32 Zone __zone__(benchmark->isolate()); \ 31 Zone __zone__(benchmark->isolate()); \
33 HandleScope __hs__(benchmark->isolate()); \ 32 HandleScope __hs__(benchmark->isolate()); \
34 Dart_BenchmarkHelper##name(benchmark); \ 33 Dart_BenchmarkHelper##name(benchmark); \
35 } \ 34 } \
36 static void Dart_BenchmarkHelper##name(Benchmark* benchmark) 35 static void Dart_BenchmarkHelper##name(Benchmark* benchmark)
37 36
38 37
39 class Benchmark { 38 class Benchmark {
40 public: 39 public:
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 105
107 private: 106 private:
108 Benchmark* benchmark_; 107 Benchmark* benchmark_;
109 108
110 DISALLOW_COPY_AND_ASSIGN(BenchmarkIsolateScope); 109 DISALLOW_COPY_AND_ASSIGN(BenchmarkIsolateScope);
111 }; 110 };
112 111
113 } // namespace dart 112 } // namespace dart
114 113
115 #endif // VM_BENCHMARK_TEST_H_ 114 #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