hotspot/src/share/vm/classfile/metadataOnStackMark.cpp
author david
Tue, 29 Sep 2015 11:02:08 +0200
changeset 33105 294e48b4f704
parent 29576 c223b0a9872e
child 33198 b37ad9fbf681
permissions -rw-r--r--
8080775: Better argument formatting for assert() and friends Reviewed-by: kbarrett, pliden
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
15430
7c35f12cf1e5 8006040: NPG: on_stack processing wastes space in ConstantPool
coleenp
parents:
diff changeset
     1
/*
29576
c223b0a9872e 8061205: MetadataOnStackMark only needs to walk code cache during class redefinition
coleenp
parents: 27247
diff changeset
     2
 * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
15430
7c35f12cf1e5 8006040: NPG: on_stack processing wastes space in ConstantPool
coleenp
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
7c35f12cf1e5 8006040: NPG: on_stack processing wastes space in ConstantPool
coleenp
parents:
diff changeset
     4
 *
7c35f12cf1e5 8006040: NPG: on_stack processing wastes space in ConstantPool
coleenp
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
7c35f12cf1e5 8006040: NPG: on_stack processing wastes space in ConstantPool
coleenp
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
7c35f12cf1e5 8006040: NPG: on_stack processing wastes space in ConstantPool
coleenp
parents:
diff changeset
     7
 * published by the Free Software Foundation.
7c35f12cf1e5 8006040: NPG: on_stack processing wastes space in ConstantPool
coleenp
parents:
diff changeset
     8
 *
7c35f12cf1e5 8006040: NPG: on_stack processing wastes space in ConstantPool
coleenp
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
7c35f12cf1e5 8006040: NPG: on_stack processing wastes space in ConstantPool
coleenp
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
7c35f12cf1e5 8006040: NPG: on_stack processing wastes space in ConstantPool
coleenp
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
7c35f12cf1e5 8006040: NPG: on_stack processing wastes space in ConstantPool
coleenp
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
7c35f12cf1e5 8006040: NPG: on_stack processing wastes space in ConstantPool
coleenp
parents:
diff changeset
    13
 * accompanied this code).
7c35f12cf1e5 8006040: NPG: on_stack processing wastes space in ConstantPool
coleenp
parents:
diff changeset
    14
 *
7c35f12cf1e5 8006040: NPG: on_stack processing wastes space in ConstantPool
coleenp
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
7c35f12cf1e5 8006040: NPG: on_stack processing wastes space in ConstantPool
coleenp
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
7c35f12cf1e5 8006040: NPG: on_stack processing wastes space in ConstantPool
coleenp
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
7c35f12cf1e5 8006040: NPG: on_stack processing wastes space in ConstantPool
coleenp
parents:
diff changeset
    18
 *
7c35f12cf1e5 8006040: NPG: on_stack processing wastes space in ConstantPool
coleenp
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
7c35f12cf1e5 8006040: NPG: on_stack processing wastes space in ConstantPool
coleenp
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
7c35f12cf1e5 8006040: NPG: on_stack processing wastes space in ConstantPool
coleenp
parents:
diff changeset
    21
 * questions.
7c35f12cf1e5 8006040: NPG: on_stack processing wastes space in ConstantPool
coleenp
parents:
diff changeset
    22
 *
7c35f12cf1e5 8006040: NPG: on_stack processing wastes space in ConstantPool
coleenp
parents:
diff changeset
    23
 */
7c35f12cf1e5 8006040: NPG: on_stack processing wastes space in ConstantPool
coleenp
parents:
diff changeset
    24
7c35f12cf1e5 8006040: NPG: on_stack processing wastes space in ConstantPool
coleenp
parents:
diff changeset
    25
#include "precompiled.hpp"
7c35f12cf1e5 8006040: NPG: on_stack processing wastes space in ConstantPool
coleenp
parents:
diff changeset
    26
#include "classfile/metadataOnStackMark.hpp"
7c35f12cf1e5 8006040: NPG: on_stack processing wastes space in ConstantPool
coleenp
parents:
diff changeset
    27
#include "code/codeCache.hpp"
7c35f12cf1e5 8006040: NPG: on_stack processing wastes space in ConstantPool
coleenp
parents:
diff changeset
    28
