Mercurial > hg > truffle
comparison src/share/vm/c1/c1_InstructionPrinter.cpp @ 6725:da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
Summary: Remove PermGen, allocate meta-data in metaspace linked to class loaders, rewrite GC walking, rewrite and rename metadata to be C++ classes
Reviewed-by: jmasa, stefank, never, coleenp, kvn, brutisso, mgerdin, dholmes, jrose, twisti, roland
Contributed-by: jmasa <jon.masamitsu@oracle.com>, stefank <stefan.karlsson@oracle.com>, mgerdin <mikael.gerdin@oracle.com>, never <tom.rodriguez@oracle.com>
author | coleenp |
---|---|
date | Sat, 01 Sep 2012 13:25:18 -0400 |
parents | 1d7922586cf6 |
children | 7eca5de9e0b6 |
comparison
equal
deleted
inserted
replaced
6724:36d1d483d5d6 | 6725:da91efe96a93 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
131 ciObject* value = type->as_ObjectConstant()->value(); | 131 ciObject* value = type->as_ObjectConstant()->value(); |
132 if (value->is_null_object()) { | 132 if (value->is_null_object()) { |
133 output()->print("null"); | 133 output()->print("null"); |
134 } else if (!value->is_loaded()) { | 134 } else if (!value->is_loaded()) { |
135 output()->print("<unloaded object " PTR_FORMAT ">", value); | 135 output()->print("<unloaded object " PTR_FORMAT ">", value); |
136 } else if (value->is_method()) { | |
137 ciMethod* m = (ciMethod*)value; | |
138 output()->print("<method %s.%s>", m->holder()->name()->as_utf8(), m->name()->as_utf8()); | |
139 } else { | 136 } else { |
140 output()->print("<object " PTR_FORMAT " klass=", value->constant_encoding()); | 137 output()->print("<object " PTR_FORMAT " klass=", value->constant_encoding()); |
141 print_klass(value->klass()); | 138 print_klass(value->klass()); |
142 output()->print(">"); | 139 output()->print(">"); |
143 } | 140 } |
157 if (!klass->is_loaded()) { | 154 if (!klass->is_loaded()) { |
158 output()->print("<unloaded> "); | 155 output()->print("<unloaded> "); |
159 } | 156 } |
160 output()->print("class "); | 157 output()->print("class "); |
161 print_klass(klass); | 158 print_klass(klass); |
159 } else if (type->as_MethodConstant() != NULL) { | |
160 ciMethod* m = type->as_MethodConstant()->value(); | |
161 output()->print("<method %s.%s>", m->holder()->name()->as_utf8(), m->name()->as_utf8()); | |
162 } else { | 162 } else { |
163 output()->print("???"); | 163 output()->print("???"); |
164 } | 164 } |
165 } | 165 } |
166 | 166 |
459 | 459 |
460 void InstructionPrinter::do_TypeCast(TypeCast* x) { | 460 void InstructionPrinter::do_TypeCast(TypeCast* x) { |
461 output()->print("type_cast("); | 461 output()->print("type_cast("); |
462 print_value(x->obj()); | 462 print_value(x->obj()); |
463 output()->print(") "); | 463 output()->print(") "); |
464 print_klass(x->declared_type()->klass()); | 464 if (x->declared_type()->is_klass()) |
465 print_klass(x->declared_type()->as_klass()); | |
466 else | |
467 output()->print(type2name(x->declared_type()->basic_type())); | |
465 } | 468 } |
466 | 469 |
467 | 470 |
468 void InstructionPrinter::do_Invoke(Invoke* x) { | 471 void InstructionPrinter::do_Invoke(Invoke* x) { |
469 if (x->receiver() != NULL) { | 472 if (x->receiver() != NULL) { |