review request (S/M): 6962931 move interned strings out of perm gen
tom.rodriguez at oracle.com
Wed Feb 23 12:48:01 PST 2011
On Feb 17, 2011, at 8:21 AM, Coleen Phillimore wrote:
> I have reviewed and tested this. I have a couple of comments.
> The option ScavengeRootsInCode is a bit confusing since this is moving all strings out of permgen so shouldn't depend on a flag that has meaning to the compiler. I'd like to see the code conditional on this flag removed.
Currently ScavengeRootsInCode controls two things. One is the GC machinery that supports embedding scavengeable oops into compiled code and the other is which kinds of oops the compiler considers to be embeddable. The first part will become required behaviour by the end of 7 since invokedynamic requires it so at some point all tests which are comparing ScavengeRootsInCode with 0 should be simplified so that it's no longer optional. We could do that now but it might be worth waiting a little while so that we can use that flag to narrow down problems by turning it off.
Anyway, I agree that controlling it through ScavengeRootsInCode is odd. Maybe we need a separate temporary flag for putting Strings and Classes in perm? Until perm goes away completely we can still allocate them there and things would continue to work fine.
> The other comment I have is based on ignorance. Isn't "tenured' the old generation? So create_tenured_from_unicode() calls basic_create() with a tenured flag and it either allocates the string in permgen or eden, so it doesn't make sense if I have the correct meaning of tenured.
That's a long time oddity. I think it probably dates to the time when there was no perm gen and meta data was simply in tenured mixed with other data. It will be corrected by the time we are done since it will simply go away.
> This would be fixed if the conditional code is removed also, if not, the names should be changed. There is also a create_from_unicode() that is uncalled, presumably because someone added create_tenured_from_unicode().
> On 2/16/2011 2:05 PM, Tom Rodriguez wrote:
>> I had assumed we'd be switching so that strings were always outside perm by default. ScavengeRootsInCode must be != 0 once invokedynamic is enabled by default and since that's definitely going to be enabled in 7 don't we want to turn all this on?
>> On Feb 16, 2011, at 10:10 AM, John Coomes wrote:
>>> This moves interned strings from the perm gen into the regular heap.
>>> The code was written by Tom Rodriguez; I've added a minor fix and done
>>> the testing. More info in the webrev:
>>> Thanks for any feedback.
More information about the hotspot-dev