diff options
| author | 2012-03-20 17:36:32 +0800 | |
|---|---|---|
| committer | 2012-03-26 21:09:36 -0700 | |
| commit | df57614aa99801a50202e284ee8e8497d8e92621 (patch) | |
| tree | c58b9f0294f2c4e3d0e5d0517eee2e4d8fad8daa /src/compiler_llvm/compiler_llvm.cc | |
| parent | 0f0899ac8fbaa470922976d058bbb144fb9eea06 (diff) | |
Add GetElfImages() method to CompilerLLVM.
(cherry picked from commit 950fc6e6a6b568f0cf511c092bee3d31547dc857)
Change-Id: I1ded5909bae4d87ed05b2c192fcb2362eaa37461
Diffstat (limited to 'src/compiler_llvm/compiler_llvm.cc')
| -rw-r--r-- | src/compiler_llvm/compiler_llvm.cc | 15 |
1 files changed, 15 insertions, 0 deletions
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<ElfImage> CompilerLLVM::GetElfImages() const { + std::vector<ElfImage> 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<art::ElfImage> 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_); |