< prev index next >

src/hotspot/share/gc/g1/g1NUMA.hpp

Print this page
rev 56821 : imported patch 8220310.mut.0
rev 56822 : imported patch 8220310.mut.1
rev 56823 : imported patch 8220310.mut.2
rev 56824 : imported patch 8220310.mut.3
rev 56825 : imported patch 8220310.mut.4
rev 56826 : imported patch 8220310.mut.5
rev 56834 : imported patch 8220312.stat.2
rev 56835 : imported patch 8220312.stat.3
rev 56836 : imported patch 8220312.stat.4
rev 56837 : imported patch 8220312.stat.4-move_pages
rev 56838 : [mq]: 8220312.stat.5
rev 56839 : [mq]: 8220312.stat.6

*** 23,36 **** */ #ifndef SHARE_VM_GC_G1_NUMA_HPP #define SHARE_VM_GC_G1_NUMA_HPP #include "memory/allocation.hpp" #include "runtime/os.hpp" ! class HeapRegion; class G1NUMA: public CHeapObj<mtGC> { // Mapping of available node ids to 0-based index which can be used for // fast resource management. I.e. for every node id provides a unique value in // the range from [0, {# of nodes-1}]. --- 23,38 ---- */ #ifndef SHARE_VM_GC_G1_NUMA_HPP #define SHARE_VM_GC_G1_NUMA_HPP + #include "gc/g1/g1NUMAStats.hpp" + #include "gc/g1/heapRegion.hpp" #include "memory/allocation.hpp" #include "runtime/os.hpp" ! class LogStream; class G1NUMA: public CHeapObj<mtGC> { // Mapping of available node ids to 0-based index which can be used for // fast resource management. I.e. for every node id provides a unique value in // the range from [0, {# of nodes-1}].
*** 47,56 **** --- 49,61 ---- // HeapRegion size size_t _region_size; // Necessary when touching memory. size_t _page_size; + // Stores statistic data. + G1NUMAStats* _stats; + size_t region_size() const; size_t page_size() const; // Returns node index of the given node id. // Precondition: node_id is an active node id.
*** 111,118 **** --- 116,152 ---- void request_memory_on_node(void* aligned_address, size_t size_in_bytes, uint region_index); // Returns maximum search depth which is used to limit heap region search iterations. // The number of active nodes, page size and heap region size are considered. uint max_search_depth() const; + + // Update the given phase of requested and allocated node index. + void update_statistics(G1NUMAStats::NodeDataItems phase, uint requested_node_index, uint allocated_node_index); + + // Copy all allocated statistics of the given phase and requested node. + // Precondition: allocated_stat should have same length of active nodes. + void copy_statistics(G1NUMAStats::NodeDataItems phase, uint requested_node_index, size_t* allocated_stat); + + // Print all statistics. + void print_statistics() const; + }; + + class G1NodeIndexCheckClosure : public HeapRegionClosure { + const char* _desc; + G1NUMA* _numa; + // Records matched count of each node. + uint* _matched; + // Records mismatched count of each node. + uint* _mismatched; + // Records total count of each node. + // Total = matched + mismatched + unknown. + uint* _total; + LogStream* _ls; + + public: + G1NodeIndexCheckClosure(const char* desc, G1NUMA* numa, LogStream* ls); + ~G1NodeIndexCheckClosure(); + + bool do_heap_region(HeapRegion* hr); }; #endif // SHARE_VM_GC_G1_NUMA_HPP
< prev index next >