#include "compiler/compileBroker.hpp"
7c35f12cf1e5 8006040: NPG: on_stack processing wastes space in ConstantPool
coleenp
parents:
diff changeset
    29
#include "oops/metadata.hpp"
21519
72e63a0dbda2 8026946: JvmtiEnv::SetBreakpoint and JvmtiEnv::ClearBreakpoint should use MethodHandle
coleenp
parents: 15430
diff changeset
    30
#include "prims/jvmtiImpl.hpp"
15430
7c35f12cf1e5 8006040: NPG: on_stack processing wastes space in ConstantPool
coleenp
parents:
diff changeset
    31
#include "runtime/synchronizer.hpp"
7c35f12cf1e5 8006040: NPG: on_stack processing wastes space in ConstantPool
coleenp
parents:
diff changeset
    32
#include "runtime/thread.hpp"
21735
379ba90c3dc4 8027630: SIGSEGV in const char*Klass::external_name()
sla
parents: 21519
diff changeset
    33
#include "services/threadService.hpp"
27247
99db666dbe8e 8056240: Investigate increased GC remark time after class unloading changes in CRM Fuse
stefank
parents: 26558
diff changeset
    34
#include "utilities/chunkedList.hpp"
15430
7c35f12cf1e5 8006040: NPG: on_stack processing wastes space in ConstantPool
coleenp
parents:
diff changeset
    35
29576
c223b0a9872e 8061205: MetadataOnStackMark only needs to walk code cache during class redefinition
coleenp
parents: 27247
diff changeset
    36
MetadataOnStackBuffer* MetadataOnStackMark::_used_buffers = NULL;
c223b0a9872e 8061205: MetadataOnStackMark only needs to walk code cache during class redefinition
coleenp
parents: 27247
diff changeset
    37
MetadataOnStackBuffer* MetadataOnStackMark::_free_buffers = NULL;
27247
99db666dbe8e 8056240: Investigate increased GC remark time after class unloading changes in CRM Fuse
stefank
parents: 26558
diff changeset
    38
29576
c223b0a9872e 8061205: MetadataOnStackMark only needs to walk code cache during class redefinition
coleenp
parents: 27247
diff changeset
    39
MetadataOnStackBuffer* MetadataOnStackMark::_current_buffer = NULL;
15430
7c35f12cf1e5 8006040: NPG: on_stack processing wastes space in ConstantPool
coleenp
parents:
diff changeset
    40
NOT_PRODUCT(bool MetadataOnStackMark::_is_active = false;)
7c35f12cf1e5 8006040: NPG: on_stack processing wastes space in ConstantPool
coleenp
parents:
diff changeset
    41
7c35f12cf1e5 8006040: NPG: on_stack processing wastes space in ConstantPool
coleenp
parents:
diff changeset
    42
// Walk metadata on the stack and mark it so that redefinition doesn't delete
29576
c223b0a9872e 8061205: MetadataOnStackMark only needs to walk code cache during class redefinition
coleenp
parents: 27247
diff changeset
    43
// it.  Class unloading only deletes in-error class files, methods created by
c223b0a9872e 8061205: MetadataOnStackMark only needs to walk code cache during class redefinition
coleenp
parents: 27247
diff changeset
    44
// the relocator and dummy constant pools.  None of these appear anywhere except
c223b0a9872e 8061205: MetadataOnStackMark only needs to walk code cache during class redefinition
coleenp
parents: 27247
diff changeset
    45
// in metadata Handles.
c223b0a9872e 8061205: MetadataOnStackMark only needs to walk code cache during class redefinition
coleenp
parents: 27247
diff changeset
    46
