Mercurial > hg > truffle
comparison src/cpu/x86/vm/templateTable_x86_64.cpp @ 9760:c76b43ed5089
Added infrastructure for recording invoked methods in the profiling information.
author | Christian Haeubl <haeubl@ssw.jku.at> |
---|---|
date | Fri, 17 May 2013 15:38:22 +0200 |
parents | db9981fd3124 |
children | 836a62f43af9 |
comparison
equal
deleted
inserted
replaced
9759:580faa2ee288 | 9760:c76b43ed5089 |
---|---|
3015 // profile this call | 3015 // profile this call |
3016 __ profile_virtual_call(rax, r14, rdx); | 3016 __ profile_virtual_call(rax, r14, rdx); |
3017 | 3017 |
3018 // get target Method* & entry point | 3018 // get target Method* & entry point |
3019 __ lookup_virtual_method(rax, index, method); | 3019 __ lookup_virtual_method(rax, index, method); |
3020 #ifdef GRAAL | |
3021 // r14: MethodDataPointer (r14 is callee saved) | |
3022 __ profile_called_method(method, r14, r13); | |
3023 #endif | |
3020 __ jump_from_interpreted(method, rdx); | 3024 __ jump_from_interpreted(method, rdx); |
3021 } | 3025 } |
3022 | 3026 |
3023 | 3027 |
3024 void TemplateTable::invokevirtual(int byte_no) { | 3028 void TemplateTable::invokevirtual(int byte_no) { |
3099 Label no_such_interface, no_such_method; | 3103 Label no_such_interface, no_such_method; |
3100 | 3104 |
3101 __ lookup_interface_method(// inputs: rec. class, interface, itable index | 3105 __ lookup_interface_method(// inputs: rec. class, interface, itable index |
3102 rdx, rax, rbx, | 3106 rdx, rax, rbx, |
3103 // outputs: method, scan temp. reg | 3107 // outputs: method, scan temp. reg |
3104 rbx, r13, | 3108 rbx, r14, |
3105 no_such_interface); | 3109 no_such_interface); |
3106 | 3110 |
3107 // rbx: Method* to call | 3111 // rbx: Method* to call |
3108 // rcx: receiver | 3112 // rcx: receiver |
3109 // Check for abstract method error | 3113 // Check for abstract method error |
3114 __ jcc(Assembler::zero, no_such_method); | 3118 __ jcc(Assembler::zero, no_such_method); |
3115 | 3119 |
3116 // do the call | 3120 // do the call |
3117 // rcx: receiver | 3121 // rcx: receiver |
3118 // rbx,: Method* | 3122 // rbx,: Method* |
3123 #ifdef GRAAL | |
3124 // r13: MethodDataPointer (r13 is callee saved) | |
3125 __ profile_called_method(rbx, r13, r14); | |
3126 #endif | |
3119 __ jump_from_interpreted(rbx, rdx); | 3127 __ jump_from_interpreted(rbx, rdx); |
3120 __ should_not_reach_here(); | 3128 __ should_not_reach_here(); |
3121 | 3129 |
3122 // exception handling code follows... | 3130 // exception handling code follows... |
3123 // note: must restore interpreter registers to canonical | 3131 // note: must restore interpreter registers to canonical |