RFR(10)(XS): JDK-8171365: nsk/jvmti/scenarios/events/EM04/em04t001: many errors for missed events
    Chris Plummer 
    chris.plummer at oracle.com
       
    Fri Jun  2 18:54:14 UTC 2017
    
    
  
Hello,
[I'd like a compiler team member to comment on this, in addition to 
runtime or svc]
Please review the following:
https://bugs.openjdk.java.net/browse/JDK-8171365
http://cr.openjdk.java.net/~cjplummer/8171365/webrev.00/
The CR is closed, so I'll describe the issue here:
The test is making sure that all |JVMTI_EVENT_DYNAMIC_CODE_GENERATED| 
events that occur during the agent's OnLoad phase also occur when later 
GenerateEvents() is called. GenerateEvents() is generating some of the 
events, but most are not sent. The problem is CodeCache::blobs_do() is 
only iterating over NMethod code heaps, not all of the code heaps, so 
many code blobs are missed. I changed it to iterate over all the code 
heaps, and now all the |JVMTI_EVENT_DYNAMIC_CODE_GENERATED|events are sent.
Note there is another version of CodeCache::blobs_do() that takes a 
closure object instead of a function pointer. It is used by GC and I 
assume is working properly by only iterating over NMethod code heaps, so 
I did not change it. The version that takes a function pointer is only 
used by JVMTI for implementing GenerateEvents(), so this change should 
not impact any other part of the VM. However, I do wonder if these 
blobs_do() methods should be renamed to avoid confusion since they don't 
(and haven't in the past) iterated over the same set of code blobs.
thanks,
Chris
https://docs.oracle.com/javase/8/docs/platform/jvmti/jvmti.html#DynamicCodeGenerated
    
    
More information about the hotspot-dev
mailing list