hotspot/src/share/vm/memory/collectorPolicy.cpp
changeset 24424 2658d7834c6e
parent 24353 148147d21135
child 24940 c2b4c8e32c2f
equal deleted inserted replaced
24358:8528b67f6562 24424:2658d7834c6e
     1 /*
     1 /*
     2  * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2001, 2014, 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.
   734 
   734 
   735     // Give a warning if we seem to be looping forever.
   735     // Give a warning if we seem to be looping forever.
   736     if ((QueuedAllocationWarningCount > 0) &&
   736     if ((QueuedAllocationWarningCount > 0) &&
   737         (try_count % QueuedAllocationWarningCount == 0)) {
   737         (try_count % QueuedAllocationWarningCount == 0)) {
   738           warning("TwoGenerationCollectorPolicy::mem_allocate_work retries %d times \n\t"
   738           warning("TwoGenerationCollectorPolicy::mem_allocate_work retries %d times \n\t"
   739                   " size=%d %s", try_count, size, is_tlab ? "(TLAB)" : "");
   739                   " size=" SIZE_FORMAT " %s", try_count, size, is_tlab ? "(TLAB)" : "");
   740     }
   740     }
   741   }
   741   }
   742 }
   742 }
   743 
   743 
   744 HeapWord* GenCollectorPolicy::expand_heap_and_allocate(size_t size,
   744 HeapWord* GenCollectorPolicy::expand_heap_and_allocate(size_t size,
   901     }
   901     }
   902     loop_count++;
   902     loop_count++;
   903     if ((QueuedAllocationWarningCount > 0) &&
   903     if ((QueuedAllocationWarningCount > 0) &&
   904         (loop_count % QueuedAllocationWarningCount == 0)) {
   904         (loop_count % QueuedAllocationWarningCount == 0)) {
   905       warning("satisfy_failed_metadata_allocation() retries %d times \n\t"
   905       warning("satisfy_failed_metadata_allocation() retries %d times \n\t"
   906               " size=%d", loop_count, word_size);
   906               " size=" SIZE_FORMAT, loop_count, word_size);
   907     }
   907     }
   908   } while (true);  // Until a GC is done
   908   } while (true);  // Until a GC is done
   909 }
   909 }
   910 
   910 
   911 // Return true if any of the following is true:
   911 // Return true if any of the following is true: