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

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

Issue 1055643003: Add missing ExitIsolate to benchmark test. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 8 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 #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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 } 53 }
54 54
55 55
56 // 56 //
57 // Measure creation of core isolate from a snapshot. 57 // Measure creation of core isolate from a snapshot.
58 // 58 //
59 BENCHMARK(CorelibIsolateStartup) { 59 BENCHMARK(CorelibIsolateStartup) {
60 const int kNumIterations = 1000; 60 const int kNumIterations = 1000;
61 Timer timer(true, "CorelibIsolateStartup"); 61 Timer timer(true, "CorelibIsolateStartup");
62 Isolate* isolate = Isolate::Current(); 62 Isolate* isolate = Isolate::Current();
63 Thread::ExitIsolate();
63 for (int i = 0; i < kNumIterations; i++) { 64 for (int i = 0; i < kNumIterations; i++) {
64 timer.Start(); 65 timer.Start();
65 TestCase::CreateTestIsolate(); 66 TestCase::CreateTestIsolate();
66 timer.Stop(); 67 timer.Stop();
67 Dart_ShutdownIsolate(); 68 Dart_ShutdownIsolate();
68 } 69 }
69 benchmark->set_score(timer.TotalElapsedTime() / kNumIterations); 70 benchmark->set_score(timer.TotalElapsedTime() / kNumIterations);
70 Thread::EnterIsolate(isolate); 71 Thread::EnterIsolate(isolate);
71 } 72 }
72 73
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 zone.GetZone()); 595 zone.GetZone());
595 reader.ReadObject(); 596 reader.ReadObject();
596 free(buffer); 597 free(buffer);
597 } 598 }
598 timer.Stop(); 599 timer.Stop();
599 int64_t elapsed_time = timer.TotalElapsedTime(); 600 int64_t elapsed_time = timer.TotalElapsedTime();
600 benchmark->set_score(elapsed_time); 601 benchmark->set_score(elapsed_time);
601 } 602 }
602 603
603 } // namespace dart 604 } // namespace dart
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