Egor,
thanks for clear scheme.
In your terms I'd do something like this:
* firstly - raise event for X:
CompiledMethodLoad(start=X.1.start,
method_size=X.1.size + X.2.size,
addr_loc_map=
[X.1.start -> bcoff1,
X.2.start -> bcoff2])
* secondly - raise event for Y:
CompiledMethodLoad(start=Y.1.start,
method_size=Y.1.size,
addr_loc_map=
[Y.1.start -> bcoff_Y])
> For example, we have
> some chinks of methods X and Y intermixed like this:
> "X.1,Y.1,X.2". To overcome we may:
> * raise a single event for X:
> CompiledMethodLoad(start=X.1.start,
> method_size=X.1.size + Y.1.size + X.2.size,
> addr_loc_map=
> [X.1.start -> bcoff1,
> Y.1.start -> 0,
> X.2.start -> bcoff2])
> * raise 2 events for X:
> CompiledMethodLoad(start=X.1.start,
> method_size=X.1.size,
> addr_loc_map=
> [X.1.start -> bcoff1])
> CompiledMethodLoad(start=X.2.start,
> method_size=X.2.size,
> addr_loc_map=
> [X.2.start -> bcoff2])
>
> I would highly appreciate if some JVMTI guru steps down from Olymp and
> tells which of two is the best, or at least says what RI does in that
> case (or, maybe, RI does not generate non-contigous blocks?)
>
> I like the second approach (raise 2 events)
>