src/hotspot/share/services/memReporter.cpp
changeset 53709 2b64ebacce93
parent 53685 df83034c9275
child 54292 c31faeacf00a
equal deleted inserted replaced
53708:c34acb3a3330 53709:2b64ebacce93
   702     malloc_site->count(), malloc_site->flag());
   702     malloc_site->count(), malloc_site->flag());
   703 }
   703 }
   704 
   704 
   705 void MemDetailDiffReporter::diff_malloc_site(const MallocSite* early,
   705 void MemDetailDiffReporter::diff_malloc_site(const MallocSite* early,
   706   const MallocSite* current)  const {
   706   const MallocSite* current)  const {
   707   assert(early->flag() == current->flag(), "Must be the same memory type");
   707   if (early->flag() != current->flag()) {
   708   diff_malloc_site(current->call_stack(), current->size(), current->count(),
   708     // If malloc site type changed, treat it as deallocation of old type and
   709     early->size(), early->count(), early->flag());
   709     // allocation of new type.
       
   710     old_malloc_site(early);
       
   711     new_malloc_site(current);
       
   712   } else {
       
   713     diff_malloc_site(current->call_stack(), current->size(), current->count(),
       
   714       early->size(), early->count(), early->flag());
       
   715   }
   710 }
   716 }
   711 
   717 
   712 void MemDetailDiffReporter::diff_malloc_site(const NativeCallStack* stack, size_t current_size,
   718 void MemDetailDiffReporter::diff_malloc_site(const NativeCallStack* stack, size_t current_size,
   713   size_t current_count, size_t early_size, size_t early_count, MEMFLAGS flags) const {
   719   size_t current_count, size_t early_size, size_t early_count, MEMFLAGS flags) const {
   714   outputStream* out = output();
   720   outputStream* out = output();