< prev index next >

test/hotspot/jtreg/gc/cms/DisableResizePLAB.java

8217389: JTREG: Clean up, remove unused variable warnings

23 package gc.cms;                                                                                                            
24 
25 /*                                                                                                                         
26  * @test DisableResizePLAB                                                                                                 
27  * @key gc                                                                                                                 
28  * @bug 8060467                                                                                                            
29  * @author filipp.zhinkin@oracle.com, john.coomes@oracle.com                                                               
30  * @requires vm.gc.ConcMarkSweep & !vm.graal.enabled                                                                       
31  * @summary Run CMS with PLAB resizing disabled and a small OldPLABSize                                                    
32  * @run main/othervm -XX:+UseConcMarkSweepGC -XX:-ResizePLAB -XX:OldPLABSize=1k -Xmx256m -Xlog:gc=debug gc.cms.DisableResiz
33  */                                                                                                                        
34 
35 public class DisableResizePLAB {                                                                                           
36     public static void main(String args[]) throws Exception {                                                              
37         Object garbage[] = new Object[1_000];                                                                              
38         for (int i = 0; i < garbage.length; i++) {                                                                         
39             garbage[i] = new byte[0];                                                                                      
40         }                                                                                                                  
41         long startTime = System.currentTimeMillis();                                                                       
42         while (System.currentTimeMillis() - startTime < 10_000) {                                                          
                                                                                                                           
43             Object o = new byte[1024];                                                                                     
44         }                                                                                                                  
45     }                                                                                                                      
46 }                                                                                                                          

23 package gc.cms;
24 
25 /*
26  * @test DisableResizePLAB
27  * @key gc
28  * @bug 8060467
29  * @author filipp.zhinkin@oracle.com, john.coomes@oracle.com
30  * @requires vm.gc.ConcMarkSweep & !vm.graal.enabled
31  * @summary Run CMS with PLAB resizing disabled and a small OldPLABSize
32  * @run main/othervm -XX:+UseConcMarkSweepGC -XX:-ResizePLAB -XX:OldPLABSize=1k -Xmx256m -Xlog:gc=debug gc.cms.DisableResiz
33  */
34 
35 public class DisableResizePLAB {
36     public static void main(String args[]) throws Exception {
37         Object garbage[] = new Object[1_000];
38         for (int i = 0; i < garbage.length; i++) {
39             garbage[i] = new byte[0];
40         }
41         long startTime = System.currentTimeMillis();
42         while (System.currentTimeMillis() - startTime < 10_000) {
43             @SuppressWarnings("unused")
44             Object o = new byte[1024];
45         }
46     }
47 }
< prev index next >