harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From George Timoshenko <george.timoshe...@gmail.com>
Subject Re: [drlvm][jvmti] Profiling support - Compiled Method Load event
Date Wed, 10 Jan 2007 08:32:33 GMT
Egor Pasko wrote:
> On the 0x243 day of Apache Harmony Eugene Ostrovsky wrote:
>> Let me propose the following design:
>> Compiled method load event. More precise specification for inlined methods.
>> 1. CML event must be sent for every method compiled by JIT.
>> If compiled method code is disposed in several disconnected regions each of
>> them must be reported by separate CML event.
>> Each region location is described by code_addr and code_size parameters.
>> Native addresses to bytecode location correspondence should be described in
>> map parameter if this information is available. If compiled method code
>> contains code blocks of inlined methods the addresses of those blocks should
>> be associated with the location of corresponding invoke bytecode
>> instruction.
>> 2. If compiled method code region was inlined within the code region of the
>> outer method it should be reported by separate CML event. Inlined method
>> code region must be enclosed within one of the outer method's code regions.
>> I.e. outer.start <= inlined.start < inlined.end <= outer.end (where
>> method.start = code_addr , method.end = code_addr + code_size - 1)
>> 3. According to #1 and #2 any two of reported regions (R1, R2) may by
>> enclosed one by other (in case of inlining) but must not overlap (i.e.
>> R1.start < R2.start <= R1.end < R2.end condition must not be true).
>> Is it clear enough?
> sort of, thank you thank you!
> George, could you, please, also put a short HOWTO what patches (of 11)
> in HARMONY-2145 should be applied to make the solution and in which
> order.  (then I will be able to make a more thorough review)
>> What do you think?
> well, a couple of words about your algorithm would also have been
> good! (in comments too)
> also, an assert verifying the (3) would have been excellent (I cannot
> find it in the patch)
> please, also substitute all 'unsigned' to 'uint32' in your patch
> (that's a sort of convention in Jitrino)
> The last killer-question for today :)
> you are doing:
> sendCompiledMethodLoadEvent(...AddrLocation* addrLocationMap...)
> before addrLocationMap is initialized completely. Is that OK?

As it is written in JIRA
H-2145-JIT-side-version-2.patch spposed to be applied firstly.
VM_side patch needs to be renewed:
(24 kb)
(There is a problem with compile.cpp file)

So the instructions is:

apply patch H-2145-JIT-side-version-2.patch
then apply 
and (if it was not renewed yet) resolve the conflict in compile.cpp 
After this one can be able to build VM.

Regarding the last question:
don't you find the solution is rather elegant?
addrLocationMap is not supposed to be always filled completely before 
sending the event.
At the beginning of the reporting we know the whole size but have no the 
information about it's continuity.
I see 2 ways: perform 2 passes: the first - to get the sizes of each 
continuous region, the second - to report regions.
Or report all regions by one pass but using the 'hack' with addrLocationMap.

View raw message