Index: runtime/vm/benchmark_test.cc |
diff --git a/runtime/vm/benchmark_test.cc b/runtime/vm/benchmark_test.cc |
index 3882e56132aa8ef398baae83a8239e472ba978fc..9ad3ab8e49ef63e937681daa28f243586588ff95 100644 |
--- a/runtime/vm/benchmark_test.cc |
+++ b/runtime/vm/benchmark_test.cc |
@@ -25,7 +25,6 @@ Benchmark* Benchmark::first_ = NULL; |
Benchmark* Benchmark::tail_ = NULL; |
const char* Benchmark::executable_ = NULL; |
- |
// |
// Measure compile of all dart2js(compiler) functions. |
// |
@@ -52,10 +51,8 @@ static char* ComputeDart2JSPath(const char* arg) { |
return dart2js_path; |
} |
- |
static void func(Dart_NativeArguments args) {} |
- |
static Dart_NativeFunction NativeResolver(Dart_Handle name, |
int arg_count, |
bool* auto_setup_scope) { |
@@ -64,7 +61,6 @@ static Dart_NativeFunction NativeResolver(Dart_Handle name, |
return &func; |
} |
- |
static void SetupDart2JSPackagePath() { |
bool worked = bin::DartUtils::SetOriginalWorkingDirectory(); |
EXPECT(worked); |
@@ -84,7 +80,6 @@ static void SetupDart2JSPackagePath() { |
DART_CHECK_VALID(result); |
} |
- |
void Benchmark::RunAll(const char* executable) { |
SetExecutable(executable); |
Benchmark* benchmark = first_; |
@@ -94,7 +89,6 @@ void Benchmark::RunAll(const char* executable) { |
} |
} |
- |
Dart_Isolate Benchmark::CreateIsolate(const uint8_t* snapshot_data, |
const uint8_t* snapshot_instructions) { |
char* err = NULL; |
@@ -105,7 +99,6 @@ Dart_Isolate Benchmark::CreateIsolate(const uint8_t* snapshot_data, |
return isolate_; |
} |
- |
// |
// Measure compile of all functions in dart core lib classes. |
// |
@@ -125,10 +118,8 @@ BENCHMARK(CorelibCompileAll) { |
benchmark->set_score(elapsed_time); |
} |
- |
#ifndef PRODUCT |
- |
BENCHMARK(CorelibCompilerStats) { |
bin::Builtin::SetNativeResolver(bin::Builtin::kBuiltinLibrary); |
bin::Builtin::SetNativeResolver(bin::Builtin::kIOLibrary); |
@@ -148,7 +139,6 @@ BENCHMARK(CorelibCompilerStats) { |
benchmark->set_score(elapsed_time); |
} |
- |
BENCHMARK(Dart2JSCompilerStats) { |
bin::Builtin::SetNativeResolver(bin::Builtin::kBuiltinLibrary); |
bin::Builtin::SetNativeResolver(bin::Builtin::kIOLibrary); |
@@ -190,10 +180,8 @@ BENCHMARK(Dart2JSCompilerStats) { |
free(script); |
} |
- |
#endif // !PRODUCT |
- |
// |
// Measure creation of core isolate from a snapshot. |
// |
@@ -212,7 +200,6 @@ BENCHMARK(CorelibIsolateStartup) { |
Dart_EnterIsolate(reinterpret_cast<Dart_Isolate>(isolate)); |
} |
- |
// |
// Measure invocation of Dart API functions. |
// |
@@ -229,7 +216,6 @@ static void InitNativeFields(Dart_NativeArguments args) { |
Dart_ExitScope(); |
} |
- |
// The specific api functions called here are a bit arbitrary. We are |
// trying to get a sense of the overhead for using the dart api. |
static void UseDartApi(Dart_NativeArguments args) { |
@@ -260,7 +246,6 @@ static void UseDartApi(Dart_NativeArguments args) { |
Dart_SetReturnValue(args, Dart_NewInteger(value1 * receiver_value)); |
} |
- |
static Dart_NativeFunction bm_uda_lookup(Dart_Handle name, |
int argument_count, |
bool* auto_setup_scope) { |
@@ -276,7 +261,6 @@ static Dart_NativeFunction bm_uda_lookup(Dart_Handle name, |
} |
} |
- |
BENCHMARK(UseDartApi) { |
const int kNumIterations = 1000000; |
const char* kScriptChars = |
@@ -318,7 +302,6 @@ BENCHMARK(UseDartApi) { |
benchmark->set_score(elapsed_time); |
} |
- |
// |
// Measure time accessing internal and external strings. |
// |
@@ -357,7 +340,6 @@ BENCHMARK(DartStringAccess) { |
benchmark->set_score(elapsed_time); |
} |
- |
BENCHMARK(Dart2JSCompileAll) { |
bin::Builtin::SetNativeResolver(bin::Builtin::kBuiltinLibrary); |
bin::Builtin::SetNativeResolver(bin::Builtin::kIOLibrary); |
@@ -395,7 +377,6 @@ BENCHMARK(Dart2JSCompileAll) { |
free(script); |
} |
- |
// |
// Measure frame lookup during stack traversal. |
// |
@@ -425,7 +406,6 @@ static void StackFrame_accessFrame(Dart_NativeArguments args) { |
Dart_SetReturnValue(args, Dart_NewInteger(elapsed_time)); |
} |
- |
static Dart_NativeFunction StackFrameNativeResolver(Dart_Handle name, |
int arg_count, |
bool* auto_setup_scope) { |
@@ -434,7 +414,6 @@ static Dart_NativeFunction StackFrameNativeResolver(Dart_Handle name, |
return &StackFrame_accessFrame; |
} |
- |
// Unit test case to verify stack frame iteration. |
BENCHMARK(FrameLookup) { |
const char* kScriptChars = |
@@ -487,19 +466,16 @@ BENCHMARK(FrameLookup) { |
benchmark->set_score(elapsed_time); |
} |
- |
static uint8_t* malloc_allocator(uint8_t* ptr, |
intptr_t old_size, |
intptr_t new_size) { |
return reinterpret_cast<uint8_t*>(realloc(ptr, new_size)); |
} |
- |
static void malloc_deallocator(uint8_t* ptr) { |
free(ptr); |
} |
- |
BENCHMARK_SIZE(CoreSnapshotSize) { |
const char* kScriptChars = |
"import 'dart:async';\n" |
@@ -534,7 +510,6 @@ BENCHMARK_SIZE(CoreSnapshotSize) { |
free(isolate_snapshot_data_buffer); |
} |
- |
BENCHMARK_SIZE(StandaloneSnapshotSize) { |
const char* kScriptChars = |
"import 'dart:async';\n" |
@@ -572,7 +547,6 @@ BENCHMARK_SIZE(StandaloneSnapshotSize) { |
free(isolate_snapshot_data_buffer); |
} |
- |
BENCHMARK(CreateMirrorSystem) { |
const char* kScriptChars = |
"import 'dart:mirrors';\n" |
@@ -591,7 +565,6 @@ BENCHMARK(CreateMirrorSystem) { |
benchmark->set_score(elapsed_time); |
} |
- |
BENCHMARK(EnterExitIsolate) { |
const char* kScriptChars = |
"import 'dart:core';\n" |
@@ -611,7 +584,6 @@ BENCHMARK(EnterExitIsolate) { |
benchmark->set_score(elapsed_time); |
} |
- |
static uint8_t message_buffer[64]; |
static uint8_t* message_allocator(uint8_t* ptr, |
intptr_t old_size, |
@@ -620,7 +592,6 @@ static uint8_t* message_allocator(uint8_t* ptr, |
} |
static void message_deallocator(uint8_t* ptr) {} |
- |
BENCHMARK(SerializeNull) { |
const Object& null_object = Object::Handle(); |
const intptr_t kLoopCount = 1000000; |
@@ -643,7 +614,6 @@ BENCHMARK(SerializeNull) { |
benchmark->set_score(elapsed_time); |
} |
- |
BENCHMARK(SerializeSmi) { |
const Integer& smi_object = Integer::Handle(Smi::New(42)); |
const intptr_t kLoopCount = 1000000; |
@@ -666,7 +636,6 @@ BENCHMARK(SerializeSmi) { |
benchmark->set_score(elapsed_time); |
} |
- |
BENCHMARK(SimpleMessage) { |
TransitionNativeToVM transition(thread); |
const Array& array_object = Array::Handle(Array::New(2)); |
@@ -692,7 +661,6 @@ BENCHMARK(SimpleMessage) { |
benchmark->set_score(elapsed_time); |
} |
- |
BENCHMARK(LargeMap) { |
const char* kScript = |
"makeMap() {\n" |
@@ -726,7 +694,6 @@ BENCHMARK(LargeMap) { |
benchmark->set_score(elapsed_time); |
} |
- |
BENCHMARK_MEMORY(InitialRSS) { |
benchmark->set_score(OS::MaxRSS()); |
} |