RFR(M/L): 7145569: G1: optimize nmethods scanning

Thomas Schatzl thomas.schatzl at oracle.com
Wed Jun 19 20:33:20 UTC 2013


  one issue I forgot to mention: currently when printing remembered set
sizes, the new nmethod remembered set is not taken into account.

I am asking myselves, isn't the _strong_code_root_list not a type of
remembered set, and shouldn't it be added to this size? What do you

Additionally it would be really nice to make this information available
in some form so that further (size related) issues in that area could be

Unfortunately at the moment the _strong_roots_code_list is located in
HeapRegion, not in the remembered set, where the method to get its size

On Wed, 2013-06-19 at 13:07 -0700, John Cuthbertson wrote:
> Hi Thomas.
> >
> >>> - in remove_strong_code_root() the code tries to remove multiple entries
> >>> of a given nmethod. How is it possible to get multiple duplicate
> >>> entries, assuming that push_strong_code_root() already does not push an
> >>> nmethod if it is already in the list?
> >> Good point. I don't think it should. Previously I was only checking the
> >> top most element in the list for duplication. Is it better to defend
> >> against it or just guarantee it?
> > I am not sure what you mean here in terms of code... :) Without looking
> > again when is called what, I would simply try to avoid adding duplicates
> > into the lists, and maybe in debug mode check that during removal.
> I mean the current code removes duplicates and so is defensive. Adding a 
> guarantee that there are other entries after removing the first is 
> enforcement.  The current add routine checks the entire list before 
> adding a new entry so duplicate entries should be avoided. I'll change 
> the routine and go the enforcement route.
> A new webrev with an unchanged version of 
> HeapRegion::remove_strong_code_root() can be found at: 
> http://cr.openjdk.java.net/~johnc/7145569/webrev.1/
> The changes associated with your comments are in: 
> http://cr.openjdk.java.net/~johnc/7145569/webrev.1/webrev.2.thomas-comments/
> The changes associated with Mikael's comments are in: 
> http://cr.openjdk.java.net/~johnc/7145569/webrev.1/webrev.3.mikaelg-comments/

I will look at these new webrevs soon, thanks for making such an extra
effort. The webrev.all in that directory would have been sufficient...


More information about the hotspot-gc-dev mailing list