< prev index next >

src/hotspot/share/services/virtualMemoryTracker.hpp

Print this page

        

*** 158,170 **** static inline void move_committed_memory(MEMFLAGS from, MEMFLAGS to, size_t size) { as_snapshot()->by_type(from)->uncommit_memory(size); as_snapshot()->by_type(to)->commit_memory(size); } ! static inline void snapshot(VirtualMemorySnapshot* s) { ! as_snapshot()->copy_to(s); ! } static VirtualMemorySnapshot* as_snapshot() { return (VirtualMemorySnapshot*)_snapshot; } --- 158,168 ---- static inline void move_committed_memory(MEMFLAGS from, MEMFLAGS to, size_t size) { as_snapshot()->by_type(from)->uncommit_memory(size); as_snapshot()->by_type(to)->commit_memory(size); } ! static void snapshot(VirtualMemorySnapshot* s); static VirtualMemorySnapshot* as_snapshot() { return (VirtualMemorySnapshot*)_snapshot; }
*** 334,343 **** --- 332,344 ---- inline bool equals(const ReservedMemoryRegion& rgn) const { return compare(rgn) == 0; } + // uncommitted thread stack bottom, above guard pages if there is any. + address thread_stack_uncommitted_bottom() const; + bool add_committed_region(address addr, size_t size, const NativeCallStack& stack); bool remove_uncommitted_region(address addr, size_t size); size_t committed_size() const;
*** 387,396 **** --- 388,398 ---- }; // Main class called from MemTracker to track virtual memory allocations, commits and releases. class VirtualMemoryTracker : AllStatic { friend class VirtualMemoryTrackerTest; + friend class ThreadStackTrackingTest; public: static bool initialize(NMT_TrackingLevel level); // Late phase initialization
*** 406,415 **** --- 408,420 ---- // Walk virtual memory data structure for creating baseline, etc. static bool walk_virtual_memory(VirtualMemoryWalker* walker); static bool transition(NMT_TrackingLevel from, NMT_TrackingLevel to); + // Snapshot current thread stacks + static void snapshot_thread_stacks(); + private: static SortedLinkedList<ReservedMemoryRegion, compare_reserved_region_base>* _reserved_regions; };
< prev index next >