Mercurial > hg > truffle
comparison src/share/vm/opto/output.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 | f7cd53cedd78 |
children | 137868b7aa6f |
comparison
equal
deleted
inserted
replaced
6724:36d1d483d5d6 | 6725:da91efe96a93 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1998, 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. |
624 if (sv == NULL) { | 624 if (sv == NULL) { |
625 ciKlass* cik = t->is_oopptr()->klass(); | 625 ciKlass* cik = t->is_oopptr()->klass(); |
626 assert(cik->is_instance_klass() || | 626 assert(cik->is_instance_klass() || |
627 cik->is_array_klass(), "Not supported allocation."); | 627 cik->is_array_klass(), "Not supported allocation."); |
628 sv = new ObjectValue(spobj->_idx, | 628 sv = new ObjectValue(spobj->_idx, |
629 new ConstantOopWriteValue(cik->constant_encoding())); | 629 new ConstantOopWriteValue(cik->java_mirror()->constant_encoding())); |
630 Compile::set_sv_for_object_node(objs, sv); | 630 Compile::set_sv_for_object_node(objs, sv); |
631 | 631 |
632 uint first_ind = spobj->first_index(); | 632 uint first_ind = spobj->first_index(); |
633 for (uint i = 0; i < spobj->n_fields(); i++) { | 633 for (uint i = 0; i < spobj->n_fields(); i++) { |
634 Node* fld_node = sfpt->in(first_ind+i); | 634 Node* fld_node = sfpt->in(first_ind+i); |
713 break; | 713 break; |
714 case Type::AnyPtr: | 714 case Type::AnyPtr: |
715 array->append(new ConstantOopWriteValue(NULL)); | 715 array->append(new ConstantOopWriteValue(NULL)); |
716 break; | 716 break; |
717 case Type::AryPtr: | 717 case Type::AryPtr: |
718 case Type::InstPtr: | 718 case Type::InstPtr: // fall through |
719 case Type::KlassPtr: // fall through | |
720 array->append(new ConstantOopWriteValue(t->isa_oopptr()->const_oop()->constant_encoding())); | 719 array->append(new ConstantOopWriteValue(t->isa_oopptr()->const_oop()->constant_encoding())); |
721 break; | 720 break; |
722 case Type::NarrowOop: | 721 case Type::NarrowOop: |
723 if (t == TypeNarrowOop::NULL_PTR) { | 722 if (t == TypeNarrowOop::NULL_PTR) { |
724 array->append(new ConstantOopWriteValue(NULL)); | 723 array->append(new ConstantOopWriteValue(NULL)); |
900 const Type *t = obj_node->bottom_type(); | 899 const Type *t = obj_node->bottom_type(); |
901 ciKlass* cik = t->is_oopptr()->klass(); | 900 ciKlass* cik = t->is_oopptr()->klass(); |
902 assert(cik->is_instance_klass() || | 901 assert(cik->is_instance_klass() || |
903 cik->is_array_klass(), "Not supported allocation."); | 902 cik->is_array_klass(), "Not supported allocation."); |
904 ObjectValue* sv = new ObjectValue(spobj->_idx, | 903 ObjectValue* sv = new ObjectValue(spobj->_idx, |
905 new ConstantOopWriteValue(cik->constant_encoding())); | 904 new ConstantOopWriteValue(cik->java_mirror()->constant_encoding())); |
906 Compile::set_sv_for_object_node(objs, sv); | 905 Compile::set_sv_for_object_node(objs, sv); |
907 | 906 |
908 uint first_ind = spobj->first_index(); | 907 uint first_ind = spobj->first_index(); |
909 for (uint i = 0; i < spobj->n_fields(); i++) { | 908 for (uint i = 0; i < spobj->n_fields(); i++) { |
910 Node* fld_node = sfn->in(first_ind+i); | 909 Node* fld_node = sfn->in(first_ind+i); |
1656 xtty->head("opto_assembly compile_id='%d'%s", compile_id(), | 1655 xtty->head("opto_assembly compile_id='%d'%s", compile_id(), |
1657 is_osr_compilation() ? " compile_kind='osr'" : | 1656 is_osr_compilation() ? " compile_kind='osr'" : |
1658 ""); | 1657 ""); |
1659 } | 1658 } |
1660 if (method() != NULL) { | 1659 if (method() != NULL) { |
1661 method()->print_oop(); | 1660 method()->print_metadata(); |
1662 print_codes(); | |
1663 } | 1661 } |
1664 dump_asm(node_offsets, node_offset_limit); | 1662 dump_asm(node_offsets, node_offset_limit); |
1665 if (xtty != NULL) { | 1663 if (xtty != NULL) { |
1666 xtty->tail("opto_assembly"); | 1664 xtty->tail("opto_assembly"); |
1667 } | 1665 } |