MetadataOnStackMark::MetadataOnStackMark(bool redefinition_walk) {
15430
7c35f12cf1e5 8006040: NPG: on_stack processing wastes space in ConstantPool
coleenp
parents:
diff changeset
    47
  assert(SafepointSynchronize::is_at_safepoint(), "sanity check");
27247
99db666dbe8e 8056240: Investigate increased GC remark time after class unloading changes in CRM Fuse
stefank
parents: 26558
diff changeset
    48
  assert(_used_buffers == NULL, "sanity check");
29576
c223b0a9872e 8061205: MetadataOnStackMark only needs to walk code cache during class redefinition
coleenp
parents: 27247
diff changeset
    49
  assert(!_is_active, "MetadataOnStackMarks do not nest");
15430
7c35f12cf1e5 8006040: NPG: on_stack processing wastes space in ConstantPool
coleenp
parents:
diff changeset
    50
  NOT_PRODUCT(_is_active = true;)
25492
d27050bdfb04 8049421: G1 Class Unloading after completing a concurrent mark cycle
stefank
parents: 25491
diff changeset
    51
29576
c223b0a9872e 8061205: MetadataOnStackMark only needs to walk code cache during class redefinition
coleenp
parents: 27247
diff changeset
    52
  Threads::metadata_handles_do(Metadata::mark_on_stack);
c223b0a9872e 8061205: MetadataOnStackMark only needs to walk code cache during class redefinition
coleenp
parents: 27247
diff changeset
    53
c223b0a9872e 8061205: MetadataOnStackMark only needs to walk code cache during class redefinition
coleenp
parents: 27247
diff changeset
    54
  if (redefinition_walk) {
c223b0a9872e 8061205: MetadataOnStackMark only needs to walk code cache during class redefinition
coleenp
parents: 27247
diff changeset
    55
    Threads::metadata_do(Metadata::mark_on_stack);
25492
d27050bdfb04 8049421: G1 Class Unloading after completing a concurrent mark cycle
stefank
parents: 25491
diff changeset
    56
    CodeCache::alive_nmethods_do(nmethod::mark_on_stack);
29576
c223b0a9872e 8061205: MetadataOnStackMark only needs to walk code cache during class redefinition
coleenp
parents: 27247
diff changeset
    57
    CompileBroker::mark_on_stack();
c223b0a9872e 8061205: MetadataOnStackMark only needs to walk code cache during class redefinition
coleenp
parents: 27247
diff changeset
    58
    JvmtiCurrentBreakpoints::metadata_do(Metadata::mark_on_stack);
c223b0a9872e 8061205: MetadataOnStackMark only needs to walk code cache during class redefinition
coleenp
parents: 27247
diff changeset
    59
    ThreadService::metadata_do(Metadata::mark_on_stack);
25492
d27050bdfb04 8049421: G1 Class Unloading after completing a concurrent mark cycle
stefank
parents: 25491
diff changeset
    60
  }
15430
7c35f12cf1e5 8006040: NPG: on_stack processing wastes space in ConstantPool
coleenp
parents:
diff changeset
    61
}
7c35f12cf1e5 8006040: NPG: on_stack processing wastes space in ConstantPool
coleenp
parents:
diff changeset
    62
7c35f12cf1e5 8006040: NPG: on_stack processing wastes space in ConstantPool
coleenp
parents:
diff changeset
    63
