diff options
author | Dave Allison <dallison@google.com> | 2014-01-28 18:33:52 -0800 |
---|---|---|
committer | Dave Allison <dallison@google.com> | 2014-03-07 13:42:48 -0800 |
commit | 39c3bfbd03d85c63cfbe69f17ce5800ccc7d6c13 (patch) | |
tree | fa777039b3f7c34f3dd322d04307766246526080 /compiler/dex/mir_analysis.cc | |
parent | 0918614b7434783477e8668df7850a7aaf8d5611 (diff) | |
download | android_art-39c3bfbd03d85c63cfbe69f17ce5800ccc7d6c13.tar.gz android_art-39c3bfbd03d85c63cfbe69f17ce5800ccc7d6c13.tar.bz2 android_art-39c3bfbd03d85c63cfbe69f17ce5800ccc7d6c13.zip |
Make use of profiling information for dex2oat
If the profile file exists, the compiler driver will read it
and store the data in an internal map. Then, when we want to work
out whether to compile a method or not, the map is consulted and if
the method shows up with a high enough percentage of use we compile it.
The profile file itself is created by installd and is writeable by the
app. The file is in /data/dalvik-cache/profiles and is named by
the package name.
This also modifies the profiler itself to:
1. Only count runnable threads (not suspended threads) in the profile
2. Use system properties to allow tuning of the profile parameters
3. Merge profiles from multiple processes using file locking.
Bug: 12877748
Change-Id: Iab2f3a327a2860db2a80d5724277d6c626227f2b
Conflicts:
compiler/dex/frontend.cc
compiler/dex/mir_analysis.cc
compiler/dex/verification_results.cc
compiler/driver/compiler_driver.cc
dex2oat/dex2oat.cc
runtime/class_linker.cc
runtime/runtime.cc
runtime/runtime.h
Diffstat (limited to 'compiler/dex/mir_analysis.cc')
-rw-r--r-- | compiler/dex/mir_analysis.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/compiler/dex/mir_analysis.cc b/compiler/dex/mir_analysis.cc index 667ee267ea..5314bb7025 100644 --- a/compiler/dex/mir_analysis.cc +++ b/compiler/dex/mir_analysis.cc @@ -999,7 +999,6 @@ bool MIRGraph::ComputeSkipCompilation(MethodStats* stats, bool skip_default) { /* * Will eventually want this to be a bit more sophisticated and happen at verification time. - * Ultimate goal is to drive with profile data. */ bool MIRGraph::SkipCompilation() { const CompilerOptions& compiler_options = cu_->compiler_driver->GetCompilerOptions(); @@ -1013,8 +1012,7 @@ bool MIRGraph::SkipCompilation() { return true; } - if (compiler_filter == CompilerOptions::kInterpretOnly) { - LOG(WARNING) << "InterpretOnly should ideally be filtered out prior to parsing."; + if (compiler_filter == CompilerOptions::kInterpretOnly || compiler_filter == CompilerOptions::kProfiled) { return true; } @@ -1170,4 +1168,8 @@ void MIRGraph::DoCacheFieldLoweringInfo() { } } +bool MIRGraph::SkipCompilation(const std::string& methodname) { + return cu_->compiler_driver->SkipCompilation(methodname); +} + } // namespace art |