Request for review - 8013184 CMS: Call reset_after_compaction() only if a compaction has been done
Thomas Schatzl
thomas.schatzl at oracle.com
Fri May 3 13:08:50 UTC 2013
On Fri, 2013-05-03 at 06:04 -0700, Jon Masamitsu wrote:
> On 4/30/2013 5:46 AM, Thomas Schatzl wrote:
> > Hi,
> >
> > On Thu, 2013-04-25 at 12:32 -0700, Jon Masamitsu wrote:
> >> 8013184: CMS: Call reset_after_compaction() only if a compaction has been done
> >>
> >> When a System.gc() is done with -XX:-UseCMSCompactAtFullCollection, a
> >> mark-sweep
> >> without compaction is done. In that instance the call to
> >> reset_after_compaction() is
> >> not appropriate.
> >>
> >> This changeset is built on top of the changeset for 8013032
> >>
> >> http://cr.openjdk.java.net/~jmasa/8013184/webrev.00/
> >
> > Minor: in the test, instead of hardcoding the class name to call, maybe
> > you could use something like ThreePlusMSSystemGC.class.getName()
> > instead.
>
> Sorry, but I don't understand this comment. Could you explain more what
> the suggestin
> is?
The current code to invoke another VM in the test looks as follows:
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
41 "-showversion",
42 "-XX:+UseConcMarkSweepGC",
43 "-XX:MaxTenuringThreshold=1",
44 "-XX:-UseCMSCompactAtFullCollection",
45 "CheckThreePlusMSSystemGC$ThreePlusMSSystemGC"
If you don't want to manually mangle it you could use
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
41 "-showversion",
42 "-XX:+UseConcMarkSweepGC",
43 "-XX:MaxTenuringThreshold=1",
44 "-XX:-UseCMSCompactAtFullCollection",
45 ThreePlusMSSystemGC.class.getName()
I.e. no need for manual name mangling and hardcoding the name of the class you want to call, the name can be determined during runtime.
That's just a matter of taste though, I guess neither Java name mangling nor the test will change a lot.
Hth,
Thomas
More information about the hotspot-gc-dev
mailing list