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

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

Issue 1663963002: - reorganize DartUtils::PrepareForScriptLoading so that it does not have the wait for service load … (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: code-review-comments Created 4 years, 10 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
« no previous file with comments | « runtime/bin/vmservice_impl.cc ('k') | runtime/vm/benchmark_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 #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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 tail_ = this; 74 tail_ = this;
75 } 75 }
76 76
77 // Accessors. 77 // Accessors.
78 const char* name() const { return name_; } 78 const char* name() const { return name_; }
79 const char* score_kind() const { return score_kind_; } 79 const char* score_kind() const { return score_kind_; }
80 void set_score(int64_t value) { score_ = value; } 80 void set_score(int64_t value) { score_ = value; }
81 int64_t score() const { return score_; } 81 int64_t score() const { return score_; }
82 Isolate* isolate() const { return reinterpret_cast<Isolate*>(isolate_); } 82 Isolate* isolate() const { return reinterpret_cast<Isolate*>(isolate_); }
83 83
84 Dart_Isolate CreateIsolate(const uint8_t* buffer) { 84 Dart_Isolate CreateIsolate(const uint8_t* buffer);
85 char* err = NULL;
86 isolate_ = Dart_CreateIsolate(NULL, NULL, buffer, NULL, NULL, &err);
87 EXPECT(isolate_ != NULL);
88 free(err);
89 return isolate_;
90 }
91 85
92 void Run() { (*run_)(this); } 86 void Run() { (*run_)(this); }
93 void RunBenchmark(); 87 void RunBenchmark();
94 88
95 static void RunAll(const char* executable); 89 static void RunAll(const char* executable);
96 static void SetExecutable(const char* arg) { executable_ = arg; } 90 static void SetExecutable(const char* arg) { executable_ = arg; }
97 static const char* Executable() { return executable_; } 91 static const char* Executable() { return executable_; }
98 92
99 private: 93 private:
100 static Benchmark* first_; 94 static Benchmark* first_;
(...skipping 27 matching lines...) Expand all
128 122
129 private: 123 private:
130 Benchmark* benchmark_; 124 Benchmark* benchmark_;
131 125
132 DISALLOW_COPY_AND_ASSIGN(BenchmarkIsolateScope); 126 DISALLOW_COPY_AND_ASSIGN(BenchmarkIsolateScope);
133 }; 127 };
134 128
135 } // namespace dart 129 } // namespace dart
136 130
137 #endif // VM_BENCHMARK_TEST_H_ 131 #endif // VM_BENCHMARK_TEST_H_
OLDNEW
« no previous file with comments | « runtime/bin/vmservice_impl.cc ('k') | runtime/vm/benchmark_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698