What influences young generation pause times?

Raman Gupta rocketraman at fastmail.fm
Tue Apr 20 14:53:14 PDT 2010


On 04/20/2010 02:11 PM, Tony Printezis wrote:
> Additionally, I would be willing to bet money that if we provided such
> an API, library writers will abuse it thinking that "hey, the end of
> this library call will be a great time to do a young GC!", without
> taking into consideration that many other threads could be doing
> something totally different at the same time (we've seen way too many
> libraries that call System.gc() already...).

While I wasn't talking about young GC's, a couple of years ago I 
submitted a proposal to to this list to add a new RuntimePermission 
that would allow execution of explicit GCs [1]. Without such 
permission, the System.gc() call would simply return without doing 
anything. Ideally the signature would be modified to return a boolean 
"true if performed", "false if not", and even more ideally, a more 
comprehensive GC API could be provided.

Such an approach would allow the addition of some explicit GC control 
from applications, without allowing abuse by random libraries.

While a couple of people chimed in that they too would like some 
explicit GC control, the proposal was ignored.

[1] http://markmail.org/message/cpmpwoodbcmspesc

I'd at least like to hear some reasons why something like this can't 
be done or isn't a good idea. I think it would be a great feature for 
many people.

Cheers,
Raman


More information about the hotspot-gc-dev mailing list