hotspot/src/share/vm/oops/methodDataKlass.cpp
author coleenp
Sun, 13 Apr 2008 17:43:42 -0400
changeset 360 21d113ecbf6a
parent 1 489c9b5090e2
child 670 ddf3e9583f2f
permissions -rw-r--r--
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes Summary: Compressed oops in instances, arrays, and headers. Code contributors are coleenp, phh, never, swamyv Reviewed-by: jmasa, kamg, acorn, tbell, kvn, rasbold
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     1
/*
489c9b5090e2 Initial load
duke
parents:
diff changeset
     2
 * Copyright 2000-2006 Sun Microsystems, Inc.  All Rights Reserved.
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
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    19
 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    20
 * CA 95054 USA or visit www.sun.com if you need additional information or
489c9b5090e2 Initial load
duke
parents:
diff changeset
    21
 * have any questions.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    22
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    23
 */
489c9b5090e2 Initial load
duke
parents:
diff changeset
    24
489c9b5090e2 Initial load
duke
parents:
diff changeset
    25
# include "incls/_precompiled.incl"
489c9b5090e2 Initial load
duke
parents:
diff changeset
    26
# include "incls/_methodDataKlass.cpp.incl"
489c9b5090e2 Initial load
duke
parents:
diff changeset
    27
489c9b5090e2 Initial load
duke
parents:
diff changeset
    28
klassOop methodDataKlass::create_klass(TRAPS) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    29
  methodDataKlass o;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    30
  KlassHandle h_this_klass(THREAD, Universe::klassKlassObj());
489c9b5090e2 Initial load
duke
parents:
diff changeset
    31
  KlassHandle k = base_create_klass(h_this_klass, header_size(),
489c9b5090e2 Initial load
duke
parents:
diff changeset
    32
                                    o.vtbl_value(), CHECK_NULL);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    33
  // Make sure size calculation is right
489c9b5090e2 Initial load
duke
parents:
diff changeset
    34
  assert(k()->size() == align_object_size(header_size()),
489c9b5090e2 Initial load
duke
parents:
diff changeset
    35
         "wrong size for object");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    36
  return k();
489c9b5090e2 Initial load
duke
parents:
diff changeset
    37
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
    38
489c9b5090e2 Initial load
duke
parents:
diff changeset
    39
489c9b5090e2 Initial load
duke
parents:
diff changeset
    40
