src/hotspot/share/services/memBaseline.cpp
changeset 53685 df83034c9275
parent 51959 db0c3952de52
child 54292 c31faeacf00a
equal deleted inserted replaced
53684:3f054fd85646 53685:df83034c9275
     1 /*
     1 /*
     2  * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    62 
    62 
    63 // Sort into allocation site addresses and memory type order for baseline comparison
    63 // Sort into allocation site addresses and memory type order for baseline comparison
    64 int compare_malloc_site_and_type(const MallocSite& s1, const MallocSite& s2) {
    64 int compare_malloc_site_and_type(const MallocSite& s1, const MallocSite& s2) {
    65   int res = compare_malloc_site(s1, s2);
    65   int res = compare_malloc_site(s1, s2);
    66   if (res == 0) {
    66   if (res == 0) {
    67     res = (int)(s1.flags() - s2.flags());
    67     res = (int)(s1.flag() - s2.flag());
    68   }
    68   }
    69 
    69 
    70   return res;
    70   return res;
    71 }
    71 }
    72 
    72 
   210 
   210 
   211   VirtualMemoryAllocationIterator itr = virtual_memory_allocations();
   211   VirtualMemoryAllocationIterator itr = virtual_memory_allocations();
   212   const ReservedMemoryRegion* rgn;
   212   const ReservedMemoryRegion* rgn;
   213   VirtualMemoryAllocationSite* site;
   213   VirtualMemoryAllocationSite* site;
   214   while ((rgn = itr.next()) != NULL) {
   214   while ((rgn = itr.next()) != NULL) {
   215     VirtualMemoryAllocationSite tmp(*rgn->call_stack());
   215     VirtualMemoryAllocationSite tmp(*rgn->call_stack(), rgn->flag());
   216     site = allocation_sites.find(tmp);
   216     site = allocation_sites.find(tmp);
   217     if (site == NULL) {
   217     if (site == NULL) {
   218       LinkedListNode<VirtualMemoryAllocationSite>* node =
   218       LinkedListNode<VirtualMemoryAllocationSite>* node =
   219         allocation_sites.add(tmp);
   219         allocation_sites.add(tmp);
   220       if (node == NULL) return false;
   220       if (node == NULL) return false;