summaryrefslogtreecommitdiffstats
path: root/compiler/driver/compiler_driver.h
diff options
context:
space:
mode:
authorNicolas Geoffray <ngeoffray@google.com>2014-02-10 11:59:41 +0000
committerNicolas Geoffray <ngeoffray@google.com>2014-02-11 10:12:55 +0000
commitea3fa0b4ba13d7bd7f7c1cd85202ccbe141a35ae (patch)
tree7fe7cc462617ff41bf26dc551f2fdc5f25146eda /compiler/driver/compiler_driver.h
parenta52214230ad091359956ed7566670963aedf2045 (diff)
downloadart-ea3fa0b4ba13d7bd7f7c1cd85202ccbe141a35ae.zip
art-ea3fa0b4ba13d7bd7f7c1cd85202ccbe141a35ae.tar.gz
art-ea3fa0b4ba13d7bd7f7c1cd85202ccbe141a35ae.tar.bz2
Re-apply: Implement cumulative timings for CompilerDriver.
The bug was due to how the test infrastructure works: a compiler driver surives the stack where it is allocated. Change-Id: I345fe0e4afb2bd15937233db8afb350f09429558
Diffstat (limited to 'compiler/driver/compiler_driver.h')
-rw-r--r--compiler/driver/compiler_driver.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/compiler/driver/compiler_driver.h b/compiler/driver/compiler_driver.h
index 4307212..c562f76 100644
--- a/compiler/driver/compiler_driver.h
+++ b/compiler/driver/compiler_driver.h
@@ -22,6 +22,7 @@
#include <vector>
#include "base/mutex.h"
+#include "base/timing_logger.h"
#include "class_reference.h"
#include "compiled_class.h"
#include "compiled_method.h"
@@ -98,7 +99,8 @@ class CompilerDriver {
CompilerBackend compiler_backend, InstructionSet instruction_set,
InstructionSetFeatures instruction_set_features,
bool image, DescriptorSet* image_classes,
- size_t thread_count, bool dump_stats);
+ size_t thread_count, bool dump_stats, bool dump_passes,
+ CumulativeLogger* timer);
~CompilerDriver();
@@ -281,6 +283,15 @@ class CompilerDriver {
class CallPatchInformation;
class TypePatchInformation;
+
+ bool GetDumpPasses() const {
+ return dump_passes_;
+ }
+
+ CumulativeLogger& GetTimingsLogger() const {
+ return *timings_logger_;
+ }
+
class PatchInformation {
public:
const DexFile& GetDexFile() const {
@@ -523,6 +534,9 @@ class CompilerDriver {
UniquePtr<AOTCompilationStats> stats_;
bool dump_stats_;
+ const bool dump_passes_;
+
+ CumulativeLogger* const timings_logger_;
typedef void (*CompilerCallbackFn)(CompilerDriver& driver);
typedef MutexLock* (*CompilerMutexLockFn)(CompilerDriver& driver);