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

Unified Diff: runtime/vm/benchmark_test.h

Issue 314383002: - Report CodeSize instead of runtime for benchmarks reporting snapshot sizes. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/bin/run_vm_tests.cc ('k') | runtime/vm/benchmark_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/benchmark_test.h
===================================================================
--- runtime/vm/benchmark_test.h (revision 37090)
+++ runtime/vm/benchmark_test.h (working copy)
@@ -27,9 +27,9 @@
// The BENCHMARK macro is used for benchmarking a specific functionality
// of the VM
-#define BENCHMARK(name) \
+#define BENCHMARK_HELPER(name, kind) \
void Dart_Benchmark##name(Benchmark* benchmark); \
- static Benchmark kRegister##name(Dart_Benchmark##name, #name); \
+ static Benchmark kRegister##name(Dart_Benchmark##name, #name, kind); \
static void Dart_BenchmarkHelper##name(Benchmark* benchmark); \
void Dart_Benchmark##name(Benchmark* benchmark) { \
FLAG_heap_growth_space_ratio = 100; \
@@ -40,7 +40,11 @@
} \
static void Dart_BenchmarkHelper##name(Benchmark* benchmark)
+#define BENCHMARK(name) BENCHMARK_HELPER(name, "RunTime")
+#define BENCHMARK_SIZE(name) BENCHMARK_HELPER(name, "CodeSize")
+
+
inline Dart_Handle NewString(const char* str) {
return Dart_NewStringFromCString(str);
}
@@ -50,9 +54,10 @@
public:
typedef void (RunEntry)(Benchmark* benchmark);
- Benchmark(RunEntry* run, const char* name) :
+ Benchmark(RunEntry* run, const char* name, const char* score_kind) :
run_(run),
name_(name),
+ score_kind_(score_kind),
score_(0),
isolate_(NULL),
next_(NULL) {
@@ -66,6 +71,7 @@
// Accessors.
const char* name() const { return name_; }
+ const char* score_kind() const { return score_kind_; }
void set_score(intptr_t value) { score_ = value; }
intptr_t score() const { return score_; }
Isolate* isolate() const { return reinterpret_cast<Isolate*>(isolate_); }
@@ -92,6 +98,7 @@
RunEntry* const run_;
const char* name_;
+ const char* score_kind_;
intptr_t score_;
Dart_Isolate isolate_;
Benchmark* next_;
« no previous file with comments | « runtime/bin/run_vm_tests.cc ('k') | runtime/vm/benchmark_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698