annotate hotspot/src/share/vm/oops/metadata.cpp @ 42650:1f304d0c888b

8171008: Integrate AOT compiler into JDK Reviewed-by: erikj, mchung, psandoz, coleenp, iklam, stefank, simonis Contributed-by: Bharadwaj Yadavalli <bharadwaj.yadavalli@oracle.com>, Christian Thalinger <cthalinger@twitter.com>, Dean Long <dean.long@oracle.com>, Dmitrij Pochepko <dmitrij.pochepko@oracle.com>, Dmitry Chuyko <dmitry.chuyko@oracle.com>, Doug Simon <doug.simon@oracle.com>, Eric Caspole <eric.caspole@oracle.com>, Igor Ignatyev <igor.ignatyev@oracle.com>, Igor Veresov <igor.veresov@oracle.com>, John Rose <john.r.rose@oracle.com>, Morris Meyer <morris.meyer@oracle.com>, Niclas Adlertz <niclas.adlertz@oracle.com>, Rickard Backman <rickard.backman@oracle.com>
author kvn
date Sun, 11 Dec 2016 19:07:04 -0800
parents 882756847a04
children
rev   line source
coleenp@13728 1 /*
coleenp@13728 2 * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
coleenp@13728 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
coleenp@13728 4 *
coleenp@13728 5 * This code is free software; you can redistribute it and/or modify it
coleenp@13728 6 * under the terms of the GNU General Public License version 2 only, as
coleenp@13728 7 * published by the Free Software Foundation.
coleenp@13728 8 *
coleenp@13728 9 * This code is distributed in the hope that it will be useful, but WITHOUT
coleenp@13728 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
coleenp@13728 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
coleenp@13728 12 * version 2 for more details (a copy is included in the LICENSE file that
coleenp@13728 13 * accompanied this code).
coleenp@13728 14 *
coleenp@13728 15 * You should have received a copy of the GNU General Public License version
coleenp@13728 16 * 2 along with this work; if not, write to the Free Software Foundation,
coleenp@13728 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
coleenp@13728 18 *
coleenp@13728 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
coleenp@13728 20 * or visit www.oracle.com if you need additional information or have any
coleenp@13728 21 * questions.
coleenp@13728 22 *
coleenp@13728 23 */
coleenp@13728 24
coleenp@13728 25 #include "precompiled.hpp"
coleenp@13728 26 #include "oops/metadata.hpp"
coleenp@13728 27 #include "memory/metaspace.hpp"
coleenp@13728 28 #include "memory/resourceArea.hpp"
coleenp@13728 29 #include "prims/jvmtiRedefineClasses.hpp"
coleenp@13728 30
coleenp@13728 31 void Metadata::set_on_stack(const bool value) {
coleenp@13728 32 // nothing to set for most metadata
coleenp@13728 33 // Can't inline because this materializes the vtable on some C++ compilers.
coleenp@13728 34 }
coleenp@13728 35
coleenp@13728 36 void Metadata::print_on(outputStream* st) const {
coleenp@13728 37 ResourceMark rm;
coleenp@13728 38 // print title
coleenp@13728 39 st->print("%s", internal_name());
coleenp@13728 40 print_address_on(st);
coleenp@13728 41 st->cr();
coleenp@13728 42 }
coleenp@13728 43
coleenp@13728 44 char* Metadata::print_value_string() const {
kvn@42650 45 char buf[256];
coleenp@13728 46 stringStream st(buf, sizeof(buf));
coleenp@13728 47 if (this == NULL) {
coleenp@13728 48 st.print("NULL");
coleenp@13728 49 } else {
coleenp@13728 50 print_value_on(&st);
coleenp@13728 51 }
coleenp@13728 52 return st.as_string();
coleenp@13728 53 }