< prev index next >

src/hotspot/share/services/gcNotifier.cpp

Print this page
rev 56464 : 8231707: Improve Mutex inlining
Contributed-by: robbin.ehn@oracle.com, claes.redestad@oracle.com


  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 #include "precompiled.hpp"
  26 #include "classfile/systemDictionary.hpp"
  27 #include "classfile/vmSymbols.hpp"
  28 #include "oops/objArrayOop.inline.hpp"
  29 #include "oops/oop.inline.hpp"
  30 #include "runtime/handles.inline.hpp"
  31 #include "runtime/java.hpp"
  32 #include "runtime/javaCalls.hpp"
  33 #include "runtime/mutex.hpp"
  34 #include "runtime/mutexLocker.hpp"
  35 #include "services/gcNotifier.hpp"
  36 #include "services/management.hpp"
  37 #include "services/memoryService.hpp"
  38 #include "memoryManager.hpp"
  39 #include "memory/oopFactory.hpp"
  40 #include "memory/resourceArea.hpp"
  41 
  42 GCNotificationRequest *GCNotifier::first_request = NULL;
  43 GCNotificationRequest *GCNotifier::last_request = NULL;
  44 
  45 void GCNotifier::pushNotification(GCMemoryManager *mgr, const char *action, const char *cause) {
  46   // Make a copy of the last GC statistics
  47   // GC may occur between now and the creation of the notification
  48   int num_pools = MemoryService::num_memory_pools();
  49   // stat is deallocated inside GCNotificationRequest
  50   GCStatInfo* stat = new(ResourceObj::C_HEAP, mtGC) GCStatInfo(num_pools);
  51   mgr->get_last_gc_stat(stat);
  52   GCNotificationRequest *request = new GCNotificationRequest(os::javaTimeMillis(),mgr,action,cause,stat);
  53   addRequest(request);
  54  }




  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 #include "precompiled.hpp"
  26 #include "classfile/systemDictionary.hpp"
  27 #include "classfile/vmSymbols.hpp"
  28 #include "oops/objArrayOop.inline.hpp"
  29 #include "oops/oop.inline.hpp"
  30 #include "runtime/handles.inline.hpp"
  31 #include "runtime/java.hpp"
  32 #include "runtime/javaCalls.hpp"
  33 #include "runtime/mutex.hpp"
  34 #include "runtime/mutexLocker.inline.hpp"
  35 #include "services/gcNotifier.hpp"
  36 #include "services/management.hpp"
  37 #include "services/memoryService.hpp"
  38 #include "memoryManager.hpp"
  39 #include "memory/oopFactory.hpp"
  40 #include "memory/resourceArea.hpp"
  41 
  42 GCNotificationRequest *GCNotifier::first_request = NULL;
  43 GCNotificationRequest *GCNotifier::last_request = NULL;
  44 
  45 void GCNotifier::pushNotification(GCMemoryManager *mgr, const char *action, const char *cause) {
  46   // Make a copy of the last GC statistics
  47   // GC may occur between now and the creation of the notification
  48   int num_pools = MemoryService::num_memory_pools();
  49   // stat is deallocated inside GCNotificationRequest
  50   GCStatInfo* stat = new(ResourceObj::C_HEAP, mtGC) GCStatInfo(num_pools);
  51   mgr->get_last_gc_stat(stat);
  52   GCNotificationRequest *request = new GCNotificationRequest(os::javaTimeMillis(),mgr,action,cause,stat);
  53   addRequest(request);
  54  }


< prev index next >