Thu, 09 Apr 2015 15:58:49 +0200
8072621: Clean up around VM_GC_Operations
Reviewed-by: brutisso, jmasa
1.1 --- a/src/share/vm/gc_implementation/concurrentMarkSweep/vmCMSOperations.hpp Thu Apr 09 02:41:45 2015 +0000 1.2 +++ b/src/share/vm/gc_implementation/concurrentMarkSweep/vmCMSOperations.hpp Thu Apr 09 15:58:49 2015 +0200 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -130,8 +130,8 @@ 1.11 class VM_GenCollectFullConcurrent: public VM_GC_Operation { 1.12 bool _disabled_icms; 1.13 public: 1.14 - VM_GenCollectFullConcurrent(unsigned int gc_count_before, 1.15 - unsigned int full_gc_count_before, 1.16 + VM_GenCollectFullConcurrent(uint gc_count_before, 1.17 + uint full_gc_count_before, 1.18 GCCause::Cause gc_cause) 1.19 : VM_GC_Operation(gc_count_before, gc_cause, full_gc_count_before, true /* full */), 1.20 _disabled_icms(false)
2.1 --- a/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Thu Apr 09 02:41:45 2015 +0000 2.2 +++ b/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Thu Apr 09 15:58:49 2015 +0200 2.3 @@ -1,5 +1,5 @@ 2.4 /* 2.5 - * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. 2.6 + * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved. 2.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 2.8 * 2.9 * This code is free software; you can redistribute it and/or modify it 2.10 @@ -353,7 +353,7 @@ 2.11 HeapRegion* lists[] = {_head, _survivor_head}; 2.12 const char* names[] = {"YOUNG", "SURVIVOR"}; 2.13 2.14 - for (unsigned int list = 0; list < ARRAY_SIZE(lists); ++list) { 2.15 + for (uint list = 0; list < ARRAY_SIZE(lists); ++list) { 2.16 gclog_or_tty->print_cr("%s LIST CONTENTS", names[list]); 2.17 HeapRegion *curr = lists[list]; 2.18 if (curr == NULL) 2.19 @@ -827,8 +827,8 @@ 2.20 assert_heap_not_locked_and_not_at_safepoint(); 2.21 assert(!isHumongous(word_size), "we do not allow humongous TLABs"); 2.22 2.23 - unsigned int dummy_gc_count_before; 2.24 - int dummy_gclocker_retry_count = 0; 2.25 + uint dummy_gc_count_before; 2.26 + uint dummy_gclocker_retry_count = 0; 2.27 return attempt_allocation(word_size, &dummy_gc_count_before, &dummy_gclocker_retry_count); 2.28 } 2.29 2.30 @@ -838,8 +838,8 @@ 2.31 assert_heap_not_locked_and_not_at_safepoint(); 2.32 2.33 // Loop until the allocation is satisfied, or unsatisfied after GC. 2.34 - for (int try_count = 1, gclocker_retry_count = 0; /* we'll return */; try_count += 1) { 2.35 - unsigned int gc_count_before; 2.36 + for (uint try_count = 1, gclocker_retry_count = 0; /* we'll return */; try_count += 1) { 2.37 + uint gc_count_before; 2.38 2.39 HeapWord* result = NULL; 2.40 if (!isHumongous(word_size)) { 2.41 @@ -891,8 +891,8 @@ 2.42 2.43 HeapWord* G1CollectedHeap::attempt_allocation_slow(size_t word_size, 2.44 AllocationContext_t context, 2.45 - unsigned int *gc_count_before_ret, 2.46 - int* gclocker_retry_count_ret) { 2.47 + uint* gc_count_before_ret, 2.48 + uint* gclocker_retry_count_ret) { 2.49 // Make sure you read the note in attempt_allocation_humongous(). 2.50 2.51 assert_heap_not_locked_and_not_at_safepoint(); 2.52 @@ -909,7 +909,7 @@ 2.53 HeapWord* result = NULL; 2.54 for (int try_count = 1; /* we'll return */; try_count += 1) { 2.55 bool should_try_gc; 2.56 - unsigned int gc_count_before; 2.57 + uint gc_count_before; 2.58 2.59 { 2.60 MutexLockerEx x(Heap_lock); 2.61 @@ -953,7 +953,7 @@ 2.62 if (should_try_gc) { 2.63 bool succeeded; 2.64 result = do_collection_pause(word_size, gc_count_before, &succeeded, 2.65 - GCCause::_g1_inc_collection_pause); 2.66 + GCCause::_g1_inc_collection_pause); 2.67 if (result != NULL) { 2.68 assert(succeeded, "only way to get back a non-NULL result"); 2.69 return result; 2.70 @@ -1007,8 +1007,8 @@ 2.71 } 2.72 2.73 HeapWord* G1CollectedHeap::attempt_allocation_humongous(size_t word_size, 2.74 - unsigned int * gc_count_before_ret, 2.75 - int* gclocker_retry_count_ret) { 2.76 + uint* gc_count_before_ret, 2.77 + uint* gclocker_retry_count_ret) { 2.78 // The structure of this method has a lot of similarities to 2.79 // attempt_allocation_slow(). The reason these two were not merged 2.80 // into a single one is that such a method would require several "if 2.81 @@ -1041,7 +1041,7 @@ 2.82 HeapWord* result = NULL; 2.83 for (int try_count = 1; /* we'll return */; try_count += 1) { 2.84 bool should_try_gc; 2.85 - unsigned int gc_count_before; 2.86 + uint gc_count_before; 2.87 2.88 { 2.89 MutexLockerEx x(Heap_lock); 2.90 @@ -1079,7 +1079,7 @@ 2.91 2.92 bool succeeded; 2.93 result = do_collection_pause(word_size, gc_count_before, &succeeded, 2.94 - GCCause::_g1_humongous_allocation); 2.95 + GCCause::_g1_humongous_allocation); 2.96 if (result != NULL) { 2.97 assert(succeeded, "only way to get back a non-NULL result"); 2.98 return result; 2.99 @@ -1887,7 +1887,7 @@ 2.100 assert(n_rem_sets > 0, "Invariant."); 2.101 2.102 _worker_cset_start_region = NEW_C_HEAP_ARRAY(HeapRegion*, n_queues, mtGC); 2.103 - _worker_cset_start_region_time_stamp = NEW_C_HEAP_ARRAY(unsigned int, n_queues, mtGC); 2.104 + _worker_cset_start_region_time_stamp = NEW_C_HEAP_ARRAY(uint, n_queues, mtGC); 2.105 _evacuation_failed_info_array = NEW_C_HEAP_ARRAY(EvacuationFailedInfo, n_queues, mtGC); 2.106 2.107 for (int i = 0; i < n_queues; i++) { 2.108 @@ -2473,9 +2473,9 @@ 2.109 void G1CollectedHeap::collect(GCCause::Cause cause) { 2.110 assert_heap_not_locked(); 2.111 2.112 - unsigned int gc_count_before; 2.113 - unsigned int old_marking_count_before; 2.114 - unsigned int full_gc_count_before; 2.115 + uint gc_count_before; 2.116 + uint old_marking_count_before; 2.117 + uint full_gc_count_before; 2.118 bool retry_gc; 2.119 2.120 do { 2.121 @@ -3613,7 +3613,7 @@ 2.122 } 2.123 2.124 HeapWord* G1CollectedHeap::do_collection_pause(size_t word_size, 2.125 - unsigned int gc_count_before, 2.126 + uint gc_count_before, 2.127 bool* succeeded, 2.128 GCCause::Cause gc_cause) { 2.129 assert_heap_not_locked_and_not_at_safepoint();
3.1 --- a/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp Thu Apr 09 02:41:45 2015 +0000 3.2 +++ b/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp Thu Apr 09 15:58:49 2015 +0200 3.3 @@ -1,5 +1,5 @@ 3.4 /* 3.5 - * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. 3.6 + * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved. 3.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3.8 * 3.9 * This code is free software; you can redistribute it and/or modify it 3.10 @@ -343,11 +343,11 @@ 3.11 3.12 // Keeps track of how many "old marking cycles" (i.e., Full GCs or 3.13 // concurrent cycles) we have started. 3.14 - volatile unsigned int _old_marking_cycles_started; 3.15 + volatile uint _old_marking_cycles_started; 3.16 3.17 // Keeps track of how many "old marking cycles" (i.e., Full GCs or 3.18 // concurrent cycles) we have completed. 3.19 - volatile unsigned int _old_marking_cycles_completed; 3.20 + volatile uint _old_marking_cycles_completed; 3.21 3.22 bool _concurrent_cycle_started; 3.23 bool _heap_summary_sent; 3.24 @@ -515,22 +515,22 @@ 3.25 // the mutator alloc region without taking the Heap_lock. This 3.26 // should only be used for non-humongous allocations. 3.27 inline HeapWord* attempt_allocation(size_t word_size, 3.28 - unsigned int* gc_count_before_ret, 3.29 - int* gclocker_retry_count_ret); 3.30 + uint* gc_count_before_ret, 3.31 + uint* gclocker_retry_count_ret); 3.32 3.33 // Second-level mutator allocation attempt: take the Heap_lock and 3.34 // retry the allocation attempt, potentially scheduling a GC 3.35 // pause. This should only be used for non-humongous allocations. 3.36 HeapWord* attempt_allocation_slow(size_t word_size, 3.37 AllocationContext_t context, 3.38 - unsigned int* gc_count_before_ret, 3.39 - int* gclocker_retry_count_ret); 3.40 + uint* gc_count_before_ret, 3.41 + uint* gclocker_retry_count_ret); 3.42 3.43 // Takes the Heap_lock and attempts a humongous allocation. It can 3.44 // potentially schedule a GC pause. 3.45 HeapWord* attempt_allocation_humongous(size_t word_size, 3.46 - unsigned int* gc_count_before_ret, 3.47 - int* gclocker_retry_count_ret); 3.48 + uint* gc_count_before_ret, 3.49 + uint* gclocker_retry_count_ret); 3.50 3.51 // Allocation attempt that should be called during safepoints (e.g., 3.52 // at the end of a successful GC). expect_null_mutator_alloc_region 3.53 @@ -701,7 +701,7 @@ 3.54 // +ExplicitGCInvokesConcurrent). 3.55 void increment_old_marking_cycles_completed(bool concurrent); 3.56 3.57 - unsigned int old_marking_cycles_completed() { 3.58 + uint old_marking_cycles_completed() { 3.59 return _old_marking_cycles_completed; 3.60 } 3.61 3.62 @@ -760,7 +760,7 @@ 3.63 // methods that call do_collection_pause() release the Heap_lock 3.64 // before the call, so it's easy to read gc_count_before just before. 3.65 HeapWord* do_collection_pause(size_t word_size, 3.66 - unsigned int gc_count_before, 3.67 + uint gc_count_before, 3.68 bool* succeeded, 3.69 GCCause::Cause gc_cause); 3.70 3.71 @@ -983,7 +983,7 @@ 3.72 // The heap region entry for a given worker is valid iff 3.73 // the associated time stamp value matches the current value 3.74 // of G1CollectedHeap::_gc_time_stamp. 3.75 - unsigned int* _worker_cset_start_region_time_stamp; 3.76 + uint* _worker_cset_start_region_time_stamp; 3.77 3.78 volatile bool _free_regions_coming; 3.79
4.1 --- a/src/share/vm/gc_implementation/g1/g1CollectedHeap.inline.hpp Thu Apr 09 02:41:45 2015 +0000 4.2 +++ b/src/share/vm/gc_implementation/g1/g1CollectedHeap.inline.hpp Thu Apr 09 15:58:49 2015 +0200 4.3 @@ -1,5 +1,5 @@ 4.4 /* 4.5 - * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. 4.6 + * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved. 4.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4.8 * 4.9 * This code is free software; you can redistribute it and/or modify it 4.10 @@ -131,8 +131,8 @@ 4.11 } 4.12 4.13 inline HeapWord* G1CollectedHeap::attempt_allocation(size_t word_size, 4.14 - unsigned int* gc_count_before_ret, 4.15 - int* gclocker_retry_count_ret) { 4.16 + uint* gc_count_before_ret, 4.17 + uint* gclocker_retry_count_ret) { 4.18 assert_heap_not_locked_and_not_at_safepoint(); 4.19 assert(!isHumongous(word_size), "attempt_allocation() should not " 4.20 "be called for humongous allocation requests");
5.1 --- a/src/share/vm/gc_implementation/g1/vm_operations_g1.cpp Thu Apr 09 02:41:45 2015 +0000 5.2 +++ b/src/share/vm/gc_implementation/g1/vm_operations_g1.cpp Thu Apr 09 15:58:49 2015 +0200 5.3 @@ -1,5 +1,5 @@ 5.4 /* 5.5 - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. 5.6 + * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved. 5.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 5.8 * 5.9 * This code is free software; you can redistribute it and/or modify it 5.10 @@ -34,9 +34,8 @@ 5.11 #include "gc_implementation/g1/vm_operations_g1.hpp" 5.12 #include "runtime/interfaceSupport.hpp" 5.13 5.14 -VM_G1CollectForAllocation::VM_G1CollectForAllocation( 5.15 - unsigned int gc_count_before, 5.16 - size_t word_size) 5.17 +VM_G1CollectForAllocation::VM_G1CollectForAllocation(uint gc_count_before, 5.18 + size_t word_size) 5.19 : VM_G1OperationWithAllocRequest(gc_count_before, word_size, 5.20 GCCause::_allocation_failure) { 5.21 guarantee(word_size > 0, "an allocation should always be requested"); 5.22 @@ -57,12 +56,11 @@ 5.23 g1h->do_full_collection(false /* clear_all_soft_refs */); 5.24 } 5.25 5.26 -VM_G1IncCollectionPause::VM_G1IncCollectionPause( 5.27 - unsigned int gc_count_before, 5.28 - size_t word_size, 5.29 - bool should_initiate_conc_mark, 5.30 - double target_pause_time_ms, 5.31 - GCCause::Cause gc_cause) 5.32 +VM_G1IncCollectionPause::VM_G1IncCollectionPause(uint gc_count_before, 5.33 + size_t word_size, 5.34 + bool should_initiate_conc_mark, 5.35 + double target_pause_time_ms, 5.36 + GCCause::Cause gc_cause) 5.37 : VM_G1OperationWithAllocRequest(gc_count_before, word_size, gc_cause), 5.38 _should_initiate_conc_mark(should_initiate_conc_mark), 5.39 _target_pause_time_ms(target_pause_time_ms),
6.1 --- a/src/share/vm/gc_implementation/g1/vm_operations_g1.hpp Thu Apr 09 02:41:45 2015 +0000 6.2 +++ b/src/share/vm/gc_implementation/g1/vm_operations_g1.hpp Thu Apr 09 15:58:49 2015 +0200 6.3 @@ -1,5 +1,5 @@ 6.4 /* 6.5 - * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved. 6.6 + * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved. 6.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 6.8 * 6.9 * This code is free software; you can redistribute it and/or modify it 6.10 @@ -44,8 +44,8 @@ 6.11 AllocationContext_t _allocation_context; 6.12 6.13 public: 6.14 - VM_G1OperationWithAllocRequest(unsigned int gc_count_before, 6.15 - size_t word_size, 6.16 + VM_G1OperationWithAllocRequest(uint gc_count_before, 6.17 + size_t word_size, 6.18 GCCause::Cause gc_cause) 6.19 : VM_GC_Operation(gc_count_before, gc_cause), 6.20 _word_size(word_size), _result(NULL), _pause_succeeded(false) { } 6.21 @@ -57,8 +57,8 @@ 6.22 6.23 class VM_G1CollectFull: public VM_GC_Operation { 6.24 public: 6.25 - VM_G1CollectFull(unsigned int gc_count_before, 6.26 - unsigned int full_gc_count_before, 6.27 + VM_G1CollectFull(uint gc_count_before, 6.28 + uint full_gc_count_before, 6.29 GCCause::Cause cause) 6.30 : VM_GC_Operation(gc_count_before, cause, full_gc_count_before, true) { } 6.31 virtual VMOp_Type type() const { return VMOp_G1CollectFull; } 6.32 @@ -70,7 +70,7 @@ 6.33 6.34 class VM_G1CollectForAllocation: public VM_G1OperationWithAllocRequest { 6.35 public: 6.36 - VM_G1CollectForAllocation(unsigned int gc_count_before, 6.37 + VM_G1CollectForAllocation(uint gc_count_before, 6.38 size_t word_size); 6.39 virtual VMOp_Type type() const { return VMOp_G1CollectForAllocation; } 6.40 virtual void doit(); 6.41 @@ -84,9 +84,9 @@ 6.42 bool _should_initiate_conc_mark; 6.43 bool _should_retry_gc; 6.44 double _target_pause_time_ms; 6.45 - unsigned int _old_marking_cycles_completed_before; 6.46 + uint _old_marking_cycles_completed_before; 6.47 public: 6.48 - VM_G1IncCollectionPause(unsigned int gc_count_before, 6.49 + VM_G1IncCollectionPause(uint gc_count_before, 6.50 size_t word_size, 6.51 bool should_initiate_conc_mark, 6.52 double target_pause_time_ms,
7.1 --- a/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.cpp Thu Apr 09 02:41:45 2015 +0000 7.2 +++ b/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.cpp Thu Apr 09 15:58:49 2015 +0200 7.3 @@ -1,5 +1,5 @@ 7.4 /* 7.5 - * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. 7.6 + * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved. 7.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 7.8 * 7.9 * This code is free software; you can redistribute it and/or modify it 7.10 @@ -261,7 +261,7 @@ 7.11 7.12 uint loop_count = 0; 7.13 uint gc_count = 0; 7.14 - int gclocker_stalled_count = 0; 7.15 + uint gclocker_stalled_count = 0; 7.16 7.17 while (result == NULL) { 7.18 // We don't want to have multiple collections for a single filled generation. 7.19 @@ -521,8 +521,8 @@ 7.20 assert(!Heap_lock->owned_by_self(), 7.21 "this thread should not own the Heap_lock"); 7.22 7.23 - unsigned int gc_count = 0; 7.24 - unsigned int full_gc_count = 0; 7.25 + uint gc_count = 0; 7.26 + uint full_gc_count = 0; 7.27 { 7.28 MutexLocker ml(Heap_lock); 7.29 // This value is guarded by the Heap_lock
8.1 --- a/src/share/vm/gc_implementation/parallelScavenge/vmPSOperations.cpp Thu Apr 09 02:41:45 2015 +0000 8.2 +++ b/src/share/vm/gc_implementation/parallelScavenge/vmPSOperations.cpp Thu Apr 09 15:58:49 2015 +0200 8.3 @@ -1,5 +1,5 @@ 8.4 /* 8.5 - * Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved. 8.6 + * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved. 8.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 8.8 * 8.9 * This code is free software; you can redistribute it and/or modify it 8.10 @@ -33,7 +33,7 @@ 8.11 8.12 // The following methods are used by the parallel scavenge collector 8.13 VM_ParallelGCFailedAllocation::VM_ParallelGCFailedAllocation(size_t size, 8.14 - unsigned int gc_count) : 8.15 + uint gc_count) : 8.16 VM_GC_Operation(gc_count, GCCause::_allocation_failure), 8.17 _size(size), 8.18 _result(NULL) 8.19 @@ -55,8 +55,8 @@ 8.20 } 8.21 8.22 // Only used for System.gc() calls 8.23 -VM_ParallelGCSystemGC::VM_ParallelGCSystemGC(unsigned int gc_count, 8.24 - unsigned int full_gc_count, 8.25 +VM_ParallelGCSystemGC::VM_ParallelGCSystemGC(uint gc_count, 8.26 + uint full_gc_count, 8.27 GCCause::Cause gc_cause) : 8.28 VM_GC_Operation(gc_count, gc_cause, full_gc_count, true /* full */) 8.29 {
9.1 --- a/src/share/vm/gc_implementation/parallelScavenge/vmPSOperations.hpp Thu Apr 09 02:41:45 2015 +0000 9.2 +++ b/src/share/vm/gc_implementation/parallelScavenge/vmPSOperations.hpp Thu Apr 09 15:58:49 2015 +0200 9.3 @@ -1,5 +1,5 @@ 9.4 /* 9.5 - * Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved. 9.6 + * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved. 9.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 9.8 * 9.9 * This code is free software; you can redistribute it and/or modify it 9.10 @@ -35,7 +35,7 @@ 9.11 HeapWord* _result; 9.12 9.13 public: 9.14 - VM_ParallelGCFailedAllocation(size_t size, unsigned int gc_count); 9.15 + VM_ParallelGCFailedAllocation(size_t size, uint gc_count); 9.16 9.17 virtual VMOp_Type type() const { 9.18 return VMOp_ParallelGCFailedAllocation; 9.19 @@ -47,8 +47,7 @@ 9.20 9.21 class VM_ParallelGCSystemGC: public VM_GC_Operation { 9.22 public: 9.23 - VM_ParallelGCSystemGC(unsigned int gc_count, unsigned int full_gc_count, 9.24 - GCCause::Cause gc_cause); 9.25 + VM_ParallelGCSystemGC(uint gc_count, uint full_gc_count, GCCause::Cause gc_cause); 9.26 virtual VMOp_Type type() const { return VMOp_ParallelGCSystemGC; } 9.27 virtual void doit(); 9.28 };
10.1 --- a/src/share/vm/gc_implementation/shared/vmGCOperations.hpp Thu Apr 09 02:41:45 2015 +0000 10.2 +++ b/src/share/vm/gc_implementation/shared/vmGCOperations.hpp Thu Apr 09 15:58:49 2015 +0200 10.3 @@ -1,5 +1,5 @@ 10.4 /* 10.5 - * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. 10.6 + * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. 10.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 10.8 * 10.9 * This code is free software; you can redistribute it and/or modify it 10.10 @@ -66,13 +66,13 @@ 10.11 10.12 class VM_GC_Operation: public VM_Operation { 10.13 protected: 10.14 - BasicLock _pending_list_basic_lock; // for refs pending list notification (PLL) 10.15 - unsigned int _gc_count_before; // gc count before acquiring PLL 10.16 - unsigned int _full_gc_count_before; // full gc count before acquiring PLL 10.17 - bool _full; // whether a "full" collection 10.18 - bool _prologue_succeeded; // whether doit_prologue succeeded 10.19 + BasicLock _pending_list_basic_lock; // for refs pending list notification (PLL) 10.20 + uint _gc_count_before; // gc count before acquiring PLL 10.21 + uint _full_gc_count_before; // full gc count before acquiring PLL 10.22 + bool _full; // whether a "full" collection 10.23 + bool _prologue_succeeded; // whether doit_prologue succeeded 10.24 GCCause::Cause _gc_cause; // the putative cause for this gc op 10.25 - bool _gc_locked; // will be set if gc was locked 10.26 + bool _gc_locked; // will be set if gc was locked 10.27 10.28 virtual bool skip_operation() const; 10.29 10.30 @@ -81,9 +81,9 @@ 10.31 void release_and_notify_pending_list_lock(); 10.32 10.33 public: 10.34 - VM_GC_Operation(unsigned int gc_count_before, 10.35 + VM_GC_Operation(uint gc_count_before, 10.36 GCCause::Cause _cause, 10.37 - unsigned int full_gc_count_before = 0, 10.38 + uint full_gc_count_before = 0, 10.39 bool full = false) { 10.40 _full = full; 10.41 _prologue_succeeded = false; 10.42 @@ -169,7 +169,7 @@ 10.43 public: 10.44 VM_GenCollectForAllocation(size_t size, 10.45 bool tlab, 10.46 - unsigned int gc_count_before) 10.47 + uint gc_count_before) 10.48 : VM_GC_Operation(gc_count_before, GCCause::_allocation_failure), 10.49 _size(size), 10.50 _tlab(tlab) { 10.51 @@ -181,17 +181,16 @@ 10.52 HeapWord* result() const { return _res; } 10.53 }; 10.54 10.55 - 10.56 // VM operation to invoke a collection of the heap as a 10.57 // GenCollectedHeap heap. 10.58 class VM_GenCollectFull: public VM_GC_Operation { 10.59 private: 10.60 int _max_level; 10.61 public: 10.62 - VM_GenCollectFull(unsigned int gc_count_before, 10.63 - unsigned int full_gc_count_before, 10.64 + VM_GenCollectFull(uint gc_count_before, 10.65 + uint full_gc_count_before, 10.66 GCCause::Cause gc_cause, 10.67 - int max_level) 10.68 + int max_level) 10.69 : VM_GC_Operation(gc_count_before, gc_cause, full_gc_count_before, true /* full */), 10.70 _max_level(max_level) { } 10.71 ~VM_GenCollectFull() {} 10.72 @@ -208,9 +207,9 @@ 10.73 public: 10.74 VM_CollectForMetadataAllocation(ClassLoaderData* loader_data, 10.75 size_t size, Metaspace::MetadataType mdtype, 10.76 - unsigned int gc_count_before, 10.77 - unsigned int full_gc_count_before, 10.78 - GCCause::Cause gc_cause) 10.79 + uint gc_count_before, 10.80 + uint full_gc_count_before, 10.81 + GCCause::Cause gc_cause) 10.82 : VM_GC_Operation(gc_count_before, gc_cause, full_gc_count_before, true), 10.83 _loader_data(loader_data), _size(size), _mdtype(mdtype), _result(NULL) { 10.84 }
11.1 --- a/src/share/vm/memory/collectorPolicy.cpp Thu Apr 09 02:41:45 2015 +0000 11.2 +++ b/src/share/vm/memory/collectorPolicy.cpp Thu Apr 09 15:58:49 2015 +0200 11.3 @@ -1,5 +1,5 @@ 11.4 /* 11.5 - * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. 11.6 + * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved. 11.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 11.8 * 11.9 * This code is free software; you can redistribute it and/or modify it 11.10 @@ -656,7 +656,7 @@ 11.11 11.12 // Loop until the allocation is satisified, 11.13 // or unsatisfied after GC. 11.14 - for (int try_count = 1, gclocker_stalled_count = 0; /* return or throw */; try_count += 1) { 11.15 + for (uint try_count = 1, gclocker_stalled_count = 0; /* return or throw */; try_count += 1) { 11.16 HandleMark hm; // discard any handles allocated in each iteration 11.17 11.18 // First allocation attempt is lock-free. 11.19 @@ -670,7 +670,7 @@ 11.20 return result; 11.21 } 11.22 } 11.23 - unsigned int gc_count_before; // read inside the Heap_lock locked region 11.24 + uint gc_count_before; // read inside the Heap_lock locked region 11.25 { 11.26 MutexLocker ml(Heap_lock); 11.27 if (PrintGC && Verbose) {
12.1 --- a/src/share/vm/runtime/globals.hpp Thu Apr 09 02:41:45 2015 +0000 12.2 +++ b/src/share/vm/runtime/globals.hpp Thu Apr 09 15:58:49 2015 +0200 12.3 @@ -1494,7 +1494,7 @@ 12.4 "How much the GC can expand the eden by while the GC locker " \ 12.5 "is active (as a percentage)") \ 12.6 \ 12.7 - diagnostic(intx, GCLockerRetryAllocationCount, 2, \ 12.8 + diagnostic(uintx, GCLockerRetryAllocationCount, 2, \ 12.9 "Number of times to retry allocations when " \ 12.10 "blocked by the GC locker") \ 12.11 \