hotspot/src/share/vm/gc/shared/taskqueue.cpp
changeset 33105 294e48b4f704
parent 32606 fdaa30d06ada
child 35061 be6025ebffea
equal deleted inserted replaced
33104:a7c0f60a1294 33105:294e48b4f704
    90 // Invariants which should hold after a TaskQueue has been emptied and is
    90 // Invariants which should hold after a TaskQueue has been emptied and is
    91 // quiescent; they do not hold at arbitrary times.
    91 // quiescent; they do not hold at arbitrary times.
    92 void TaskQueueStats::verify() const
    92 void TaskQueueStats::verify() const
    93 {
    93 {
    94   assert(get(push) == get(pop) + get(steal),
    94   assert(get(push) == get(pop) + get(steal),
    95          err_msg("push=" SIZE_FORMAT " pop=" SIZE_FORMAT " steal=" SIZE_FORMAT,
    95          "push=" SIZE_FORMAT " pop=" SIZE_FORMAT " steal=" SIZE_FORMAT,
    96                  get(push), get(pop), get(steal)));
    96          get(push), get(pop), get(steal));
    97   assert(get(pop_slow) <= get(pop),
    97   assert(get(pop_slow) <= get(pop),
    98          err_msg("pop_slow=" SIZE_FORMAT " pop=" SIZE_FORMAT,
    98          "pop_slow=" SIZE_FORMAT " pop=" SIZE_FORMAT,
    99                  get(pop_slow), get(pop)));
    99          get(pop_slow), get(pop));
   100   assert(get(steal) <= get(steal_attempt),
   100   assert(get(steal) <= get(steal_attempt),
   101          err_msg("steal=" SIZE_FORMAT " steal_attempt=" SIZE_FORMAT,
   101          "steal=" SIZE_FORMAT " steal_attempt=" SIZE_FORMAT,
   102                  get(steal), get(steal_attempt)));
   102          get(steal), get(steal_attempt));
   103   assert(get(overflow) == 0 || get(push) != 0,
   103   assert(get(overflow) == 0 || get(push) != 0,
   104          err_msg("overflow=" SIZE_FORMAT " push=" SIZE_FORMAT,
   104          "overflow=" SIZE_FORMAT " push=" SIZE_FORMAT,
   105                  get(overflow), get(push)));
   105          get(overflow), get(push));
   106   assert(get(overflow_max_len) == 0 || get(overflow) != 0,
   106   assert(get(overflow_max_len) == 0 || get(overflow) != 0,
   107          err_msg("overflow_max_len=" SIZE_FORMAT " overflow=" SIZE_FORMAT,
   107          "overflow_max_len=" SIZE_FORMAT " overflow=" SIZE_FORMAT,
   108                  get(overflow_max_len), get(overflow)));
   108          get(overflow_max_len), get(overflow));
   109 }
   109 }
   110 #endif // ASSERT
   110 #endif // ASSERT
   111 #endif // TASKQUEUE_STATS
   111 #endif // TASKQUEUE_STATS
   112 
   112 
   113 int TaskQueueSetSuper::randomParkAndMiller(int *seed0) {
   113 int TaskQueueSetSuper::randomParkAndMiller(int *seed0) {