From 8913fc1a27df8cf3b37fd99e94d87f290591328e Mon Sep 17 00:00:00 2001 From: Mathieu Chartier Date: Wed, 9 Dec 2015 16:38:30 -0800 Subject: Add and use loaded class profiling Class profiling is a way to keep track of which classes are resolved. From here the compiler can use this information to generate a smaller app image. TODO: Add tests for profile stuff. Bug: 22858531 Change-Id: I91ccd686394cc2517512f66abb0e277f3d26d4da --- runtime/class_linker.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'runtime/class_linker.h') diff --git a/runtime/class_linker.h b/runtime/class_linker.h index a9448f732c..caabab3144 100644 --- a/runtime/class_linker.h +++ b/runtime/class_linker.h @@ -17,8 +17,10 @@ #ifndef ART_RUNTIME_CLASS_LINKER_H_ #define ART_RUNTIME_CLASS_LINKER_H_ +#include #include #include +#include #include #include @@ -27,6 +29,7 @@ #include "base/macros.h" #include "base/mutex.h" #include "class_table.h" +#include "dex_cache_resolved_classes.h" #include "dex_file.h" #include "gc_root.h" #include "jni.h" @@ -595,6 +598,13 @@ class ClassLinker { static bool ShouldUseInterpreterEntrypoint(ArtMethod* method, const void* quick_code) SHARED_REQUIRES(Locks::mutator_lock_); + std::set GetResolvedClasses(bool ignore_boot_classes) + REQUIRES(!dex_lock_); + + std::unordered_set GetClassDescriptorsForProfileKeys( + const std::set& classes) + REQUIRES(!dex_lock_); + struct DexCacheData { // Weak root to the DexCache. Note: Do not decode this unnecessarily or else class unloading may // not work properly. -- cgit v1.2.3-59-g8ed1b