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

Side by Side Diff: src/compiler-dispatcher/compiler-dispatcher-tracer.h

Issue 2618503002: Add a flag for printf debugging the compiler dispatcher (Closed)
Patch Set: updates Created 3 years, 11 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
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_COMPILER_DISPATCHER_COMPILER_DISPATCHER_TRACER_H_ 5 #ifndef V8_COMPILER_DISPATCHER_COMPILER_DISPATCHER_TRACER_H_
6 #define V8_COMPILER_DISPATCHER_COMPILER_DISPATCHER_TRACER_H_ 6 #define V8_COMPILER_DISPATCHER_COMPILER_DISPATCHER_TRACER_H_
7 7
8 #include <utility> 8 #include <utility>
9 9
10 #include "src/base/macros.h" 10 #include "src/base/macros.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 void RecordCompile(double duration_ms, size_t ast_size_in_bytes); 66 void RecordCompile(double duration_ms, size_t ast_size_in_bytes);
67 void RecordFinalizeCompiling(double duration_ms); 67 void RecordFinalizeCompiling(double duration_ms);
68 68
69 double EstimatePrepareToParseInMs() const; 69 double EstimatePrepareToParseInMs() const;
70 double EstimateParseInMs(size_t source_length) const; 70 double EstimateParseInMs(size_t source_length) const;
71 double EstimateFinalizeParsingInMs() const; 71 double EstimateFinalizeParsingInMs() const;
72 double EstimatePrepareToCompileInMs() const; 72 double EstimatePrepareToCompileInMs() const;
73 double EstimateCompileInMs(size_t ast_size_in_bytes) const; 73 double EstimateCompileInMs(size_t ast_size_in_bytes) const;
74 double EstimateFinalizeCompilingInMs() const; 74 double EstimateFinalizeCompilingInMs() const;
75 75
76 void DumpStatistics() const;
77
76 private: 78 private:
77 static double Average(const base::RingBuffer<double>& buffer); 79 static double Average(const base::RingBuffer<double>& buffer);
78 static double Estimate( 80 static double Estimate(
79 const base::RingBuffer<std::pair<size_t, double>>& buffer, size_t num); 81 const base::RingBuffer<std::pair<size_t, double>>& buffer, size_t num);
80 82
81 mutable base::Mutex mutex_; 83 mutable base::Mutex mutex_;
82 base::RingBuffer<double> prepare_parse_events_; 84 base::RingBuffer<double> prepare_parse_events_;
83 base::RingBuffer<std::pair<size_t, double>> parse_events_; 85 base::RingBuffer<std::pair<size_t, double>> parse_events_;
84 base::RingBuffer<double> finalize_parsing_events_; 86 base::RingBuffer<double> finalize_parsing_events_;
85 base::RingBuffer<double> prepare_compile_events_; 87 base::RingBuffer<double> prepare_compile_events_;
86 base::RingBuffer<std::pair<size_t, double>> compile_events_; 88 base::RingBuffer<std::pair<size_t, double>> compile_events_;
87 base::RingBuffer<double> finalize_compiling_events_; 89 base::RingBuffer<double> finalize_compiling_events_;
88 90
89 RuntimeCallStats* runtime_call_stats_; 91 RuntimeCallStats* runtime_call_stats_;
90 92
91 DISALLOW_COPY_AND_ASSIGN(CompilerDispatcherTracer); 93 DISALLOW_COPY_AND_ASSIGN(CompilerDispatcherTracer);
92 }; 94 };
93 95
94 } // namespace internal 96 } // namespace internal
95 } // namespace v8 97 } // namespace v8
96 98
97 #endif // V8_COMPILER_DISPATCHER_COMPILER_DISPATCHER_TRACER_H_ 99 #endif // V8_COMPILER_DISPATCHER_COMPILER_DISPATCHER_TRACER_H_
OLDNEW
« no previous file with comments | « src/compiler-dispatcher/compiler-dispatcher-job.cc ('k') | src/compiler-dispatcher/compiler-dispatcher-tracer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698