src/share/vm/oops/metadata.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/oops

src/share/vm/oops/metadata.cpp

Print this page




  25 #include "precompiled.hpp"
  26 #include "oops/metadata.hpp"
  27 #include "memory/metaspace.hpp"
  28 #include "memory/resourceArea.hpp"
  29 #include "prims/jvmtiRedefineClasses.hpp"
  30 
  31 void Metadata::set_on_stack(const bool value) {
  32   // nothing to set for most metadata
  33   // Can't inline because this materializes the vtable on some C++ compilers.
  34 }
  35 
  36 void Metadata::print_on(outputStream* st) const {
  37   ResourceMark rm;
  38   // print title
  39   st->print("%s", internal_name());
  40   print_address_on(st);
  41   st->cr();
  42 }
  43 
  44 char* Metadata::print_value_string() const {
  45   char buf[100];
  46   stringStream st(buf, sizeof(buf));
  47   if (this == NULL) {
  48     st.print("NULL");
  49   } else {
  50     print_value_on(&st);
  51   }
  52   return st.as_string();
  53 }


  25 #include "precompiled.hpp"
  26 #include "oops/metadata.hpp"
  27 #include "memory/metaspace.hpp"
  28 #include "memory/resourceArea.hpp"
  29 #include "prims/jvmtiRedefineClasses.hpp"
  30 
  31 void Metadata::set_on_stack(const bool value) {
  32   // nothing to set for most metadata
  33   // Can't inline because this materializes the vtable on some C++ compilers.
  34 }
  35 
  36 void Metadata::print_on(outputStream* st) const {
  37   ResourceMark rm;
  38   // print title
  39   st->print("%s", internal_name());
  40   print_address_on(st);
  41   st->cr();
  42 }
  43 
  44 char* Metadata::print_value_string() const {
  45   char buf[256];
  46   stringStream st(buf, sizeof(buf));
  47   if (this == NULL) {
  48     st.print("NULL");
  49   } else {
  50     print_value_on(&st);
  51   }
  52   return st.as_string();
  53 }
src/share/vm/oops/metadata.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File