Instrumenting call sites.
Remi Forax
forax at univ-mlv.fr
Thu Nov 29 14:09:39 PST 2012
On 11/29/2012 08:15 PM, MacGregor, Duncan (GE Energy Management) wrote:
> I've been doing a little project in my spare time to instrument our call sites and check the number of receivers being seen by each site in a running system. As expected most sites only see one or two classes and so go through the fast path. There are however some sites which see slightly more receivers than our limit for the fast paths but are still getting called an awful lot. So I've got two questions.
>
>
> 1. What is the recommended maximum tree size and longest path for composed MethodHandles (can we push our fast path limit a little higher)?
The real limit is the number of jumps that you have to do before finding
the target, 3 to 5 is the maximum.
After you can still use a kind of vtable local to a callsite (see the
dispatch map in [1]).
> 2. What's my best option for connecting call sites to specific points in byte code and hence to their source locations?
use ASM :)
collect the source with visitSource() and the line with visitLineNumber
to get the user readable info about the callsite.
rewrite your invokedynamic to call only one bootstrap method that acts
as a tranpoline to call the runtime bootstrap methods.
With that you can add method hande before and after [2] the call to
collect receiver data.
>
> Thanks for any help you can give.,
>
> Duncan.
Rémi
[1]
https://code.google.com/p/jsr292-cookbook/source/browse/trunk/bimorphic-cache/src/jsr292/cookbook/bicache/RT.java
[2] https://code.google.com/p/jsr292-cookbook/ (see before and after)
More information about the mlvm-dev
mailing list