10 RFR(xs): 8177551: [TESTBUG] TestHumongousClassLoader.java can fail on systems with non-g1 collector.
dmitry.fazunenko at oracle.com
Mon Mar 27 14:02:17 UTC 2017
On 27.03.2017 16:42, Stefan Johansson wrote:
> Looks good.
> Just a question, the @requires vm.gc.G1 will not prevent the test from
> running on platforms not supporting it? It will just prevent it
> running if another collector in specified?
No, if G1 is not supported on a platform, '@requires vm.gc.G1' will
protect from running.
For more details, please look at 'test/jtreg-ext/requires/VMProps.java'
For the record: sun.hotspot.gc.GC enum could be used from tests to
retrieve the list of available GC and currently selected one.
> On 2017-03-27 15:30, Dmitry Fazunenko wrote:
>> your fix looks good.
>> On 27.03.2017 15:57, Michail Chernov wrote:
>>> Could I have a review for this small fix please?
>>> TestHumongousClassLoader.java may cause to execute G1 specific code
>>> with non-G1 collector. ClassLoaderGenerator should be executed with
>>> explicitly defined -XX:+UseG1GC because it instantiates
>>> G1SampleClass which has G1 specific WhiteBox methods.
More information about the hotspot-gc-dev