diff src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp @ 18058:54bc75c144b0

Merge
author asaha
date Thu, 29 May 2014 13:14:25 -0700
parents 78bbf4d43a14
children 8e20ef014b08
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	Wed May 28 08:09:26 2014 -0400
+++ b/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	Thu May 29 13:14:25 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -63,6 +63,8 @@
 #include "services/memoryService.hpp"
 #include "services/runtimeService.hpp"
 
+PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
+
 // statics
 CMSCollector* ConcurrentMarkSweepGeneration::_collector = NULL;
 bool CMSCollector::_full_gc_requested = false;
@@ -1181,7 +1183,7 @@
     gclog_or_tty->print(" icms alloc limits:  "
                            PTR_FORMAT "," PTR_FORMAT
                            " (" SIZE_FORMAT "%%," SIZE_FORMAT "%%) ",
-                           _icms_start_limit, _icms_stop_limit,
+                           p2i(_icms_start_limit), p2i(_icms_stop_limit),
                            percent_of_space(eden, _icms_start_limit),
                            percent_of_space(eden, _icms_stop_limit));
     if (Verbose) {
@@ -1209,7 +1211,7 @@
         gclog_or_tty->print_cr(" start limit top=" PTR_FORMAT
                                ", new limit=" PTR_FORMAT
                                " (" SIZE_FORMAT "%%)",
-                               top, _icms_stop_limit,
+                               p2i(top), p2i(_icms_stop_limit),
                                percent_of_space(space, _icms_stop_limit));
       }
       ConcurrentMarkSweepThread::start_icms();
@@ -1226,7 +1228,7 @@
         gclog_or_tty->print_cr(" +stop limit top=" PTR_FORMAT
                                ", new limit=" PTR_FORMAT
                                " (" SIZE_FORMAT "%%)",
-                               top, space->end(),
+                               p2i(top), p2i(space->end()),
                                percent_of_space(space, space->end()));
       }
       ConcurrentMarkSweepThread::stop_icms();
@@ -1501,7 +1503,7 @@
   if (PrintCMSInitiationStatistics && stats().valid()) {
     gclog_or_tty->print("CMSCollector shouldConcurrentCollect: ");
     gclog_or_tty->stamp();
-    gclog_or_tty->print_cr("");
+    gclog_or_tty->cr();
     stats().print_on(gclog_or_tty);
     gclog_or_tty->print_cr("time_until_cms_gen_full %3.7f",
       stats().time_until_cms_gen_full());
@@ -2496,7 +2498,8 @@
 }
 
 void CMSCollector::report_heap_summary(GCWhen::Type when) {
-  _gc_tracer_cm->report_gc_heap_summary(when, _last_heap_summary, _last_metaspace_summary);
+  _gc_tracer_cm->report_gc_heap_summary(when, _last_heap_summary);
+  _gc_tracer_cm->report_metaspace_summary(when, _last_metaspace_summary);
 }
 
 void CMSCollector::collect_in_foreground(bool clear_all_soft_refs, GCCause::Cause cause) {
@@ -3576,7 +3579,7 @@
                  _collector->cmsGen()->short_name(),
                  _phase, _collector->timerValue(), _wallclock.seconds());
     if (_print_cr) {
-      gclog_or_tty->print_cr("");
+      gclog_or_tty->cr();
     }
     if (PrintCMSStatistics != 0) {
       gclog_or_tty->print_cr(" (CMS-concurrent-%s yielded %d times)", _phase,
@@ -6362,7 +6365,9 @@
   verify_overflow_empty();
 
   if (should_unload_classes()) {
-    ClassLoaderDataGraph::purge();
+    // Delay purge to the beginning of the next safepoint.  Metaspace::contains
+    // requires that the virtual spaces are stable and not deleted.
+    ClassLoaderDataGraph::set_should_purge(true);
   }
 
   _intra_sweep_timer.stop();