What influences young generation pause times?

Raman Gupta rocketraman at fastmail.fm
Thu Apr 22 09:13:15 PDT 2010


On 04/21/2010 07:27 PM, Tony Printezis wrote:
> Raman Gupta wrote:
>> I am not suggesting any new API at this time -- I mentioned it only as
>> a pie-in-the-sky kind of thing.
>>
>> My current suggestion is simply to gate System.gc() (or actually
>> Runtime.gc() I guess) with a new RuntimePermission. Without the
>> appropriate permission granted, gc() would simply be a no-op.
>>
>> That on its own would be very useful by allowing application code to
>> call System.gc() without worrying about rogue libraries also doing so
>> at inopportune times. Currently, I always run with
>> -XX:+DisableExplicitGC but that also prevents my app from scheduling it.
 >>
> Raman, if you want to cause a Full GC on your app while you have
> +DisableExplicitGC, one of the things you can do is to call jmap
> -histo:live <pid> on the JVM. The Full GCs initiated by the heap
> inspection tools ignore +DisableExplicitGC. Not pretty, but it should
> work... FWIW.

Nice hack :)


More information about the hotspot-gc-dev mailing list