30 #include "classfile/stringTable.hpp"
31 #include "classfile/systemDictionary.hpp"
32 #include "classfile/verifier.hpp"
33 #include "classfile/vmSymbols.hpp"
34 #include "interpreter/linkResolver.hpp"
35 #include "memory/oopFactory.hpp"
36 #include "memory/resourceArea.hpp"
37 #include "memory/universe.hpp"
38 #include "oops/instanceKlass.hpp"
39 #include "oops/objArrayKlass.hpp"
40 #include "oops/objArrayOop.inline.hpp"
41 #include "oops/oop.inline.hpp"
42 #include "oops/typeArrayOop.inline.hpp"
43 #include "prims/jvmtiExport.hpp"
44 #include "runtime/arguments.hpp"
45 #include "runtime/handles.inline.hpp"
46 #include "runtime/javaCalls.hpp"
47 #include "runtime/reflection.hpp"
48 #include "runtime/reflectionUtils.hpp"
49 #include "runtime/signature.hpp"
50 #include "runtime/vframe.hpp"
51
52 static void trace_class_resolution(const Klass* to_class) {
53 ResourceMark rm;
54 int line_number = -1;
55 const char * source_file = NULL;
56 Klass* caller = NULL;
57 JavaThread* jthread = JavaThread::current();
58 if (jthread->has_last_Java_frame()) {
59 vframeStream vfst(jthread);
60 // skip over any frames belonging to java.lang.Class
61 while (!vfst.at_end() &&
62 vfst.method()->method_holder()->name() == vmSymbols::java_lang_Class()) {
63 vfst.next();
64 }
65 if (!vfst.at_end()) {
66 // this frame is a likely suspect
67 caller = vfst.method()->method_holder();
68 line_number = vfst.method()->line_number_from_bci(vfst.bci());
69 Symbol* s = vfst.method()->method_holder()->source_file_name();
70 if (s != NULL) {
|
30 #include "classfile/stringTable.hpp"
31 #include "classfile/systemDictionary.hpp"
32 #include "classfile/verifier.hpp"
33 #include "classfile/vmSymbols.hpp"
34 #include "interpreter/linkResolver.hpp"
35 #include "memory/oopFactory.hpp"
36 #include "memory/resourceArea.hpp"
37 #include "memory/universe.hpp"
38 #include "oops/instanceKlass.hpp"
39 #include "oops/objArrayKlass.hpp"
40 #include "oops/objArrayOop.inline.hpp"
41 #include "oops/oop.inline.hpp"
42 #include "oops/typeArrayOop.inline.hpp"
43 #include "prims/jvmtiExport.hpp"
44 #include "runtime/arguments.hpp"
45 #include "runtime/handles.inline.hpp"
46 #include "runtime/javaCalls.hpp"
47 #include "runtime/reflection.hpp"
48 #include "runtime/reflectionUtils.hpp"
49 #include "runtime/signature.hpp"
50 #include "runtime/vframe.inline.hpp"
51
52 static void trace_class_resolution(const Klass* to_class) {
53 ResourceMark rm;
54 int line_number = -1;
55 const char * source_file = NULL;
56 Klass* caller = NULL;
57 JavaThread* jthread = JavaThread::current();
58 if (jthread->has_last_Java_frame()) {
59 vframeStream vfst(jthread);
60 // skip over any frames belonging to java.lang.Class
61 while (!vfst.at_end() &&
62 vfst.method()->method_holder()->name() == vmSymbols::java_lang_Class()) {
63 vfst.next();
64 }
65 if (!vfst.at_end()) {
66 // this frame is a likely suspect
67 caller = vfst.method()->method_holder();
68 line_number = vfst.method()->line_number_from_bci(vfst.bci());
69 Symbol* s = vfst.method()->method_holder()->source_file_name();
70 if (s != NULL) {
|