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

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

Issue 11040062: Renamed Zone->StackZone, BaseZone->Zone, in preparation for changing isolate->get_zone() to return … (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
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"
(...skipping 10 matching lines...) Expand all
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 BenchmarkIsolateScope __isolate__(benchmark); \ 30 BenchmarkIsolateScope __isolate__(benchmark); \
31 Zone __zone__(benchmark->isolate()); \ 31 StackZone __zone__(benchmark->isolate()); \
32 HandleScope __hs__(benchmark->isolate()); \ 32 HandleScope __hs__(benchmark->isolate()); \
33 Dart_BenchmarkHelper##name(benchmark); \ 33 Dart_BenchmarkHelper##name(benchmark); \
34 } \ 34 } \
35 static void Dart_BenchmarkHelper##name(Benchmark* benchmark) 35 static void Dart_BenchmarkHelper##name(Benchmark* benchmark)
36 36
37 37
38 class Benchmark { 38 class Benchmark {
39 public: 39 public:
40 typedef void (RunEntry)(Benchmark* benchmark); 40 typedef void (RunEntry)(Benchmark* benchmark);
41 41
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 105
106 private: 106 private:
107 Benchmark* benchmark_; 107 Benchmark* benchmark_;
108 108
109 DISALLOW_COPY_AND_ASSIGN(BenchmarkIsolateScope); 109 DISALLOW_COPY_AND_ASSIGN(BenchmarkIsolateScope);
110 }; 110 };
111 111
112 } // namespace dart 112 } // namespace dart
113 113
114 #endif // VM_BENCHMARK_TEST_H_ 114 #endif // VM_BENCHMARK_TEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698