src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp

changeset 7686
fb69749583e8
parent 7673
c04f46b4abe4
child 7781
33e421924c67
     1.1 --- a/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	Thu Apr 09 02:41:45 2015 +0000
     1.2 +++ b/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	Thu Apr 09 15:58:49 2015 +0200
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 2001, 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 @@ -353,7 +353,7 @@
    1.11    HeapRegion* lists[] = {_head,   _survivor_head};
    1.12    const char* names[] = {"YOUNG", "SURVIVOR"};
    1.13  
    1.14 -  for (unsigned int list = 0; list < ARRAY_SIZE(lists); ++list) {
    1.15 +  for (uint list = 0; list < ARRAY_SIZE(lists); ++list) {
    1.16      gclog_or_tty->print_cr("%s LIST CONTENTS", names[list]);
    1.17      HeapRegion *curr = lists[list];
    1.18      if (curr == NULL)
    1.19 @@ -827,8 +827,8 @@
    1.20    assert_heap_not_locked_and_not_at_safepoint();
    1.21    assert(!isHumongous(word_size), "we do not allow humongous TLABs");
    1.22  
    1.23 -  unsigned int dummy_gc_count_before;
    1.24 -  int dummy_gclocker_retry_count = 0;
    1.25 +  uint dummy_gc_count_before;
    1.26 +  uint dummy_gclocker_retry_count = 0;
    1.27    return attempt_allocation(word_size, &dummy_gc_count_before, &dummy_gclocker_retry_count);
    1.28  }
    1.29  
    1.30 @@ -838,8 +838,8 @@
    1.31    assert_heap_not_locked_and_not_at_safepoint();
    1.32  
    1.33    // Loop until the allocation is satisfied, or unsatisfied after GC.
    1.34 -  for (int try_count = 1, gclocker_retry_count = 0; /* we'll return */; try_count += 1) {
    1.35 -    unsigned int gc_count_before;
    1.36 +  for (uint try_count = 1, gclocker_retry_count = 0; /* we'll return */; try_count += 1) {
    1.37 +    uint gc_count_before;
    1.38  
    1.39      HeapWord* result = NULL;
    1.40      if (!isHumongous(word_size)) {
    1.41 @@ -891,8 +891,8 @@
    1.42  
    1.43  HeapWord* G1CollectedHeap::attempt_allocation_slow(size_t word_size,
    1.44                                                     AllocationContext_t context,
    1.45 -                                                   unsigned int *gc_count_before_ret,
    1.46 -                                                   int* gclocker_retry_count_ret) {
    1.47 +                                                   uint* gc_count_before_ret,
    1.48 +                                                   uint* gclocker_retry_count_ret) {
    1.49    // Make sure you read the note in attempt_allocation_humongous().
    1.50  
    1.51    assert_heap_not_locked_and_not_at_safepoint();
    1.52 @@ -909,7 +909,7 @@
    1.53    HeapWord* result = NULL;
    1.54    for (int try_count = 1; /* we'll return */; try_count += 1) {
    1.55      bool should_try_gc;
    1.56 -    unsigned int gc_count_before;
    1.57 +    uint gc_count_before;
    1.58  
    1.59      {
    1.60        MutexLockerEx x(Heap_lock);
    1.61 @@ -953,7 +953,7 @@
    1.62      if (should_try_gc) {
    1.63        bool succeeded;
    1.64        result = do_collection_pause(word_size, gc_count_before, &succeeded,
    1.65 -          GCCause::_g1_inc_collection_pause);
    1.66 +                                   GCCause::_g1_inc_collection_pause);
    1.67        if (result != NULL) {
    1.68          assert(succeeded, "only way to get back a non-NULL result");
    1.69          return result;
    1.70 @@ -1007,8 +1007,8 @@
    1.71  }
    1.72  
    1.73  HeapWord* G1CollectedHeap::attempt_allocation_humongous(size_t word_size,
    1.74 -                                                        unsigned int * gc_count_before_ret,
    1.75 -                                                        int* gclocker_retry_count_ret) {
    1.76 +                                                        uint* gc_count_before_ret,
    1.77 +                                                        uint* gclocker_retry_count_ret) {
    1.78    // The structure of this method has a lot of similarities to
    1.79    // attempt_allocation_slow(). The reason these two were not merged
    1.80    // into a single one is that such a method would require several "if
    1.81 @@ -1041,7 +1041,7 @@
    1.82    HeapWord* result = NULL;
    1.83    for (int try_count = 1; /* we'll return */; try_count += 1) {
    1.84      bool should_try_gc;
    1.85 -    unsigned int gc_count_before;
    1.86 +    uint gc_count_before;
    1.87  
    1.88      {
    1.89        MutexLockerEx x(Heap_lock);
    1.90 @@ -1079,7 +1079,7 @@
    1.91  
    1.92        bool succeeded;
    1.93        result = do_collection_pause(word_size, gc_count_before, &succeeded,
    1.94 -          GCCause::_g1_humongous_allocation);
    1.95 +                                   GCCause::_g1_humongous_allocation);
    1.96        if (result != NULL) {
    1.97          assert(succeeded, "only way to get back a non-NULL result");
    1.98          return result;
    1.99 @@ -1887,7 +1887,7 @@
   1.100    assert(n_rem_sets > 0, "Invariant.");
   1.101  
   1.102    _worker_cset_start_region = NEW_C_HEAP_ARRAY(HeapRegion*, n_queues, mtGC);
   1.103 -  _worker_cset_start_region_time_stamp = NEW_C_HEAP_ARRAY(unsigned int, n_queues, mtGC);
   1.104 +  _worker_cset_start_region_time_stamp = NEW_C_HEAP_ARRAY(uint, n_queues, mtGC);
   1.105    _evacuation_failed_info_array = NEW_C_HEAP_ARRAY(EvacuationFailedInfo, n_queues, mtGC);
   1.106  
   1.107    for (int i = 0; i < n_queues; i++) {
   1.108 @@ -2473,9 +2473,9 @@
   1.109  void G1CollectedHeap::collect(GCCause::Cause cause) {
   1.110    assert_heap_not_locked();
   1.111  
   1.112 -  unsigned int gc_count_before;
   1.113 -  unsigned int old_marking_count_before;
   1.114 -  unsigned int full_gc_count_before;
   1.115 +  uint gc_count_before;
   1.116 +  uint old_marking_count_before;
   1.117 +  uint full_gc_count_before;
   1.118    bool retry_gc;
   1.119  
   1.120    do {
   1.121 @@ -3613,7 +3613,7 @@
   1.122  }
   1.123  
   1.124  HeapWord* G1CollectedHeap::do_collection_pause(size_t word_size,
   1.125 -                                               unsigned int gc_count_before,
   1.126 +                                               uint gc_count_before,
   1.127                                                 bool* succeeded,
   1.128                                                 GCCause::Cause gc_cause) {
   1.129    assert_heap_not_locked_and_not_at_safepoint();

mercurial