test/gc/6581734/Test6581734.java

Print this page




   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test Test6581734.java
  26  * @bug 6581734

  27  * @summary CMS Old Gen's collection usage is zero after GC which is incorrect
  28  * @run main/othervm -Xmx512m -verbose:gc -XX:+UseConcMarkSweepGC Test6581734
  29  *
  30  */
  31 import java.util.*;
  32 import java.lang.management.*;
  33 
  34 // 6581734 states that memory pool usage via the mbean is wrong
  35 // for CMS (zero, even after a collection).
  36 //
  37 // 6580448 states that the collection count similarly is wrong
  38 // (stays at zero for CMS collections)
  39 // -- closed as dup of 6581734 as the same fix resolves both.
  40 
  41 
  42 public class Test6581734 {
  43 
  44     private String poolName = "CMS";
  45     private String collectorName = "ConcurrentMarkSweep";
  46 




   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test Test6581734.java
  26  * @bug 6581734
  27  * @requires vm.gc=="ConcMarkSweep" | vm.gc=="null"
  28  * @summary CMS Old Gen's collection usage is zero after GC which is incorrect
  29  * @run main/othervm -Xmx512m -verbose:gc -XX:+UseConcMarkSweepGC Test6581734
  30  *
  31  */
  32 import java.util.*;
  33 import java.lang.management.*;
  34 
  35 // 6581734 states that memory pool usage via the mbean is wrong
  36 // for CMS (zero, even after a collection).
  37 //
  38 // 6580448 states that the collection count similarly is wrong
  39 // (stays at zero for CMS collections)
  40 // -- closed as dup of 6581734 as the same fix resolves both.
  41 
  42 
  43 public class Test6581734 {
  44 
  45     private String poolName = "CMS";
  46     private String collectorName = "ConcurrentMarkSweep";
  47