src/share/vm/utilities/xmlstream.cpp

changeset 4037
da91efe96a93
parent 3900
d2a62e0f25eb
child 6680
78bbf4d43a14
     1.1 --- a/src/share/vm/utilities/xmlstream.cpp	Fri Aug 31 16:39:35 2012 -0700
     1.2 +++ b/src/share/vm/utilities/xmlstream.cpp	Sat Sep 01 13:25:18 2012 -0400
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
     1.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8   *
     1.9   * This code is free software; you can redistribute it and/or modify it
    1.10 @@ -26,8 +26,8 @@
    1.11  #include "code/nmethod.hpp"
    1.12  #include "memory/allocation.hpp"
    1.13  #include "memory/allocation.inline.hpp"
    1.14 -#include "oops/methodDataOop.hpp"
    1.15 -#include "oops/methodOop.hpp"
    1.16 +#include "oops/methodData.hpp"
    1.17 +#include "oops/method.hpp"
    1.18  #include "oops/oop.inline.hpp"
    1.19  #include "runtime/deoptimization.hpp"
    1.20  #include "runtime/vmThread.hpp"
    1.21 @@ -379,7 +379,7 @@
    1.22    print(" iicount='%d'", method->interpreter_invocation_count());
    1.23    int throwouts = method->interpreter_throwout_count();
    1.24    if (throwouts != 0)  print(" throwouts='%d'", throwouts);
    1.25 -  methodDataOop mdo = method->method_data();
    1.26 +  MethodData* mdo = method->method_data();
    1.27    if (mdo != NULL) {
    1.28      uint cnt;
    1.29      cnt = mdo->decompile_count();
    1.30 @@ -399,7 +399,7 @@
    1.31    assert_if_no_error(inside_attrs(), "printing attributes");
    1.32    if (method.is_null())  return;
    1.33    //method->print_short_name(text());
    1.34 -  method->method_holder()->klass_part()->name()->print_symbol_on(text());
    1.35 +  method->method_holder()->name()->print_symbol_on(text());
    1.36    print_raw(" ");  // " " is easier for tools to parse than "::"
    1.37    method->name()->print_symbol_on(text());
    1.38    print_raw(" ");  // separator
    1.39 @@ -442,7 +442,7 @@
    1.40  
    1.41  void xmlStream::object(const char* attr, Handle x) {
    1.42    assert_if_no_error(inside_attrs(), "printing attributes");
    1.43 -  if (x.is_null())  return;
    1.44 +  if (x == NULL)  return;
    1.45    print_raw(" ");
    1.46    print_raw(attr);
    1.47    print_raw("='");
    1.48 @@ -452,14 +452,31 @@
    1.49  
    1.50  void xmlStream::object_text(Handle x) {
    1.51    assert_if_no_error(inside_attrs(), "printing attributes");
    1.52 -  if (x.is_null())  return;
    1.53 +  if (x == NULL)  return;
    1.54 +  x->print_value_on(text());
    1.55 +}
    1.56 +
    1.57 +
    1.58 +void xmlStream::object(const char* attr, Metadata* x) {
    1.59 +  assert_if_no_error(inside_attrs(), "printing attributes");
    1.60 +  if (x == NULL)  return;
    1.61 +  print_raw(" ");
    1.62 +  print_raw(attr);
    1.63 +  print_raw("='");
    1.64 +  object_text(x);
    1.65 +  print_raw("'");
    1.66 +}
    1.67 +
    1.68 +void xmlStream::object_text(Metadata* x) {
    1.69 +  assert_if_no_error(inside_attrs(), "printing attributes");
    1.70 +  if (x == NULL)  return;
    1.71    //x->print_value_on(text());
    1.72    if (x->is_method())
    1.73 -    method_text(methodOop(x()));
    1.74 +    method_text((Method*)x);
    1.75    else if (x->is_klass())
    1.76 -    klass_text(klassOop(x()));
    1.77 +    klass_text((Klass*)x);
    1.78    else
    1.79 -    x->print_value_on(text());
    1.80 +    ShouldNotReachHere(); // Add impl if this is reached.
    1.81  }
    1.82  
    1.83  

mercurial