| OLD | NEW |
| 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 <stdio.h> | 5 #include <stdio.h> |
| 6 | 6 |
| 7 #include "bin/file.h" | 7 #include "bin/file.h" |
| 8 | 8 |
| 9 #include "vm/benchmark_test.h" | 9 #include "vm/benchmark_test.h" |
| 10 #include "vm/dart.h" | 10 #include "vm/dart.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 run_matches++; | 43 run_matches++; |
| 44 } | 44 } |
| 45 } | 45 } |
| 46 | 46 |
| 47 | 47 |
| 48 void Benchmark::RunBenchmark() { | 48 void Benchmark::RunBenchmark() { |
| 49 if ((run_filter == kAll) || | 49 if ((run_filter == kAll) || |
| 50 (run_filter == kAllBenchmarks) || | 50 (run_filter == kAllBenchmarks) || |
| 51 (strcmp(run_filter, this->name()) == 0)) { | 51 (strcmp(run_filter, this->name()) == 0)) { |
| 52 this->Run(); | 52 this->Run(); |
| 53 OS::Print("%s(RunTime): %ld\n", this->name(), this->score()); | 53 OS::Print("%s(RunTime): %"Pd"\n", this->name(), this->score()); |
| 54 run_matches++; | 54 run_matches++; |
| 55 } else if (run_filter == kList) { | 55 } else if (run_filter == kList) { |
| 56 fprintf(stdout, "%s\n", this->name()); | 56 fprintf(stdout, "%s\n", this->name()); |
| 57 run_matches++; | 57 run_matches++; |
| 58 } | 58 } |
| 59 } | 59 } |
| 60 | 60 |
| 61 | 61 |
| 62 static void DumpPprofSymbolInfo(const char* pprof_filename) { | 62 static void DumpPprofSymbolInfo(const char* pprof_filename) { |
| 63 if (pprof_filename != NULL) { | 63 if (pprof_filename != NULL) { |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 DumpPprofSymbolInfo(pprof_filename); | 151 DumpPprofSymbolInfo(pprof_filename); |
| 152 return 0; | 152 return 0; |
| 153 } | 153 } |
| 154 | 154 |
| 155 } // namespace dart | 155 } // namespace dart |
| 156 | 156 |
| 157 | 157 |
| 158 int main(int argc, const char** argv) { | 158 int main(int argc, const char** argv) { |
| 159 return dart::Main(argc, argv); | 159 return dart::Main(argc, argv); |
| 160 } | 160 } |
| OLD | NEW |