< prev index next >

src/hotspot/share/services/memBaseline.cpp

Print this page
rev 53982 : Thread stack tracking


 139   LinkedList<ReservedMemoryRegion>* virtual_memory_allocations() {
 140     return &_virtual_memory_regions;
 141   }
 142 };
 143 
 144 
 145 bool MemBaseline::baseline_summary() {
 146   MallocMemorySummary::snapshot(&_malloc_memory_snapshot);
 147   VirtualMemorySummary::snapshot(&_virtual_memory_snapshot);
 148   MetaspaceSnapshot::snapshot(_metaspace_snapshot);
 149   return true;
 150 }
 151 
 152 bool MemBaseline::baseline_allocation_sites() {
 153   // Malloc allocation sites
 154   MallocAllocationSiteWalker malloc_walker;
 155   if (!MallocSiteTable::walk_malloc_site(&malloc_walker)) {
 156     return false;
 157   }
 158 





 159   _malloc_sites.move(malloc_walker.malloc_sites());
 160   // The malloc sites are collected in size order
 161   _malloc_sites_order = by_size;
 162 
 163   // Virtual memory allocation sites
 164   VirtualMemoryAllocationWalker virtual_memory_walker;
 165   if (!VirtualMemoryTracker::walk_virtual_memory(&virtual_memory_walker)) {
 166     return false;
 167   }
 168 
 169   // Virtual memory allocations are collected in call stack order
 170   _virtual_memory_allocations.move(virtual_memory_walker.virtual_memory_allocations());
 171 
 172   if (!aggregate_virtual_memory_allocation_sites()) {
 173     return false;
 174   }
 175   // Virtual memory allocation sites are aggregrated in call stack order
 176   _virtual_memory_sites_order = by_address;
 177 
 178   return true;




 139   LinkedList<ReservedMemoryRegion>* virtual_memory_allocations() {
 140     return &_virtual_memory_regions;
 141   }
 142 };
 143 
 144 
 145 bool MemBaseline::baseline_summary() {
 146   MallocMemorySummary::snapshot(&_malloc_memory_snapshot);
 147   VirtualMemorySummary::snapshot(&_virtual_memory_snapshot);
 148   MetaspaceSnapshot::snapshot(_metaspace_snapshot);
 149   return true;
 150 }
 151 
 152 bool MemBaseline::baseline_allocation_sites() {
 153   // Malloc allocation sites
 154   MallocAllocationSiteWalker malloc_walker;
 155   if (!MallocSiteTable::walk_malloc_site(&malloc_walker)) {
 156     return false;
 157   }
 158 
 159   // Walk simple thread stacks
 160   if (!ThreadStackTracker::walk_simple_thread_stack_site(&malloc_walker)) {
 161     return false;
 162   }
 163 
 164   _malloc_sites.move(malloc_walker.malloc_sites());
 165   // The malloc sites are collected in size order
 166   _malloc_sites_order = by_size;
 167 
 168   // Virtual memory allocation sites
 169   VirtualMemoryAllocationWalker virtual_memory_walker;
 170   if (!VirtualMemoryTracker::walk_virtual_memory(&virtual_memory_walker)) {
 171     return false;
 172   }
 173 
 174   // Virtual memory allocations are collected in call stack order
 175   _virtual_memory_allocations.move(virtual_memory_walker.virtual_memory_allocations());
 176 
 177   if (!aggregate_virtual_memory_allocation_sites()) {
 178     return false;
 179   }
 180   // Virtual memory allocation sites are aggregrated in call stack order
 181   _virtual_memory_sites_order = by_address;
 182 
 183   return true;


< prev index next >