25 #ifndef SHARE_VM_SERVICES_MEM_BASELINE_HPP
26 #define SHARE_VM_SERVICES_MEM_BASELINE_HPP
27
28 #if INCLUDE_NMT
29
30 #include "memory/allocation.hpp"
31 #include "runtime/mutex.hpp"
32 #include "services/mallocSiteTable.hpp"
33 #include "services/mallocTracker.hpp"
34 #include "services/nmtCommon.hpp"
35 #include "services/virtualMemoryTracker.hpp"
36 #include "utilities/linkedlist.hpp"
37
38 typedef LinkedListIterator<MallocSite> MallocSiteIterator;
39 typedef LinkedListIterator<VirtualMemoryAllocationSite> VirtualMemorySiteIterator;
40 typedef LinkedListIterator<ReservedMemoryRegion> VirtualMemoryAllocationIterator;
41
42 /*
43 * Baseline a memory snapshot
44 */
45 class MemBaseline VALUE_OBJ_CLASS_SPEC {
46 public:
47 enum BaselineThreshold {
48 SIZE_THRESHOLD = K // Only allocation size over this threshold will be baselined.
49 };
50
51 enum BaselineType {
52 Not_baselined,
53 Summary_baselined,
54 Detail_baselined
55 };
56
57 enum SortingOrder {
58 by_address, // by memory address
59 by_size, // by memory size
60 by_site, // by call site where the memory is allocated from
61 by_site_and_type // by call site and memory type
62 };
63
64 private:
65 // Summary information
|
25 #ifndef SHARE_VM_SERVICES_MEM_BASELINE_HPP
26 #define SHARE_VM_SERVICES_MEM_BASELINE_HPP
27
28 #if INCLUDE_NMT
29
30 #include "memory/allocation.hpp"
31 #include "runtime/mutex.hpp"
32 #include "services/mallocSiteTable.hpp"
33 #include "services/mallocTracker.hpp"
34 #include "services/nmtCommon.hpp"
35 #include "services/virtualMemoryTracker.hpp"
36 #include "utilities/linkedlist.hpp"
37
38 typedef LinkedListIterator<MallocSite> MallocSiteIterator;
39 typedef LinkedListIterator<VirtualMemoryAllocationSite> VirtualMemorySiteIterator;
40 typedef LinkedListIterator<ReservedMemoryRegion> VirtualMemoryAllocationIterator;
41
42 /*
43 * Baseline a memory snapshot
44 */
45 class MemBaseline {
46 public:
47 enum BaselineThreshold {
48 SIZE_THRESHOLD = K // Only allocation size over this threshold will be baselined.
49 };
50
51 enum BaselineType {
52 Not_baselined,
53 Summary_baselined,
54 Detail_baselined
55 };
56
57 enum SortingOrder {
58 by_address, // by memory address
59 by_size, // by memory size
60 by_site, // by call site where the memory is allocated from
61 by_site_and_type // by call site and memory type
62 };
63
64 private:
65 // Summary information
|