From df57614aa99801a50202e284ee8e8497d8e92621 Mon Sep 17 00:00:00 2001 From: Logan Chien Date: Tue, 20 Mar 2012 17:36:32 +0800 Subject: Add GetElfImages() method to CompilerLLVM. (cherry picked from commit 950fc6e6a6b568f0cf511c092bee3d31547dc857) Change-Id: I1ded5909bae4d87ed05b2c192fcb2362eaa37461 --- src/compiler_llvm/compiler_llvm.cc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/compiler_llvm/compiler_llvm.cc') diff --git a/src/compiler_llvm/compiler_llvm.cc b/src/compiler_llvm/compiler_llvm.cc index 65d53b96e6..e02c9135b9 100644 --- a/src/compiler_llvm/compiler_llvm.cc +++ b/src/compiler_llvm/compiler_llvm.cc @@ -225,6 +225,17 @@ GetMethodInvokeStubAddr(const CompiledInvokeStub* cm, const Method* method) cons } +std::vector CompilerLLVM::GetElfImages() const { + std::vector result; + + for (size_t i = 0; i < cunits_.size(); ++i) { + result.push_back(cunits_[i]->GetElfImage()); + } + + return result; +} + + CompiledMethod* CompilerLLVM:: CompileDexMethod(OatCompilationUnit* oat_compilation_unit) { MutexLock GUARD(compiler_lock_); @@ -362,6 +373,10 @@ extern "C" const art::Method::InvokeStub* compilerLLVMGetMethodInvokeStubAddr(co return compiler_llvm->GetMethodInvokeStubAddr(cm, method); } +extern "C" std::vector compilerLLVMGetElfImages(const art::Compiler& compiler) { + return ContextOf(compiler)->GetElfImages(); +} + // Note: Using this function carefully!!! This is temporary solution, we will remove it. extern "C" art::MutexLock* compilerLLVMMutexLock(art::Compiler& compiler) { return new art::MutexLock(ContextOf(compiler)->compiler_lock_); -- cgit v1.2.3-59-g8ed1b