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

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

Issue 177733002: Revert r32930 (Add more timing information in the VM to track time...) (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 9 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 | « runtime/lib/string.cc ('k') | runtime/vm/code_descriptors_test.cc » ('j') | 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 #include "vm/benchmark_test.h" 5 #include "vm/benchmark_test.h"
6 6
7 #include "bin/builtin.h" 7 #include "bin/builtin.h"
8 #include "bin/file.h" 8 #include "bin/file.h"
9 9
10 #include "platform/assert.h" 10 #include "platform/assert.h"
(...skipping 19 matching lines...) Expand all
30 } 30 }
31 } 31 }
32 32
33 33
34 // 34 //
35 // Measure compile of all functions in dart core lib classes. 35 // Measure compile of all functions in dart core lib classes.
36 // 36 //
37 BENCHMARK(CorelibCompileAll) { 37 BENCHMARK(CorelibCompileAll) {
38 bin::Builtin::SetNativeResolver(bin::Builtin::kBuiltinLibrary); 38 bin::Builtin::SetNativeResolver(bin::Builtin::kBuiltinLibrary);
39 bin::Builtin::SetNativeResolver(bin::Builtin::kIOLibrary); 39 bin::Builtin::SetNativeResolver(bin::Builtin::kIOLibrary);
40 NativeToVmTimerScope scope_timer(Isolate::Current());
41 Timer timer(true, "Compile all of Core lib benchmark"); 40 Timer timer(true, "Compile all of Core lib benchmark");
42 timer.Start(); 41 timer.Start();
43 const Error& error = Error::Handle(benchmark->isolate(), 42 const Error& error = Error::Handle(benchmark->isolate(),
44 Library::CompileAll()); 43 Library::CompileAll());
45 if (!error.IsNull()) { 44 if (!error.IsNull()) {
46 OS::PrintErr("Unexpected error in CorelibCompileAll benchmark:\n%s", 45 OS::PrintErr("Unexpected error in CorelibCompileAll benchmark:\n%s",
47 error.ToErrorCString()); 46 error.ToErrorCString());
48 } 47 }
49 EXPECT(error.IsNull()); 48 EXPECT(error.IsNull());
50 timer.Stop(); 49 timer.Stop();
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 for (intptr_t i = 0; i < kLoopCount; i++) { 496 for (intptr_t i = 0; i < kLoopCount; i++) {
498 Dart_ExitIsolate(); 497 Dart_ExitIsolate();
499 Dart_EnterIsolate(isolate); 498 Dart_EnterIsolate(isolate);
500 } 499 }
501 timer.Stop(); 500 timer.Stop();
502 int64_t elapsed_time = timer.TotalElapsedTime(); 501 int64_t elapsed_time = timer.TotalElapsedTime();
503 benchmark->set_score(elapsed_time); 502 benchmark->set_score(elapsed_time);
504 } 503 }
505 504
506 } // namespace dart 505 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/lib/string.cc ('k') | runtime/vm/code_descriptors_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698