RFR: 8154096: Extend WhiteBox API with methods which retrieve from VM information about available GC
Kim Barrett
kim.barrett at oracle.com
Sat Apr 30 00:03:23 UTC 2016
> On Apr 29, 2016, at 7:34 AM, Dmitry Fazunenko <dmitry.fazunenko at oracle.com> wrote:
>
> Hello,
>
> To address the offline comments from Igor I completely reimplemented the fix.
> The main change is introduction a new class sun.hotspot.gc.GC which could be used by tests to:
> http://cr.openjdk.java.net/~dfazunen/8154096/webrev.02/test/raw_files/new/test/lib/sun/hotspot/gc/GC.java
> - get the currently used GC
> - check if the current GC was selected by ergo or set explicitly
> - get list of supported GC
>
> The new version also minimize the changes to the WhiteBox API
>
> So reviewers are still very welcome!
>
> http://cr.openjdk.java.net/~dfazunen/8154096/webrev.02/
> https://bugs.openjdk.java.net/browse/JDK-8154096
------------------------------------------------------------------------------
hotspot/src/share/vm/prims/whitebox.cpp
289 } else if (UseParallelGC | UseParallelOldGC) {
Use || rather than | with booleans.
------------------------------------------------------------------------------
hotspot/src/share/vm/prims/whitebox.cpp
289 } else if (UseParallelGC | UseParallelOldGC) {
290 return parallel_code;
291 } else if (UseParallelOldGC) {
292 return FLAG_IS_ERGO(UseParallelOldGC);
The test on line 291 will never be true, because that case is already
handled by line 289.
------------------------------------------------------------------------------
hotspot/src/share/vm/prims/whitebox.cpp
298 assert(false, "No GC selected yet");
and
322 assert(false, "No GC selected yet");
------------------------------------------------------------------------------
hotspot/src/share/vm/prims/whitebox.cpp
299 return false;
and
323 return false;
Don't use boolean false as an empty bit mask; return 0.
------------------------------------------------------------------------------
Looking at the JDK-8154096 and the CRs it is blocking, I'm failing to
understand the motivation for the "selected by ergonomics" predicate.
Why is ergo-selection more interesting than command-line or default
selection? And for the described use-case (jtreg @requires
filtering), why would any of those distinctions be interesting?
------------------------------------------------------------------------------
More information about the hotspot-gc-dev
mailing list