ARM: Support for JVMTI notifications from JIT compiler on code generation

Andrew Dinn adinn at redhat.com
Fri Apr 27 01:14:31 PDT 2012


On 26/04/12 17:47, Pavel Tisnovsky wrote:
> Looks ok,
> 
> I only saw two typos:
> 
> s/corrsponding/corresponding
> s/thence/hence

thank you. I will correct the first mistake. However, 'thence' is
actually what I meant. It is like hence but means 'from there' rather
than 'from here'.

> And I have this question:
> 
> address_bci_map_add() - does not it need any check for address_bci_map_length value?
> Are you sure it will newer be higher that THUMB2_MAX_BYTECODE_SIZE?

The comment in the reset function which immediately precedes this is
meant to explain why checking is not required:

    // at worst we need a start address for every bytecode so
    // the map size is limited by the compiler's bytecode limit

Expanding that:

  the compiler will make at most one call to add for each bytecode

  it will not compile methods with more than THUMB2_MAX_BYTECODE_SIZE
bytecodes

  so add will never be called more than THUMB2_MAX_BYTECODE_SIZE times
for any given method

  so add can be called without checking the length if address_bci_map is
allocated with THUMB2_MAX_BYTECODE_SIZE entries.

I think this is clear if you read the code and the comment carefully.

regards,


Andrew Dinn
-----------



More information about the distro-pkg-dev mailing list