summaryrefslogtreecommitdiff
path: root/runtime/oat_file_assistant.h
diff options
context:
space:
mode:
author Calin Juravle <calin@google.com> 2020-02-11 16:49:47 -0800
committer Calin Juravle <calin@google.com> 2020-02-12 19:22:17 +0000
commit2d3de3a40015af07f7645a298f77b398af0c6c2c (patch)
tree360b130e574af9a5e837ebd9d2585de29db34f65 /runtime/oat_file_assistant.h
parentc55032774cfec4b5222b362a81a3b8b69e133710 (diff)
Make class loader context fail for unknown class loaders
Update OatFileAssistant to fail the class loader check when getting an unknown (null) class loader. The code is only use in GetDexoptNeeded paths and does not affect the runtime behaviour. This will enable dexoptanalyzer to provide the right answer for dex files whose class loader changes often. Test: test-art-host Bug: 147208643 Change-Id: I869109e669e68afe094e7703ed574575b98d7cc6
Diffstat (limited to 'runtime/oat_file_assistant.h')
-rw-r--r--runtime/oat_file_assistant.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/runtime/oat_file_assistant.h b/runtime/oat_file_assistant.h
index b5812f9e25..aa4d83b383 100644
--- a/runtime/oat_file_assistant.h
+++ b/runtime/oat_file_assistant.h
@@ -144,10 +144,10 @@ class OatFileAssistant {
// the oat location. Returns a negative status code if the status refers to
// the oat file in the odex location.
int GetDexOptNeeded(CompilerFilter::Filter target_compiler_filter,
+ ClassLoaderContext* context,
+ const std::vector<int>& context_fds,
bool profile_changed = false,
- bool downgrade = false,
- ClassLoaderContext* context = nullptr,
- const std::vector<int>& context_fds = std::vector<int>());
+ bool downgrade = false);
// Returns true if there is up-to-date code for this dex location,
// irrespective of the compiler filter of the up-to-date code.
@@ -292,10 +292,10 @@ class OatFileAssistant {
// downgrade should be true if the purpose of dexopt is to downgrade the
// compiler filter.
DexOptNeeded GetDexOptNeeded(CompilerFilter::Filter target_compiler_filter,
- bool profile_changed,
- bool downgrade,
ClassLoaderContext* context,
- const std::vector<int>& context_fds);
+ const std::vector<int>& context_fds,
+ bool profile_changed,
+ bool downgrade);
// Returns the loaded file.
// Loads the file if needed. Returns null if the file failed to load.