summaryrefslogtreecommitdiff
path: root/compiler/driver/compiler_driver_test.cc
diff options
context:
space:
mode:
authorMathieu Chartier <mathieuc@google.com>2017-02-17 12:56:25 -0800
committerMathieu Chartier <mathieuc@google.com>2017-02-17 15:54:49 -0800
commitd0af56cdb1eaebea403e382257bdc14d7b7fdaa4 (patch)
tree56b21fb7d4dcbb0dcab45e07dc48e47a074af6c5 /compiler/driver/compiler_driver_test.cc
parentee883219e329571b9e487b94dc6a675095d088bf (diff)
Make dex2oat support profiles passed to non profile filters
Using a non profile filter with an input profile should compile everything but generate an app image and optimize layout based on the profile. Change UseProfileGuidedCompilation to use the profile arguments. Using profile arguments instead of being based on the compiler filter lets us do full speed compile and layout based on profile. Fix ShouldCompileBasedOnProfile to use the compiler filter instead of the existence of a profile. Fixed gtests. Test: test-art-host Bug: 34927277 Change-Id: I325a10d2072ed427bb32f96e4efa54cf81e94ad3
Diffstat (limited to 'compiler/driver/compiler_driver_test.cc')
-rw-r--r--compiler/driver/compiler_driver_test.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/driver/compiler_driver_test.cc b/compiler/driver/compiler_driver_test.cc
index 1e4ca16844..3879631053 100644
--- a/compiler/driver/compiler_driver_test.cc
+++ b/compiler/driver/compiler_driver_test.cc
@@ -246,6 +246,11 @@ class CompilerDriverProfileTest : public CompilerDriverTest {
return &profile_info_;
}
+ CompilerFilter::Filter GetCompilerFilter() const OVERRIDE {
+ // Use a profile based filter.
+ return CompilerFilter::kSpeedProfile;
+ }
+
std::unordered_set<std::string> GetExpectedMethodsForClass(const std::string& clazz) {
if (clazz == "Main") {
return std::unordered_set<std::string>({
@@ -304,7 +309,6 @@ TEST_F(CompilerDriverProfileTest, ProfileGuidedCompilation) {
// Need to enable dex-file writability. Methods rejected to be compiled will run through the
// dex-to-dex compiler.
- ProfileCompilationInfo info;
for (const DexFile* dex_file : GetDexFiles(class_loader)) {
ASSERT_TRUE(dex_file->EnableWrite());
}