Mercurial > hg > graal-compiler
comparison src/share/vm/runtime/thread.cpp @ 3464:be4ca325525a
Merge.
author | Thomas Wuerthinger <thomas@wuerthinger.net> |
---|---|
date | Wed, 27 Jul 2011 17:32:44 -0700 |
parents | 8b0236cbed14 a80577f854f9 |
children | 22d11b3bc561 |
comparison
equal
deleted
inserted
replaced
3239:7c4b4daac19b | 3464:be4ca325525a |
---|---|
30 #include "code/scopeDesc.hpp" | 30 #include "code/scopeDesc.hpp" |
31 #include "compiler/compileBroker.hpp" | 31 #include "compiler/compileBroker.hpp" |
32 #include "graal/graalCompiler.hpp" | 32 #include "graal/graalCompiler.hpp" |
33 #include "interpreter/interpreter.hpp" | 33 #include "interpreter/interpreter.hpp" |
34 #include "interpreter/linkResolver.hpp" | 34 #include "interpreter/linkResolver.hpp" |
35 #include "interpreter/oopMapCache.hpp" | |
35 #include "jvmtifiles/jvmtiEnv.hpp" | 36 #include "jvmtifiles/jvmtiEnv.hpp" |
36 #include "memory/oopFactory.hpp" | 37 #include "memory/oopFactory.hpp" |
37 #include "memory/universe.inline.hpp" | 38 #include "memory/universe.inline.hpp" |
38 #include "oops/instanceKlass.hpp" | 39 #include "oops/instanceKlass.hpp" |
39 #include "oops/objArrayOop.hpp" | 40 #include "oops/objArrayOop.hpp" |
2861 tty->cr(); | 2862 tty->cr(); |
2862 } | 2863 } |
2863 } | 2864 } |
2864 | 2865 |
2865 | 2866 |
2867 #ifdef ASSERT | |
2868 // Print or validate the layout of stack frames | |
2869 void JavaThread::print_frame_layout(int depth, bool validate_only) { | |
2870 ResourceMark rm; | |
2871 PRESERVE_EXCEPTION_MARK; | |
2872 FrameValues values; | |
2873 int frame_no = 0; | |
2874 for(StackFrameStream fst(this, false); !fst.is_done(); fst.next()) { | |
2875 fst.current()->describe(values, ++frame_no); | |
2876 if (depth == frame_no) break; | |
2877 } | |
2878 if (validate_only) { | |
2879 values.validate(); | |
2880 } else { | |
2881 tty->print_cr("[Describe stack layout]"); | |
2882 values.print(); | |
2883 } | |
2884 } | |
2885 #endif | |
2886 | |
2866 void JavaThread::trace_stack_from(vframe* start_vf) { | 2887 void JavaThread::trace_stack_from(vframe* start_vf) { |
2867 ResourceMark rm; | 2888 ResourceMark rm; |
2868 int vframe_no = 1; | 2889 int vframe_no = 1; |
2869 for (vframe* f = start_vf; f; f = f->sender() ) { | 2890 for (vframe* f = start_vf; f; f = f->sender() ) { |
2870 if (f->is_java_frame()) { | 2891 if (f->is_java_frame()) { |
2924 _task = NULL; | 2945 _task = NULL; |
2925 _queue = queue; | 2946 _queue = queue; |
2926 _counters = counters; | 2947 _counters = counters; |
2927 _is_compiling = false; | 2948 _is_compiling = false; |
2928 _buffer_blob = NULL; | 2949 _buffer_blob = NULL; |
2950 _scanned_nmethod = NULL; | |
2929 | 2951 |
2930 #ifndef PRODUCT | 2952 #ifndef PRODUCT |
2931 _ideal_graph_printer = NULL; | 2953 _ideal_graph_printer = NULL; |
2932 #endif | 2954 #endif |
2933 } | 2955 } |
2934 | 2956 |
2957 void CompilerThread::oops_do(OopClosure* f, CodeBlobClosure* cf) { | |
2958 JavaThread::oops_do(f, cf); | |
2959 if (_scanned_nmethod != NULL && cf != NULL) { | |
2960 // Safepoints can occur when the sweeper is scanning an nmethod so | |
2961 // process it here to make sure it isn't unloaded in the middle of | |
2962 // a scan. | |
2963 cf->do_code_blob(_scanned_nmethod); | |
2964 } | |
2965 } | |
2935 | 2966 |
2936 // ======= Threads ======== | 2967 // ======= Threads ======== |
2937 | 2968 |
2938 // The Threads class links together all active threads, and provides | 2969 // The Threads class links together all active threads, and provides |
2939 // operations over all threads. It is protected by its own Mutex | 2970 // operations over all threads. It is protected by its own Mutex |