hotspot/src/share/vm/gc/parallel/gcTaskThread.cpp
author brutisso
Fri, 11 Mar 2016 11:34:22 +0100
changeset 37073 c39d0903390b
parent 35460 1fca55136d66
child 37224 fd3320bf6413
permissions -rw-r--r--
8151605: Change warning() to log_warning(gc) in the GC code Reviewed-by: jwilhelm, jmasa
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     1
/*
37073
c39d0903390b 8151605: Change warning() to log_warning(gc) in the GC code
brutisso
parents: 35460
diff changeset
     2
 * Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     4
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
489c9b5090e2 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
489c9b5090e2 Initial load
duke
parents:
diff changeset
     7
 * published by the Free Software Foundation.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     8
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
489c9b5090e2 Initial load
duke
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
489c9b5090e2 Initial load
duke
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
489c9b5090e2 Initial load
duke
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
489c9b5090e2 Initial load
duke
parents:
diff changeset
    13
 * accompanied this code).
489c9b5090e2 Initial load
duke
parents:
diff changeset
    14
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
489c9b5090e2 Initial load
duke
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    18
 *
5547
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1
diff changeset
    21
 * questions.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    22
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    23
 */
489c9b5090e2 Initial load
duke
parents:
diff changeset
    24
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    25
#include "precompiled.hpp"
30764
fec48bf5a827 8079792: GC directory structure cleanup
pliden
parents: 29798
diff changeset
    26
#include "gc/parallel/gcTaskManager.hpp"
fec48bf5a827 8079792: GC directory structure cleanup
pliden
parents: 29798
diff changeset
    27
#include "gc/parallel/gcTaskThread.hpp"
33126
260ff671354b 8138707: TestPromotionEventWithParallelScavenge.java crashes using undefined GC id.
brutisso
parents: 30764
diff changeset
    28
#include "gc/shared/gcId.hpp"
35061
be6025ebffea 8145092: Use Unified Logging for the GC logging
brutisso
parents: 34633
diff changeset
    29
#include "logging/log.hpp"
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    30
#include "memory/allocation.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    31
#include "memory/allocation.inline.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    32
#include "memory/resourceArea.hpp"
35061
be6025ebffea 8145092: Use Unified Logging for the GC logging
brutisso
parents: 34633
diff changeset
    33
#include "runtime/atomic.inline.hpp"
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    34
#include "runtime/handles.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    35
#include "runtime/handles.inline.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    36
#include "runtime/os.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    37
#include "runtime/thread.hpp"
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    38
489c9b5090e2 Initial load
duke
parents:
diff changeset
    39
GCTaskThread::GCTaskThread(GCTaskManager* manager,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    40
                           uint           which,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    41
                           uint           processor_id) :
489c9b5090e2 Initial load
duke
parents:
diff changeset
    42
  _manager(manager),
489c9b5090e2 Initial load
duke
parents:
diff changeset
    43
  _processor_id(processor_id),
489c9b5090e2 Initial load
duke
parents:
diff changeset
    44
  _time_stamps(NULL),
489c9b5090e2 Initial load
duke
parents:
diff changeset
    45
  _time_stamp_index(0)
