< prev index next >

src/share/vm/services/mallocSiteTable.hpp

Print this page
rev 9024 : 8218558: NMT stack traces in output should show mt component for virtual memory allocations
Reviewed-by: shade, stuefe, coleenp

*** 35,63 **** #include "utilities/nativeCallStack.hpp" // MallocSite represents a code path that eventually calls // os::malloc() to allocate memory class MallocSite : public AllocationSite<MemoryCounter> { - private: - MEMFLAGS _flags; - public: MallocSite() : ! AllocationSite<MemoryCounter>(NativeCallStack::empty_stack()), _flags(mtNone) {} MallocSite(const NativeCallStack& stack, MEMFLAGS flags) : ! AllocationSite<MemoryCounter>(stack), _flags(flags) {} void allocate(size_t size) { data()->allocate(size); } void deallocate(size_t size) { data()->deallocate(size); } // Memory allocated from this code path size_t size() const { return peek()->size(); } // The number of calls were made size_t count() const { return peek()->count(); } - MEMFLAGS flags() const { return (MEMFLAGS)_flags; } }; // Malloc site hashtable entry class MallocSiteHashtableEntry : public CHeapObj<mtNMT> { private: --- 35,59 ---- #include "utilities/nativeCallStack.hpp" // MallocSite represents a code path that eventually calls // os::malloc() to allocate memory class MallocSite : public AllocationSite<MemoryCounter> { public: MallocSite() : ! AllocationSite<MemoryCounter>(NativeCallStack::empty_stack(), mtNone) {} MallocSite(const NativeCallStack& stack, MEMFLAGS flags) : ! AllocationSite<MemoryCounter>(stack, flags) {} void allocate(size_t size) { data()->allocate(size); } void deallocate(size_t size) { data()->deallocate(size); } // Memory allocated from this code path size_t size() const { return peek()->size(); } // The number of calls were made size_t count() const { return peek()->count(); } }; // Malloc site hashtable entry class MallocSiteHashtableEntry : public CHeapObj<mtNMT> { private:
< prev index next >