summaryrefslogtreecommitdiff
path: root/src/compiled_method.cc
diff options
context:
space:
mode:
author Logan Chien <loganchien@google.com> 2012-04-02 02:37:37 +0800
committer Shih-wei Liao <sliao@google.com> 2012-04-06 17:04:56 -0700
commit937105a220983351695bf4c8924171ba5d17a68c (patch)
tree4e259853c80e0d28e12ecf54c6e0ffa178797497 /src/compiled_method.cc
parent0c717dd1c56bd29cf860d0feda8e629dab2cadb3 (diff)
Use ELF function index to distinguish generated functions.
We replaced LLVMLongName and LLVMStubName with ElfFuncName, and we are using the simple name: Art0, Art1, ..., ArtN, as the function name of every generated functions. This gives us 3 benefits: 1. We can avoid the ambiguous function name returned by LLVMLongName() in some special situation. 2. We don't need to have the art::Method object during the executable linking procedure. Besides, this will make bootstrapping easier. 3. Reduce the size of the ELF executable, since we don't have to save a long function name, which usually contains more than 30 characters. Change-Id: Ib698062b272458e847ad5545d7acf33a4dc9eb85
Diffstat (limited to 'src/compiled_method.cc')
-rw-r--r--src/compiled_method.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/compiled_method.cc b/src/compiled_method.cc
index e85809c7e5..2340cbd0dd 100644
--- a/src/compiled_method.cc
+++ b/src/compiled_method.cc
@@ -83,9 +83,12 @@ CompiledMethod::CompiledMethod(InstructionSet instruction_set,
CHECK_NE(code.size(), 0U);
}
-CompiledMethod::CompiledMethod(InstructionSet instruction_set, size_t elf_idx)
+CompiledMethod::CompiledMethod(InstructionSet instruction_set,
+ const uint16_t elf_idx,
+ const uint16_t elf_func_idx)
: instruction_set_(instruction_set), frame_size_in_bytes_(0),
- core_spill_mask_(0), fp_spill_mask_(0), elf_idx_(elf_idx) {
+ core_spill_mask_(0), fp_spill_mask_(0), elf_idx_(elf_idx),
+ elf_func_idx_(elf_func_idx) {
}
CompiledMethod::~CompiledMethod() {}
@@ -173,7 +176,8 @@ const void* CompiledMethod::CodePointer(const void* code_pointer,
}
#if defined(ART_USE_LLVM_COMPILER)
-CompiledInvokeStub::CompiledInvokeStub(size_t elf_idx) : elf_idx_(elf_idx) {
+CompiledInvokeStub::CompiledInvokeStub(uint16_t elf_idx, uint16_t elf_func_idx)
+ : elf_idx_(elf_idx), elf_func_idx_(elf_func_idx) {
}
#endif