En, I don't know whether OPT can eliminate such code:
aload_0
getfield 5 aload_0
aload_0 ==> getfield 5
getfield 5 dup
If it can eliminate them; I add tracing code as follows:
aload_0 aload_0
getfield 5 call ObjectRecord
aload_0 ==> getfield 5
getfield 5 aload_0
call ObjectRecord
getfield 5
I am afraid the instrumented "Call ObjectRecord" will cause the redundant
code can't be eliminated.
2007/1/23, Mikhail Fursov <[EMAIL PROTECTED]>:
On 1/23/07, zouqiong <[EMAIL PROTECTED]> wrote:
>
> Hi, Mikhail:
> I implement code to trace object access just follow WB's way. But I'm
> afraid that the instrumented code in ops like getfield would effect the
> liveness analysis optimize?
When we add new commands/types to optimizer we have to teach it how to
deal
with them. But I don't think that performance impact of a new 'use'
operation for a field is critical. In your case the most performance
impact
will be due to the additional tracking call.
Have I answered your question?
--
Mikhail Fursov
--
Best Regards,
Qiong,Zou