MetadataOnStackMark::~MetadataOnStackMark() {
7c35f12cf1e5 8006040: NPG: on_stack processing wastes space in ConstantPool
coleenp
parents:
diff changeset
    64
  assert(SafepointSynchronize::is_at_safepoint(), "sanity check");
7c35f12cf1e5 8006040: NPG: on_stack processing wastes space in ConstantPool
coleenp
parents:
diff changeset
    65
  // Unmark everything that was marked.   Can't do the same walk because
7c35f12cf1e5 8006040: NPG: on_stack processing wastes space in ConstantPool
coleenp
parents:
diff changeset
    66
  // redefine classes messes up the code cache so the set of methods
7c35f12cf1e5 8006040: NPG: on_stack processing wastes space in ConstantPool
coleenp
parents:
diff changeset
    67
  // might not be the same.
29576
c223b0a9872e 8061205: MetadataOnStackMark only needs to walk code cache during class redefinition
coleenp
parents: 27247
diff changeset
    68
  retire_current_buffer();
27247
99db666dbe8e 8056240: Investigate increased GC remark time after class unloading changes in CRM Fuse
stefank
parents: 26558
diff changeset
    69
29576
c223b0a9872e 8061205: MetadataOnStackMark only needs to walk code cache during class redefinition
coleenp
parents: 27247
diff changeset
    70
  MetadataOnStackBuffer* buffer = _used_buffers;
27247
99db666dbe8e 8056240: Investigate increased GC remark time after class unloading changes in CRM Fuse
stefank
parents: 26558
diff changeset
    71
  while (buffer != NULL) {
99db666dbe8e 8056240: Investigate increased GC remark time after class unloading changes in CRM Fuse
stefank
parents: 26558
diff changeset
    72
    // Clear on stack state for all metadata.
99db666dbe8e 8056240: Investigate increased GC remark time after class unloading changes in CRM Fuse
stefank
parents: 26558
diff changeset
    73
    size_t size = buffer->size();
99db666dbe8e 8056240: Investigate increased GC remark time after class unloading changes in CRM Fuse
stefank
parents: 26558
diff changeset
    74
    for (size_t i  = 0; i < size; i++) {
99db666dbe8e 8056240: Investigate increased GC remark time after class unloading changes in CRM Fuse
stefank
parents: 26558
diff changeset
    75
      Metadata* md = buffer->at(i);
99db666dbe8e 8056240: Investigate increased GC remark time after class unloading changes in CRM Fuse
stefank
parents: 26558
diff changeset
    76
      md->set_on_stack(false);
99db666dbe8e 8056240: Investigate increased GC remark time after class unloading changes in CRM Fuse
stefank
parents: 26558
diff changeset
    77
    }
99db666dbe8e 8056240: Investigate increased GC remark time after class unloading changes in CRM Fuse
stefank
parents: 26558
diff changeset
    78
99db666dbe8e 8056240: Investigate increased GC remark time after class unloading changes in CRM Fuse
stefank
parents: 26558
diff changeset
    79
    MetadataOnStackBuffer* next = buffer->next_used();
99db666dbe8e 8056240: Investigate increased GC remark time after class unloading changes in CRM Fuse
stefank
parents: 26558
diff changeset
    80
99db666dbe8e 8056240: Investigate increased GC remark time after class unloading changes in CRM Fuse
stefank
parents: 26558
diff changeset
    81
    // Move the buffer to the free list.
99db666dbe8e 8056240: Investigate increased GC remark time after class unloading changes in CRM Fuse
stefank
parents: 26558
diff changeset
    82
    buffer->clear();
99db666dbe8e 8056240: Investigate increased GC remark time after class unloading changes in CRM Fuse
stefank
parents: 26558
diff changeset
    83
    buffer->set_next_used(NULL);
29576
c223b0a9872e 8061205: MetadataOnStackMark only needs to walk code cache during class redefinition
coleenp
parents: 27247
diff changeset
    84
    buffer->set_next_free(_free_buffers);
27247
99db666dbe8e 8056240: Investigate increased GC remark time after class unloading changes in CRM Fuse
stefank
parents: 26558
diff changeset
    85
    _free_buffers = buffer;
99db666dbe8e 8056240: Investigate increased GC remark time after class unloading changes in CRM Fuse
stefank
parents: 26558
diff changeset
    86
99db666dbe8e 8056240: Investigate increased GC remark time after class unloading changes in CRM Fuse
stefank
parents: 26558
diff changeset
    87
    // Step to next used buffer.
99db666dbe8e 8056240: Investigate increased GC remark time after class unloading changes in CRM Fuse
stefank
parents: 26558
diff changeset
    88
    buffer = next;
15430
7c35f12cf1e5 8006040: NPG: on_stack processing wastes space in ConstantPool
coleenp
parents:
diff changeset
    89
  }
27247
99db666dbe8e 8056240: Investigate increased GC remark time after class unloading changes in CRM Fuse
stefank
parents: 26558
diff changeset
    90
99db666dbe8e 8056240: Investigate increased GC remark time after class unloading changes in CRM Fuse
stefank
parents: 26558
diff changeset
    91
  _used_buffers = NULL;
99db666dbe8e 8056240: Investigate increased GC remark time after class unloading changes in CRM Fuse
stefank
parents: 26558
diff changeset
    92
15430
7c35f12cf1e5 8006040: NPG: on_stack processing wastes space in ConstantPool
coleenp
parents:
diff changeset
    93
  NOT_PRODUCT(_is_active = false;)
7c35f12cf1e5 8006040: NPG: on_stack processing wastes space in ConstantPool
coleenp
parents:
diff changeset
    94
}
7c35f12cf1e5 8006040: NPG: on_stack processing wastes space in ConstantPool
coleenp
parents:
diff changeset
    95
27247
99db666dbe8e 8056240: Investigate increased GC remark time after class unloading changes in CRM Fuse
stefank
parents: 26558
diff changeset
    96
