NullPointerException in HotSpotRuntime:lower when using Snippets
ATKIN-GRANVILLE Chris
s1255753 at sms.ed.ac.uk
Mon Jul 15 11:38:52 PDT 2013
Hi Mick
On 15 Jul 2013, at 18:08, Mick Jordan <mick.jordan at oracle.com>
wrote:
> On 7/14/13 10:13 AM, ATKIN-GRANVILLE Chris wrote:
>> On 14 Jul 2013, at 17:10, Doug Simon <doug.simon at oracle.com>
>> wrote:
>>
>>
>>> How important is it that your instrumentation achieves complete coverage? Do you need to see every single array access in the program? This will not be possible in the current GraalVM because it's hard to guarantee that execution always happens in compiled code. For this, you really need to do bytecode instrumentation.
>>>
>> We are only interested in array accesses that occur within loops (eventually we'll also extend to field accesses and so on, but for now we're sticking with arrays). Accesses that are not executed are unimportant as they pose no dependence risk.
>>
>> Perhaps it would be possible use ASM or another bytecode manipulation library to add in transformations from InstalledCode.getCode(). Would it be possible to somehow load modified bytecode into Graal or something like that?
>>
>>
>>
> Given your goals, as I understand them, have you looked at the Maxine VM and the VMA extension? [I.e., how important is it that you run with Hotspot?]
I can't say I've given much thought to it yet, but I will now. I've been looking at modifying bytecode using javassist/ASM to call instrumentation, but there's other issues with that (mainly being able to detect loops would be manual). If I used Maxine + VMA, would it be relatively easy to implement dynamic tracing /in a loop/ - and /only/ in a loop? This is the disadvantage of using tools as low-level as VMA - I've lost a lot of the semantic information that is available at compile time (in Graal I had does-the-operation-exist-inside-a-loop working in <5 mins).
> I ran your example loopDependency example just now (with full bytecode advising enabled). The output from the tool that analyses the trace output (you can do the analysis online if you prefer), is attached. In some sense VMA is equivalent to the bytecode transformation in systems like Aspect/J but it is much more efficient and does not suffer the problems of operating strictly "above" the VM. Maxine also implements the JVMTI instrumentation framework and it is possible to write JVMTI handlers in Java.
> I have a version of VMA for Graal, which is based on inserting AdviceNodes in the graph and then lowering those nodes via snippets to hook into the Maxine runtime support for VMA. I'll be shipping all of this by the end of the month. In principle Graal/VMA would work for Hotspot but, as Doug notes, there are issues related to the overall Hotspot environment. Not least is that VMA leverages Maxine's ability to (safely) change the object layout to add support for efficient object ids and extra bits for marking (which may not matter for your goals).
>
> Mick
>
>
>
> <glanville.trace>
--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.
More information about the graal-dev
mailing list