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

Unified Diff: runtime/vm/compiler_stats.h

Issue 1352483002: Add benchmark output to compiler stats. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: mmmmmmerge Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/benchmark_test.cc ('k') | runtime/vm/compiler_stats.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/compiler_stats.h
diff --git a/runtime/vm/compiler_stats.h b/runtime/vm/compiler_stats.h
index f0b47f4ec63c5eaf480ae5ad0a48e372205c72b4..4487991224b94bcb84f543dcb677a05726a1cd14 100644
--- a/runtime/vm/compiler_stats.h
+++ b/runtime/vm/compiler_stats.h
@@ -15,6 +15,7 @@ namespace dart {
DECLARE_FLAG(bool, compiler_stats);
+DECLARE_FLAG(bool, compiler_benchmark);
class CompilerStats {
public:
@@ -23,8 +24,6 @@ class CompilerStats {
Isolate* isolate_;
- // TODO(hausner): add these timers to the timer list maintained
- // in the isolate?
Timer parser_timer; // Cumulative runtime of parser.
Timer scanner_timer; // Cumulative runtime of scanner.
Timer codegen_timer; // Cumulative runtime of code generator.
@@ -44,6 +43,7 @@ class CompilerStats {
int64_t num_tokens_total; // Isolate + VM isolate
int64_t num_literal_tokens_total;
int64_t num_ident_tokens_total;
+ int64_t num_tokens_scanned;
int64_t num_tokens_consumed;
int64_t num_cached_consts;
int64_t num_const_cache_hits;
@@ -63,7 +63,13 @@ class CompilerStats {
int64_t pc_desc_size;
int64_t vardesc_size;
char* text;
+ bool use_benchmark_output;
+ // Update stats that are computed, e.g. token count.
+ void Update();
+
+ void EnableBenchmark();
+ char* BenchmarkOutput();
char* PrintToZone();
};
« no previous file with comments | « runtime/vm/benchmark_test.cc ('k') | runtime/vm/compiler_stats.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698