void MetadataOnStackMark::retire_buffer(MetadataOnStackBuffer* buffer) {
99db666dbe8e 8056240: Investigate increased GC remark time after class unloading changes in CRM Fuse
stefank
parents: 26558
diff changeset
    97
  if (buffer == NULL) {
99db666dbe8e 8056240: Investigate increased GC remark time after class unloading changes in CRM Fuse
stefank
parents: 26558
diff changeset
    98
    return;
99db666dbe8e 8056240: Investigate increased GC remark time after class unloading changes in CRM Fuse
stefank
parents: 26558
diff changeset
    99
  }
29576
c223b0a9872e 8061205: MetadataOnStackMark only needs to walk code cache during class redefinition
coleenp
parents: 27247
diff changeset
   100
  buffer->set_next_used(_used_buffers);
c223b0a9872e 8061205: MetadataOnStackMark only needs to walk code cache during class redefinition
coleenp
parents: 27247
diff changeset
   101
  _used_buffers = buffer;
27247
99db666dbe8e 8056240: Investigate increased GC remark time after class unloading changes in CRM Fuse
stefank
parents: 26558
diff changeset
   102
}
99db666dbe8e 8056240: Investigate increased GC remark time after class unloading changes in CRM Fuse
stefank
parents: 26558
diff changeset
   103
29576
c223b0a9872e 8061205: MetadataOnStackMark only needs to walk code cache during class redefinition
coleenp
parents: 27247
diff changeset
   104
// Current buffer is full or we're ready to walk them, add it to the used list.
c223b0a9872e 8061205: MetadataOnStackMark only needs to walk code cache during class redefinition
coleenp
parents: 27247
diff changeset
   105
void MetadataOnStackMark::retire_current_buffer() {
c223b0a9872e 8061205: MetadataOnStackMark only needs to walk code cache during class redefinition
coleenp
parents: 27247
diff changeset
   106
  retire_buffer(_current_buffer);
c223b0a9872e 8061205: MetadataOnStackMark only needs to walk code cache during class redefinition
coleenp
parents: 27247
diff changeset
   107
  _current_buffer = NULL;
27247
99db666dbe8e 8056240: Investigate increased GC remark time after class unloading changes in CRM Fuse
stefank
parents: 26558
diff changeset
   108
}
99db666dbe8e 8056240: Investigate increased GC remark time after class unloading changes in CRM Fuse
stefank
parents: 26558
diff changeset
   109
29576
c223b0a9872e 8061205: MetadataOnStackMark only needs to walk code cache during class redefinition
coleenp
parents: 27247
diff changeset
   110
// Get buffer off free list.
27247
99db666dbe8e 8056240: Investigate increased GC remark time after class unloading changes in CRM Fuse
stefank
parents: 26558
diff changeset
   111
MetadataOnStackBuffer* MetadataOnStackMark::allocate_buffer() {
29576
c223b0a9872e 8061205: MetadataOnStackMark only needs to walk code cache during class redefinition
coleenp
parents: 27247
diff changeset
   112
  MetadataOnStackBuffer* allocated = _free_buffers;
27247
99db666dbe8e 8056240: Investigate increased GC remark time after class unloading changes in CRM Fuse
stefank
parents: 26558
diff changeset
   113
29576
c223b0a9872e 8061205: MetadataOnStackMark only needs to walk code cache during class redefinition
coleenp
parents: 27247
diff changeset
   114
  if (allocated != NULL) {
c223b0a9872e 8061205: MetadataOnStackMark only needs to walk code cache during class redefinition
coleenp
parents: 27247
diff changeset
   115
    _free_buffers = allocated->next_free();
c223b0a9872e 8061205: MetadataOnStackMark only needs to walk code cache during class redefinition
coleenp
parents: 27247
diff changeset
   116
  }
27247
99db666dbe8e 8056240: Investigate increased GC remark time after class unloading changes in CRM Fuse
stefank
parents: 26558
diff changeset
   117
99db666dbe8e 8056240: Investigate increased GC remark time after class unloading changes in CRM Fuse
stefank
parents: 26558
diff changeset
   118
  if (allocated == NULL) {
99db666dbe8e 8056240: Investigate increased GC remark time after class unloading changes in CRM Fuse
stefank
parents: 26558
diff changeset
   119
    allocated = new MetadataOnStackBuffer();
99db666dbe8e 8056240: Investigate increased GC remark time after class unloading changes in CRM Fuse
stefank
parents: 26558
diff changeset
   120
  }
99db666dbe8e 8056240: Investigate increased GC remark time after class unloading changes in CRM Fuse
stefank
parents: 26558
diff changeset
   121
33105
294e48b4f704 8080775: Better argument formatting for assert() and friends
david
parents: 29576
diff changeset
   122
  assert(!allocated->is_full(), "Should not be full: " PTR_FORMAT, p2i(allocated));
27247
99db666dbe8e 8056240: Investigate increased GC remark time after class unloading changes in CRM Fuse
stefank
parents: 26558
diff changeset
   123
99db666dbe8e 8056240: Investigate increased GC remark time after class unloading changes in CRM Fuse
stefank
parents: 26558
diff changeset
   124
  return allocated;
99db666dbe8e 8056240: Investigate increased GC remark time after class unloading changes in CRM Fuse
stefank
parents: 26558
diff changeset
   125
}
99db666dbe8e 8056240: Investigate increased GC remark time after class unloading changes in CRM Fuse
stefank
parents: 26558
diff changeset
   126
