< prev index next >

src/share/vm/interpreter/linkResolver.cpp

Print this page
rev 13113 : imported patch 8181917-refactor-ul-logstream


  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "classfile/defaultMethods.hpp"
  27 #include "classfile/javaClasses.hpp"
  28 #include "classfile/symbolTable.hpp"
  29 #include "classfile/systemDictionary.hpp"
  30 #include "classfile/vmSymbols.hpp"
  31 #include "compiler/compileBroker.hpp"
  32 #include "gc/shared/collectedHeap.inline.hpp"
  33 #include "interpreter/bytecode.hpp"
  34 #include "interpreter/interpreterRuntime.hpp"
  35 #include "interpreter/linkResolver.hpp"
  36 #include "logging/log.hpp"

  37 #include "memory/resourceArea.hpp"
  38 #include "memory/universe.inline.hpp"
  39 #include "oops/instanceKlass.hpp"
  40 #include "oops/method.hpp"
  41 #include "oops/objArrayOop.hpp"
  42 #include "oops/oop.inline.hpp"
  43 #include "prims/methodHandles.hpp"
  44 #include "prims/nativeLookup.hpp"
  45 #include "runtime/compilationPolicy.hpp"
  46 #include "runtime/fieldDescriptor.hpp"
  47 #include "runtime/frame.inline.hpp"
  48 #include "runtime/handles.inline.hpp"
  49 #include "runtime/reflection.hpp"
  50 #include "runtime/signature.hpp"
  51 #include "runtime/thread.inline.hpp"
  52 #include "runtime/vmThread.hpp"
  53 
  54 
  55 //------------------------------------------------------------------------------------------------------------------------
  56 // Implementation of CallInfo


 748                                resolved_klass,
 749                                resolved_method->method_holder(),
 750                                resolved_method,
 751                                CHECK_NULL);
 752 
 753     // check loader constraints
 754     check_method_loader_constraints(link_info, resolved_method, "method", CHECK_NULL);
 755   }
 756 
 757   return resolved_method;
 758 }
 759 
 760 static void trace_method_resolution(const char* prefix,
 761                                     Klass* klass,
 762                                     Klass* resolved_klass,
 763                                     const methodHandle& method,
 764                                     bool logitables,
 765                                     int index = -1) {
 766 #ifndef PRODUCT
 767   ResourceMark rm;




 768   outputStream* st;
 769   if (logitables) {
 770     st = Log(itables)::trace_stream();
 771   } else {
 772     st = Log(vtables)::trace_stream();
 773   }
 774   st->print("%s%s, compile-time-class:%s, method:%s, method_holder:%s, access_flags: ",
 775             prefix,
 776             (klass == NULL ? "<NULL>" : klass->internal_name()),
 777             (resolved_klass == NULL ? "<NULL>" : resolved_klass->internal_name()),
 778             Method::name_and_sig_as_C_string(resolved_klass,
 779                                              method->name(),
 780                                              method->signature()),
 781             method->method_holder()->internal_name());
 782   method->print_linkage_flags(st);
 783   if (index != -1) {
 784     st->print("vtable_index:%d", index);
 785   }
 786   st->cr();
 787 #endif // PRODUCT
 788 }
 789 
 790 // Do linktime resolution of a method in the interface within the context of the specied bytecode.
 791 methodHandle LinkResolver::resolve_interface_method(const LinkInfo& link_info, Bytecodes::Code code, TRAPS) {
 792 




  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "classfile/defaultMethods.hpp"
  27 #include "classfile/javaClasses.hpp"
  28 #include "classfile/symbolTable.hpp"
  29 #include "classfile/systemDictionary.hpp"
  30 #include "classfile/vmSymbols.hpp"
  31 #include "compiler/compileBroker.hpp"
  32 #include "gc/shared/collectedHeap.inline.hpp"
  33 #include "interpreter/bytecode.hpp"
  34 #include "interpreter/interpreterRuntime.hpp"
  35 #include "interpreter/linkResolver.hpp"
  36 #include "logging/log.hpp"
  37 #include "logging/logStream.hpp"
  38 #include "memory/resourceArea.hpp"
  39 #include "memory/universe.inline.hpp"
  40 #include "oops/instanceKlass.hpp"
  41 #include "oops/method.hpp"
  42 #include "oops/objArrayOop.hpp"
  43 #include "oops/oop.inline.hpp"
  44 #include "prims/methodHandles.hpp"
  45 #include "prims/nativeLookup.hpp"
  46 #include "runtime/compilationPolicy.hpp"
  47 #include "runtime/fieldDescriptor.hpp"
  48 #include "runtime/frame.inline.hpp"
  49 #include "runtime/handles.inline.hpp"
  50 #include "runtime/reflection.hpp"
  51 #include "runtime/signature.hpp"
  52 #include "runtime/thread.inline.hpp"
  53 #include "runtime/vmThread.hpp"
  54 
  55 
  56 //------------------------------------------------------------------------------------------------------------------------
  57 // Implementation of CallInfo


 749                                resolved_klass,
 750                                resolved_method->method_holder(),
 751                                resolved_method,
 752                                CHECK_NULL);
 753 
 754     // check loader constraints
 755     check_method_loader_constraints(link_info, resolved_method, "method", CHECK_NULL);
 756   }
 757 
 758   return resolved_method;
 759 }
 760 
 761 static void trace_method_resolution(const char* prefix,
 762                                     Klass* klass,
 763                                     Klass* resolved_klass,
 764                                     const methodHandle& method,
 765                                     bool logitables,
 766                                     int index = -1) {
 767 #ifndef PRODUCT
 768   ResourceMark rm;
 769   Log(itables) logi;
 770   LogStream lsi(logi.trace());
 771   Log(vtables) logv;
 772   LogStream lsv(logv.trace());
 773   outputStream* st;
 774   if (logitables) {
 775     st = &lsi;
 776   } else {
 777     st = &lsv;
 778   }
 779   st->print("%s%s, compile-time-class:%s, method:%s, method_holder:%s, access_flags: ",
 780             prefix,
 781             (klass == NULL ? "<NULL>" : klass->internal_name()),
 782             (resolved_klass == NULL ? "<NULL>" : resolved_klass->internal_name()),
 783             Method::name_and_sig_as_C_string(resolved_klass,
 784                                              method->name(),
 785                                              method->signature()),
 786             method->method_holder()->internal_name());
 787   method->print_linkage_flags(st);
 788   if (index != -1) {
 789     st->print("vtable_index:%d", index);
 790   }
 791   st->cr();
 792 #endif // PRODUCT
 793 }
 794 
 795 // Do linktime resolution of a method in the interface within the context of the specied bytecode.
 796 methodHandle LinkResolver::resolve_interface_method(const LinkInfo& link_info, Bytecodes::Code code, TRAPS) {
 797 


< prev index next >