summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorNicolas Geoffray <ngeoffray@google.com>2014-02-11 10:35:35 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-02-11 10:35:36 +0000
commitabaf927f29f6feceb3df3e6ced7d01970ba0dbe9 (patch)
tree245cb514e070eea6fd48dba6d1e5d85fcd9146c5 /runtime
parent9e36e4c3abdc5f101a2ce2beb3681a941f9d4be5 (diff)
parentea3fa0b4ba13d7bd7f7c1cd85202ccbe141a35ae (diff)
downloadandroid_art-abaf927f29f6feceb3df3e6ced7d01970ba0dbe9.tar.gz
android_art-abaf927f29f6feceb3df3e6ced7d01970ba0dbe9.tar.bz2
android_art-abaf927f29f6feceb3df3e6ced7d01970ba0dbe9.zip
Merge "Re-apply: Implement cumulative timings for CompilerDriver."
Diffstat (limited to 'runtime')
-rw-r--r--runtime/common_test.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/runtime/common_test.h b/runtime/common_test.h
index daa2ff152b..af7e8aecf8 100644
--- a/runtime/common_test.h
+++ b/runtime/common_test.h
@@ -480,12 +480,13 @@ class CommonTest : public testing::Test {
}
}
class_linker_->FixupDexCaches(runtime_->GetResolutionMethod());
+ timer_.reset(new CumulativeLogger("Compilation times"));
compiler_driver_.reset(new CompilerDriver(verification_results_.get(),
method_inliner_map_.get(),
compiler_backend, instruction_set,
instruction_set_features,
true, new CompilerDriver::DescriptorSet,
- 2, true));
+ 2, true, true, timer_.get()));
}
// We typically don't generate an image in unit tests, disable this optimization by default.
compiler_driver_->SetSupportBootImageFixup(false);
@@ -530,6 +531,7 @@ class CommonTest : public testing::Test {
(*icu_cleanup_fn)();
compiler_driver_.reset();
+ timer_.reset();
callbacks_.Reset(nullptr, nullptr);
method_inliner_map_.reset();
verification_results_.reset();
@@ -662,7 +664,7 @@ class CommonTest : public testing::Test {
class TestCompilerCallbacks : public CompilerCallbacks {
public:
- TestCompilerCallbacks() : verification_results_(nullptr), method_inliner_map_(nullptr) { }
+ TestCompilerCallbacks() : verification_results_(nullptr), method_inliner_map_(nullptr) {}
void Reset(VerificationResults* verification_results,
DexFileToMethodInlinerMap* method_inliner_map) {
@@ -701,6 +703,7 @@ class CommonTest : public testing::Test {
UniquePtr<DexFileToMethodInlinerMap> method_inliner_map_;
TestCompilerCallbacks callbacks_;
UniquePtr<CompilerDriver> compiler_driver_;
+ UniquePtr<CumulativeLogger> timer_;
private:
std::vector<const DexFile*> opened_dex_files_;