15430
7c35f12cf1e5 8006040: NPG: on_stack processing wastes space in ConstantPool
coleenp
parents:
diff changeset
   127
// Record which objects are marked so we can unmark the same objects.
29576
c223b0a9872e 8061205: MetadataOnStackMark only needs to walk code cache during class redefinition
coleenp
parents: 27247
diff changeset
   128
void MetadataOnStackMark::record(Metadata* m) {
15430
7c35f12cf1e5 8006040: NPG: on_stack processing wastes space in ConstantPool
coleenp
parents:
diff changeset
   129
  assert(_is_active, "metadata on stack marking is active");
27247
99db666dbe8e 8056240: Investigate increased GC remark time after class unloading changes in CRM Fuse
stefank
parents: 26558
diff changeset
   130
29576
c223b0a9872e 8061205: MetadataOnStackMark only needs to walk code cache during class redefinition
coleenp
parents: 27247
diff changeset
   131
  MetadataOnStackBuffer* buffer = _current_buffer;
27247
99db666dbe8e 8056240: Investigate increased GC remark time after class unloading changes in CRM Fuse
stefank
parents: 26558
diff changeset
   132
99db666dbe8e 8056240: Investigate increased GC remark time after class unloading changes in CRM Fuse
stefank
parents: 26558
diff changeset
   133
  if (buffer != NULL && buffer->is_full()) {
99db666dbe8e 8056240: Investigate increased GC remark time after class unloading changes in CRM Fuse
stefank
parents: 26558
diff changeset
   134
    retire_buffer(buffer);
99db666dbe8e 8056240: Investigate increased GC remark time after class unloading changes in CRM Fuse
stefank
parents: 26558
diff changeset
   135
    buffer = NULL;
99db666dbe8e 8056240: Investigate increased GC remark time after class unloading changes in CRM Fuse
stefank
parents: 26558
diff changeset
   136
  }
99db666dbe8e 8056240: Investigate increased GC remark time after class unloading changes in CRM Fuse
stefank
parents: 26558
diff changeset
   137
99db666dbe8e 8056240: Investigate increased GC remark time after class unloading changes in CRM Fuse
stefank
parents: 26558
diff changeset
   138
  if (buffer == NULL) {
99db666dbe8e 8056240: Investigate increased GC remark time after class unloading changes in CRM Fuse
stefank
parents: 26558
diff changeset
   139
    buffer = allocate_buffer();
29576
c223b0a9872e 8061205: MetadataOnStackMark only needs to walk code cache during class redefinition
coleenp
parents: 27247
diff changeset
   140
    _current_buffer = buffer;
27247
99db666dbe8e 8056240: Investigate increased GC remark time after class unloading changes in CRM Fuse
stefank
parents: 26558
diff changeset
   141
  }
99db666dbe8e 8056240: Investigate increased GC remark time after class unloading changes in CRM Fuse
stefank
parents: 26558
diff changeset
   142
99db666dbe8e 8056240: Investigate increased GC remark time after class unloading changes in CRM Fuse
stefank
parents: 26558
diff changeset
   143
  buffer->push(m);
15430
7c35f12cf1e5 8006040: NPG: on_stack processing wastes space in ConstantPool
coleenp
parents:
diff changeset
   144
}