489c9b5090e2 Initial load
duke
parents:
diff changeset
    46
{
489c9b5090e2 Initial load
duke
parents:
diff changeset
    47
  if (!os::create_thread(this, os::pgc_thread))
17087
f0b76c4c93a0 8011661: Insufficient memory message says "malloc" when sometimes it should say "mmap"
ccheung
parents: 13963
diff changeset
    48
    vm_exit_out_of_memory(0, OOM_MALLOC_ERROR, "Cannot create GC thread. Out of system resources.");
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    49
489c9b5090e2 Initial load
duke
parents:
diff changeset
    50
  set_id(which);
29464
02c245ad3ec9 8073545: Use shorter and more descriptive names for GC worker threads
david
parents: 29326
diff changeset
    51
  set_name("ParGC Thread#%d", which);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    52
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
    53
489c9b5090e2 Initial load
duke
parents:
diff changeset
    54
GCTaskThread::~GCTaskThread() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    55
  if (_time_stamps != NULL) {
27880
afb974a04396 8060074: os::free() takes MemoryTrackingLevel but doesn't need it
coleenp
parents: 24424
diff changeset
    56
    FREE_C_HEAP_ARRAY(GCTaskTimeStamp, _time_stamps);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    57
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    58
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
    59
489c9b5090e2 Initial load
duke
parents:
diff changeset
    60
void GCTaskThread::start() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    61
  os::start_thread(this);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    62
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
    63
489c9b5090e2 Initial load
duke
parents:
diff changeset
    64
GCTaskTimeStamp* GCTaskThread::time_stamp_at(uint index) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    65
  guarantee(index < GCTaskTimeStampEntries, "increase GCTaskTimeStampEntries");
35061
be6025ebffea 8145092: Use Unified Logging for the GC logging
brutisso
parents: 34633
diff changeset
    66
  if (_time_stamps == NULL) {
be6025ebffea 8145092: Use Unified Logging for the GC logging
brutisso
parents: 34633
diff changeset
    67
    // We allocate the _time_stamps array lazily since logging can be enabled dynamically
be6025ebffea 8145092: Use Unified Logging for the GC logging
brutisso
parents: 34633
diff changeset
    68
    GCTaskTimeStamp* time_stamps = NEW_C_HEAP_ARRAY(GCTaskTimeStamp, GCTaskTimeStampEntries, mtGC);
be6025ebffea 8145092: Use Unified Logging for the GC logging
brutisso
parents: 34633
diff changeset
    69
    void* old = Atomic::cmpxchg_ptr(time_stamps, &_time_stamps, NULL);
be6025ebffea 8145092: Use Unified Logging for the GC logging
brutisso
parents: 34633
diff changeset
    70
    if (old != NULL) {
be6025ebffea 8145092: Use Unified Logging for the GC logging
brutisso
parents: 34633
diff changeset
    71
      // Someone already setup the time stamps
be6025ebffea 8145092: Use Unified Logging for the GC logging
brutisso
parents: 34633
diff changeset
    72
      FREE_C_HEAP_ARRAY(GCTaskTimeStamp, time_stamps);
be6025ebffea 8145092: Use Unified Logging for the GC logging
brutisso
parents: 34633
diff changeset
    73
    }
be6025ebffea 8145092: Use Unified Logging for the GC logging
brutisso
parents: 34633
diff changeset
    74
  }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    75
489c9b5090e2 Initial load
duke
parents:
diff changeset
    76
  return &(_time_stamps[index]);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    77
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
    78
489c9b5090e2 Initial load
duke
parents:
diff changeset
    79
void GCTaskThread::print_task_time_stamps() {
35061
be6025ebffea 8145092: Use Unified Logging for the GC logging
brutisso
parents: 34633
diff changeset
    80
  assert(log_is_enabled(Debug, gc, task, time), "Sanity");
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    81
35460
1fca55136d66 8146409: TestPromotionFailedEventWithParallelScavenge.java failed with assert(_time_stamps != __null) failed: Sanity
david
parents: 35177
diff changeset
    82
  // Since _time_stamps is now lazily allocated we need to check that it
1fca55136d66 8146409: TestPromotionFailedEventWithParallelScavenge.java failed with assert(_time_stamps != __null) failed: Sanity
david
parents: 35177
diff changeset
    83
  // has in fact been allocated when calling this function.
1fca55136d66 8146409: TestPromotionFailedEventWithParallelScavenge.java failed with assert(_time_stamps != __null) failed: Sanity
david
parents: 35177
diff changeset
    84
  if (_time_stamps != NULL) {
1fca55136d66 8146409: TestPromotionFailedEventWithParallelScavenge.java failed with assert(_time_stamps != __null) failed: Sanity
david
parents: 35177
diff changeset
    85
    log_debug(gc, task, time)("GC-Thread %u entries: %d", id(), _time_stamp_index);
1fca55136d66 8146409: TestPromotionFailedEventWithParallelScavenge.java failed with assert(_time_stamps != __null) failed: Sanity
david
parents: 35177
diff changeset
    86
    for(uint i=0; i<_time_stamp_index; i++) {
1fca55136d66 8146409: TestPromotionFailedEventWithParallelScavenge.java failed with assert(_time_stamps != __null) failed: Sanity
david
parents: 35177
diff changeset
    87
      GCTaskTimeStamp* time_stamp = time_stamp_at(i);
1fca55136d66 8146409: TestPromotionFailedEventWithParallelScavenge.java failed with assert(_time_stamps != __null) failed: Sanity
david
parents: 35177
diff changeset
    88
      log_debug(gc, task, time)("\t[ %s " JLONG_FORMAT " " JLONG_FORMAT " ]",
1fca55136d66 8146409: TestPromotionFailedEventWithParallelScavenge.java failed with assert(_time_stamps != __null) failed: Sanity
david
parents: 35177
diff changeset
    89
                                time_stamp->name(),
1fca55136d66 8146409: TestPromotionFailedEventWithParallelScavenge.java failed with assert(_time_stamps != __null) failed: Sanity
david
parents: 35177
diff changeset
    90
                                time_stamp->entry_time(),
1fca55136d66 8146409: TestPromotionFailedEventWithParallelScavenge.java failed with assert(_time_stamps != __null) failed: Sanity
david
parents: 35177
diff changeset
    91
                                time_stamp->exit_time());
1fca55136d66 8146409: TestPromotionFailedEventWithParallelScavenge.java failed with assert(_time_stamps != __null) failed: Sanity
david
parents: 35177
diff changeset
    92
    }
1fca55136d66 8146409: TestPromotionFailedEventWithParallelScavenge.java failed with assert(_time_stamps != __null) failed: Sanity
david
parents: 35177
diff changeset
    93
1fca55136d66 8146409: TestPromotionFailedEventWithParallelScavenge.java failed with assert(_time_stamps != __null) failed: Sanity
david
parents: 35177
diff changeset
    94
    // Reset after dumping the data
1fca55136d66 8146409: TestPromotionFailedEventWithParallelScavenge.java failed with assert(_time_stamps != __null) failed: Sanity
david
parents: 35177
diff changeset
    95
    _time_stamp_index = 0;
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    96
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    97
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
    98
11174
fccee5238e70 6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents: 7397
diff changeset
    99
// GC workers get tasks from the GCTaskManager and execute
fccee5238e70 6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents: 7397
diff changeset
   100
// them in this method.  If there are no tasks to execute,
fccee5238e70 6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents: 7397
diff changeset
   101
// the GC workers wait in the GCTaskManager's get_task()
fccee5238e70 6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents: 7397
diff changeset
   102
// for tasks to be enqueued for execution.
fccee5238e70 6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents: 7397
diff changeset
   103
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   104
void GCTaskThread::run() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   105
  // Set up the thread for stack overflow support
489c9b5090e2 Initial load
duke
parents:
diff changeset
   106
  this->record_stack_base_and_size();
29326
ebaa169c6dc3 8073464: GC workers do not have thread names
david
parents: 27880
diff changeset
   107
  this->initialize_named_thread();
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   108
  // Bind yourself to your processor.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   109
  if (processor_id() != GCTaskManager::sentinel_worker()) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   110
    if (TraceGCTaskThread) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   111
      tty->print_cr("GCTaskThread::run: "
489c9b5090e2 Initial load
duke
parents:
diff changeset
   112
                    "  binding to processor %u", processor_id());
489c9b5090e2 Initial load
duke
parents:
diff changeset
   113
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   114
    if (!os::bind_to_processor(processor_id())) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   115
      DEBUG_ONLY(
37073
c39d0903390b 8151605: Change warning() to log_warning(gc) in the GC code
brutisso
parents: 35460
diff changeset
   116
        log_warning(gc)("Couldn't bind GCTaskThread %u to processor %u",
c39d0903390b 8151605: Change warning() to log_warning(gc) in the GC code
brutisso
parents: 35460
diff changeset
   117
                        which(), processor_id());
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   118
      )
489c9b5090e2 Initial load
duke
parents:
diff changeset
   119
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   120
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   121
  // Part of thread setup.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   122
  // ??? Are these set up once here to make subsequent ones fast?
489c9b5090e2 Initial load
duke
parents:
diff changeset
   123
  HandleMark   hm_outer;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   124
  ResourceMark rm_outer;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   125
489c9b5090e2 Initial load
duke
parents:
diff changeset
   126
  TimeStamp timer;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   127
489c9b5090e2 Initial load
duke
parents:
diff changeset
   128
  for (;/* ever */;) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   129
    // These are so we can flush the resources allocated in the inner loop.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   130
    HandleMark   hm_inner;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   131
    ResourceMark rm_inner;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   132
    for (; /* break */; ) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   133
      // This will block until there is a task to be gotten.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   134
      GCTask* task = manager()->get_task(which());
33126
260ff671354b 8138707: TestPromotionEventWithParallelScavenge.java crashes using undefined GC id.
brutisso
parents: 30764
diff changeset
   135
      GCIdMark gc_id_mark(task->gc_id());
11208
101816314520 7119584: UseParallelGC barrier task can be overwritten.
jmasa
parents: 11174
diff changeset
   136
      // Record if this is an idle task for later use.
101816314520 7119584: UseParallelGC barrier task can be overwritten.
jmasa
parents: 11174
diff changeset
   137
      bool is_idle_task = task->is_idle_task();
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   138
      // In case the update is costly
35061
be6025ebffea 8145092: Use Unified Logging for the GC logging
brutisso
parents: 34633
diff changeset
   139
      if (log_is_enabled(Debug, gc, task, time)) {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   140
        timer.update();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   141
      }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   142
489c9b5090e2 Initial load
duke
parents:
diff changeset
   143
      jlong entry_time = timer.ticks();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   144
      char* name = task->name();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   145
11208
101816314520 7119584: UseParallelGC barrier task can be overwritten.
jmasa
parents: 11174
diff changeset
   146
      // If this is the barrier task, it can be destroyed
101816314520 7119584: UseParallelGC barrier task can be overwritten.
jmasa
parents: 11174
diff changeset
   147
      // by the GC task manager once the do_it() executes.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   148
      task->do_it(manager(), which());
11174
fccee5238e70 6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents: 7397
diff changeset
   149
11208
101816314520 7119584: UseParallelGC barrier task can be overwritten.
jmasa
parents: 11174
diff changeset
   150
      // Use the saved value of is_idle_task because references
101816314520 7119584: UseParallelGC barrier task can be overwritten.
jmasa
parents: 11174
diff changeset
   151
      // using "task" are not reliable for the barrier task.
101816314520 7119584: UseParallelGC barrier task can be overwritten.
jmasa
parents: 11174
diff changeset
   152
      if (!is_idle_task) {
11174
fccee5238e70 6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents: 7397
diff changeset
   153
        manager()->note_completion(which());
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   154
35061
be6025ebffea 8145092: Use Unified Logging for the GC logging
brutisso
parents: 34633
diff changeset
   155
        if (log_is_enabled(Debug, gc, task, time)) {
11174
fccee5238e70 6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents: 7397
diff changeset
   156
          timer.update();
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   157
35177
22c9af3d46fd 8145315: VM crashes in print_task_time_stamps()
brutisso
parents: 35061
diff changeset
   158
          GCTaskTimeStamp* time_stamp = time_stamp_at(_time_stamp_index);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   159
11174
fccee5238e70 6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents: 7397
diff changeset
   160
          time_stamp->set_name(name);
fccee5238e70 6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents: 7397
diff changeset
   161
          time_stamp->set_entry_time(entry_time);
fccee5238e70 6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents: 7397
diff changeset
   162
          time_stamp->set_exit_time(timer.ticks());
35177
22c9af3d46fd 8145315: VM crashes in print_task_time_stamps()
brutisso
parents: 35061
diff changeset
   163
22c9af3d46fd 8145315: VM crashes in print_task_time_stamps()
brutisso
parents: 35061
diff changeset
   164
          // Update the index after we have set up the entry correctly since
22c9af3d46fd 8145315: VM crashes in print_task_time_stamps()
brutisso
parents: 35061
diff changeset
   165
          // GCTaskThread::print_task_time_stamps() may read this value concurrently.
22c9af3d46fd 8145315: VM crashes in print_task_time_stamps()
brutisso
parents: 35061
diff changeset
   166
          _time_stamp_index++;
11174
fccee5238e70 6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents: 7397
diff changeset
   167
        }
fccee5238e70 6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents: 7397
diff changeset
   168
      } else {
fccee5238e70 6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents: 7397
diff changeset
   169
        // idle tasks complete outside the normal accounting
fccee5238e70 6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents: 7397
diff changeset
   170
        // so that a task can complete without waiting for idle tasks.
fccee5238e70 6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents: 7397
diff changeset
   171
        // They have to be terminated separately.
fccee5238e70 6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents: 7397
diff changeset
   172
        IdleGCTask::destroy((IdleGCTask*)task);
fccee5238e70 6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
jmasa
parents: 7397
diff changeset
   173
        set_is_working(true);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   174
      }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   175
489c9b5090e2 Initial load
duke
parents:
diff changeset
   176
      // Check if we should release our inner resources.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   177
      if (manager()->should_release_resources(which())) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   178
        manager()->note_release(which());
489c9b5090e2 Initial load
duke
parents:
diff changeset
   179
        break;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   180
      }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   181
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   182
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   183
}