int methodDataKlass::oop_size(oop obj) const {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    41
  assert(obj->is_methodData(), "must be method data oop");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    42
  return methodDataOop(obj)->object_size();
489c9b5090e2 Initial load
duke
parents:
diff changeset
    43
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
    44
489c9b5090e2 Initial load
duke
parents:
diff changeset
    45
489c9b5090e2 Initial load
duke
parents:
diff changeset
    46
bool methodDataKlass::oop_is_parsable(oop obj) const {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    47
  assert(obj->is_methodData(), "must be method data oop");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    48
  return methodDataOop(obj)->object_is_parsable();
489c9b5090e2 Initial load
duke
parents:
diff changeset
    49
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
    50
489c9b5090e2 Initial load
duke
parents:
diff changeset
    51
489c9b5090e2 Initial load
duke
parents:
diff changeset
    52
methodDataOop methodDataKlass::allocate(methodHandle method, TRAPS) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    53
  int size = methodDataOopDesc::compute_allocation_size_in_words(method);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    54
  KlassHandle h_k(THREAD, as_klassOop());
489c9b5090e2 Initial load
duke
parents:
diff changeset
    55
  methodDataOop mdo =
489c9b5090e2 Initial load
duke
parents:
diff changeset
    56
    (methodDataOop)CollectedHeap::permanent_obj_allocate(h_k, size, CHECK_NULL);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    57
  assert(!mdo->is_parsable(), "not expecting parsability yet.");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    58
  No_Safepoint_Verifier no_safepoint;  // init function atomic wrt GC
489c9b5090e2 Initial load
duke
parents:
diff changeset
    59
  mdo->initialize(method);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    60
489c9b5090e2 Initial load
duke
parents:
diff changeset
    61
  assert(mdo->is_parsable(), "should be parsable here.");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    62
  assert(size == mdo->object_size(), "wrong size for methodDataOop");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    63
  return mdo;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    64
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
    65
489c9b5090e2 Initial load
duke
parents:
diff changeset
    66
489c9b5090e2 Initial load
duke
parents:
diff changeset
    67
void methodDataKlass::oop_follow_contents(oop obj) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    68
  assert (obj->is_methodData(), "object must be method data");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    69
  methodDataOop m = methodDataOop(obj);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    70
489c9b5090e2 Initial load
duke
parents:
diff changeset
    71
  obj->follow_header();
489c9b5090e2 Initial load
duke
parents:
diff changeset
    72
  MarkSweep::mark_and_push(m->adr_method());
489c9b5090e2 Initial load
duke
parents:
diff changeset
    73
  ResourceMark rm;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    74
  for (ProfileData* data = m->first_data();
489c9b5090e2 Initial load
duke
parents:
diff changeset
    75
       m->is_valid(data);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    76
       data = m->next_data(data)) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    77
    data->follow_contents();
489c9b5090e2 Initial load
duke
parents:
diff changeset
    78
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    79
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
    80
489c9b5090e2 Initial load
duke
parents:
diff changeset
    81
#ifndef SERIALGC
489c9b5090e2 Initial load
duke
parents:
diff changeset
    82
void methodDataKlass::oop_follow_contents(ParCompactionManager* cm,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    83
                                          oop obj) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    84
  assert (obj->is_methodData(), "object must be method data");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    85
  methodDataOop m = methodDataOop(obj);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    86
489c9b5090e2 Initial load
duke
parents:
diff changeset
    87
  obj->follow_header(cm);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    88
  PSParallelCompact::mark_and_push(cm, m->adr_method());
489c9b5090e2 Initial load
duke
parents:
diff changeset
    89
  ResourceMark rm;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    90
  for (ProfileData* data = m->first_data();
489c9b5090e2 Initial load
duke
parents:
diff changeset
    91
       m->is_valid(data);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    92
       data = m->next_data(data)) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    93
    data->follow_contents(cm);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    94
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    95
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
    96
#endif // SERIALGC
489c9b5090e2 Initial load
duke
parents:
diff changeset
    97
360
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
    98
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    99
int methodDataKlass::oop_oop_iterate(oop obj, OopClosure* blk) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   100
  assert (obj->is_methodData(), "object must be method data");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   101
  methodDataOop m = methodDataOop(obj);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   102
  // Get size before changing pointers
489c9b5090e2 Initial load
duke
parents:
diff changeset
   103
  // Don't call size() or oop_size() since that is a virtual call.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   104
  int size = m->object_size();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   105
489c9b5090e2 Initial load
duke
parents:
diff changeset
   106
  obj->oop_iterate_header(blk);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   107
  blk->do_oop(m->adr_method());
489c9b5090e2 Initial load
duke
parents:
diff changeset
   108
  ResourceMark rm;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   109
  for (ProfileData* data = m->first_data();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   110
       m->is_valid(data);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   111
       data = m->next_data(data)) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   112
    data->oop_iterate(blk);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   113
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   114
  return size;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   115
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   116
489c9b5090e2 Initial load
duke
parents:
diff changeset
   117
int methodDataKlass::oop_oop_iterate_m(oop obj, OopClosure* blk, MemRegion mr) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   118
  assert (obj->is_methodData(), "object must be method data");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   119
  methodDataOop m = methodDataOop(obj);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   120
  // Get size before changing pointers
489c9b5090e2 Initial load
duke
parents:
diff changeset
   121
  // Don't call size() or oop_size() since that is a virtual call.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   122
  int size = m->object_size();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   123
489c9b5090e2 Initial load
duke
parents:
diff changeset
   124
  obj->oop_iterate_header(blk, mr);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   125
  oop* adr = m->adr_method();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   126
  if (mr.contains(adr)) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   127
    blk->do_oop(m->adr_method());
489c9b5090e2 Initial load
duke
parents:
diff changeset
   128
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   129
  ResourceMark rm;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   130
  for (ProfileData* data = m->first_data();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   131
       m->is_valid(data);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   132
       data = m->next_data(data)) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   133
    data->oop_iterate_m(blk, mr);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   134
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   135
  return size;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   136
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   137
489c9b5090e2 Initial load
duke
parents:
diff changeset
   138
int methodDataKlass::oop_adjust_pointers(oop obj) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   139
  assert(obj->is_methodData(), "should be method data");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   140
  methodDataOop m = methodDataOop(obj);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   141
  // Get size before changing pointers
489c9b5090e2 Initial load
duke
parents:
diff changeset
   142
  // Don't call size() or oop_size() since that is a virtual call.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   143
  int size = m->object_size();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   144
489c9b5090e2 Initial load
duke
parents:
diff changeset
   145
  obj->adjust_header();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   146
  MarkSweep::adjust_pointer(m->adr_method());
489c9b5090e2 Initial load
duke
parents:
diff changeset
   147
  ResourceMark rm;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   148
  ProfileData* data;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   149
  for (data = m->first_data(); m->is_valid(data); data = m->next_data(data)) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   150
    data->adjust_pointers();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   151
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   152
  return size;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   153
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   154
489c9b5090e2 Initial load
duke
parents:
diff changeset
   155
489c9b5090e2 Initial load
duke
parents:
diff changeset
   156
#ifndef SERIALGC
489c9b5090e2 Initial load
duke
parents:
diff changeset
   157
void methodDataKlass::oop_copy_contents(PSPromotionManager* pm, oop obj) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   158
  assert (obj->is_methodData(), "object must be method data");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   159
  methodDataOop m = methodDataOop(obj);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   160
  // This should never point into the young gen.
360
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   161
  assert(!PSScavenge::should_scavenge(m->adr_method()), "Sanity");
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   162
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   163
489c9b5090e2 Initial load
duke
parents:
diff changeset
   164
void methodDataKlass::oop_push_contents(PSPromotionManager* pm, oop obj) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   165
  assert (obj->is_methodData(), "object must be method data");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   166
  methodDataOop m = methodDataOop(obj);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   167
  // This should never point into the young gen.
360
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   168
  assert(!PSScavenge::should_scavenge(m->adr_method()), "Sanity");
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   169
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   170
489c9b5090e2 Initial load
duke
parents:
diff changeset
   171
int methodDataKlass::oop_update_pointers(ParCompactionManager* cm, oop obj) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   172
  assert(obj->is_methodData(), "should be method data");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   173
  methodDataOop m = methodDataOop(obj);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   174
489c9b5090e2 Initial load
duke
parents:
diff changeset
   175
  PSParallelCompact::adjust_pointer(m->adr_method());
489c9b5090e2 Initial load
duke
parents:
diff changeset
   176
489c9b5090e2 Initial load
duke
parents:
diff changeset
   177
  ResourceMark rm;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   178
  ProfileData* data;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   179
  for (data = m->first_data(); m->is_valid(data); data = m->next_data(data)) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   180
    data->update_pointers();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   181
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   182
  return m->object_size();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   183
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   184
489c9b5090e2 Initial load
duke
parents:
diff changeset
   185
int
489c9b5090e2 Initial load
duke
parents:
diff changeset
   186
methodDataKlass::oop_update_pointers(ParCompactionManager* cm, oop obj,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   187
                                     HeapWord* beg_addr, HeapWord* end_addr) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   188
  assert(obj->is_methodData(), "should be method data");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   189
489c9b5090e2 Initial load
duke
parents:
diff changeset
   190
  oop* p;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   191
  methodDataOop m = methodDataOop(obj);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   192
489c9b5090e2 Initial load
duke
parents:
diff changeset
   193
  p = m->adr_method();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   194
  PSParallelCompact::adjust_pointer(p, beg_addr, end_addr);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   195
489c9b5090e2 Initial load
duke
parents:
diff changeset
   196
  ResourceMark rm;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   197
  ProfileData* data;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   198
  for (data = m->first_data(); m->is_valid(data); data = m->next_data(data)) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   199
    data->update_pointers(beg_addr, end_addr);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   200
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   201
  return m->object_size();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   202
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   203
#endif // SERIALGC
489c9b5090e2 Initial load
duke
parents:
diff changeset
   204
489c9b5090e2 Initial load
duke
parents:
diff changeset
   205
#ifndef PRODUCT
489c9b5090e2 Initial load
duke
parents:
diff changeset
   206
489c9b5090e2 Initial load
duke
parents:
diff changeset
   207
// Printing
489c9b5090e2 Initial load
duke
parents:
diff changeset
   208
void methodDataKlass::oop_print_on(oop obj, outputStream* st) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   209
  assert(obj->is_methodData(), "should be method data");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   210
  methodDataOop m = methodDataOop(obj);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   211
  st->print("method data for ");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   212
  m->method()->print_value_on(st);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   213
  st->cr();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   214
  m->print_data_on(st);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   215
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   216
489c9b5090e2 Initial load
duke
parents:
diff changeset
   217
void methodDataKlass::oop_print_value_on(oop obj, outputStream* st) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   218
  assert(obj->is_methodData(), "should be method data");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   219
  methodDataOop m = methodDataOop(obj);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   220
  st->print("method data for ");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   221
  m->method()->print_value_on(st);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   222
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   223
489c9b5090e2 Initial load
duke
parents:
diff changeset
   224
#endif // !PRODUCT
489c9b5090e2 Initial load
duke
parents:
diff changeset
   225
489c9b5090e2 Initial load
duke
parents:
diff changeset
   226
const char* methodDataKlass::internal_name() const {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   227
  return "{method data}";
489c9b5090e2 Initial load
duke
parents:
diff changeset
   228
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   229
489c9b5090e2 Initial load
duke
parents:
diff changeset
   230
489c9b5090e2 Initial load
duke
parents:
diff changeset
   231
// Verification
489c9b5090e2 Initial load
duke
parents:
diff changeset
   232
void methodDataKlass::oop_verify_on(oop obj, outputStream* st) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   233
  Klass::oop_verify_on(obj, st);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   234
  guarantee(obj->is_methodData(), "object must be method data");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   235
  methodDataOop m = methodDataOop(obj);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   236
  guarantee(m->is_perm(), "should be in permspace");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   237
  m->verify_data_on(st);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   238
}