< prev index next >
src/hotspot/share/services/memoryManager.hpp
Print this page
rev 47957 : 8191564: Refactor GC related servicability code into GC specific subclasses
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2017, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
@@ -73,18 +73,10 @@
void oops_do(OopClosure* f);
// Static factory methods to get a memory manager of a specific type
static MemoryManager* get_code_cache_memory_manager();
static MemoryManager* get_metaspace_memory_manager();
- static GCMemoryManager* get_copy_memory_manager();
- static GCMemoryManager* get_msc_memory_manager();
- static GCMemoryManager* get_parnew_memory_manager();
- static GCMemoryManager* get_cms_memory_manager();
- static GCMemoryManager* get_psScavenge_memory_manager();
- static GCMemoryManager* get_psMarkSweep_memory_manager();
- static GCMemoryManager* get_g1YoungGen_memory_manager();
- static GCMemoryManager* get_g1OldGen_memory_manager();
};
class CodeCacheMemoryManager : public MemoryManager {
private:
public:
@@ -163,10 +155,12 @@
GCMemoryManager();
~GCMemoryManager();
void initialize_gc_stat_info();
+ virtual const char* gc_end_message() = 0;
+
bool is_gc_memory_manager() { return true; }
jlong gc_time_ms() { return _accumulated_timer.milliseconds(); }
size_t gc_count() { return _num_collections; }
int num_gc_threads() { return _num_gc_threads; }
void set_num_gc_threads(int count) { _num_gc_threads = count; }
@@ -184,73 +178,6 @@
void set_notification_enabled(bool enabled) { _notification_enabled = enabled; }
bool is_notification_enabled() { return _notification_enabled; }
};
-// These subclasses of GCMemoryManager are defined to include
-// GC-specific information.
-// TODO: Add GC-specific information
-class CopyMemoryManager : public GCMemoryManager {
-private:
-public:
- CopyMemoryManager() : GCMemoryManager() {}
-
- const char* name() { return "Copy"; }
-};
-
-class MSCMemoryManager : public GCMemoryManager {
-private:
-public:
- MSCMemoryManager() : GCMemoryManager() {}
-
- const char* name() { return "MarkSweepCompact"; }
-};
-
-class ParNewMemoryManager : public GCMemoryManager {
-private:
-public:
- ParNewMemoryManager() : GCMemoryManager() {}
-
- const char* name() { return "ParNew"; }
-};
-
-class CMSMemoryManager : public GCMemoryManager {
-private:
-public:
- CMSMemoryManager() : GCMemoryManager() {}
-
- const char* name() { return "ConcurrentMarkSweep";}
-};
-
-class PSScavengeMemoryManager : public GCMemoryManager {
-private:
-public:
- PSScavengeMemoryManager() : GCMemoryManager() {}
-
- const char* name() { return "PS Scavenge"; }
-};
-
-class PSMarkSweepMemoryManager : public GCMemoryManager {
-private:
-public:
- PSMarkSweepMemoryManager() : GCMemoryManager() {}
-
- const char* name() { return "PS MarkSweep"; }
-};
-
-class G1YoungGenMemoryManager : public GCMemoryManager {
-private:
-public:
- G1YoungGenMemoryManager() : GCMemoryManager() {}
-
- const char* name() { return "G1 Young Generation"; }
-};
-
-class G1OldGenMemoryManager : public GCMemoryManager {
-private:
-public:
- G1OldGenMemoryManager() : GCMemoryManager() {}
-
- const char* name() { return "G1 Old Generation"; }
-};
-
#endif // SHARE_VM_SERVICES_MEMORYMANAGER_HPP
< prev index next >