24
25 #include "precompiled.hpp"
26 #include "classfile/systemDictionary.hpp"
27 #include "interpreter/interpreter.hpp"
28 #include "jvmtifiles/jvmtiEnv.hpp"
29 #include "memory/resourceArea.hpp"
30 #include "oops/instanceKlass.hpp"
31 #include "prims/jvmtiAgentThread.hpp"
32 #include "prims/jvmtiEventController.inline.hpp"
33 #include "prims/jvmtiImpl.hpp"
34 #include "prims/jvmtiRedefineClasses.hpp"
35 #include "runtime/atomic.hpp"
36 #include "runtime/deoptimization.hpp"
37 #include "runtime/handles.hpp"
38 #include "runtime/handles.inline.hpp"
39 #include "runtime/interfaceSupport.hpp"
40 #include "runtime/javaCalls.hpp"
41 #include "runtime/os.hpp"
42 #include "runtime/serviceThread.hpp"
43 #include "runtime/signature.hpp"
44 #include "runtime/vframe.hpp"
45 #include "runtime/vframe_hp.hpp"
46 #include "runtime/vm_operations.hpp"
47 #include "utilities/exceptions.hpp"
48 #ifdef TARGET_OS_FAMILY_linux
49 # include "thread_linux.inline.hpp"
50 #endif
51 #ifdef TARGET_OS_FAMILY_solaris
52 # include "thread_solaris.inline.hpp"
53 #endif
54 #ifdef TARGET_OS_FAMILY_windows
55 # include "thread_windows.inline.hpp"
56 #endif
57 #ifdef TARGET_OS_FAMILY_bsd
58 # include "thread_bsd.inline.hpp"
59 #endif
60
61 //
62 // class JvmtiAgentThread
63 //
64 // JavaThread used to wrap a thread started by an agent
65 // using the JVMTI method RunAgentThread.
66 //
67
68 JvmtiAgentThread::JvmtiAgentThread(JvmtiEnv* env, jvmtiStartFunction start_fn, const void *start_arg)
69 : JavaThread(start_function_wrapper) {
70 _env = env;
71 _start_fn = start_fn;
72 _start_arg = start_arg;
73 }
74
75 void
76 JvmtiAgentThread::start_function_wrapper(JavaThread *thread, TRAPS) {
77 // It is expected that any Agent threads will be created as
78 // Java Threads. If this is the case, notification of the creation
79 // of the thread is given in JavaThread::thread_main().
|
24
25 #include "precompiled.hpp"
26 #include "classfile/systemDictionary.hpp"
27 #include "interpreter/interpreter.hpp"
28 #include "jvmtifiles/jvmtiEnv.hpp"
29 #include "memory/resourceArea.hpp"
30 #include "oops/instanceKlass.hpp"
31 #include "prims/jvmtiAgentThread.hpp"
32 #include "prims/jvmtiEventController.inline.hpp"
33 #include "prims/jvmtiImpl.hpp"
34 #include "prims/jvmtiRedefineClasses.hpp"
35 #include "runtime/atomic.hpp"
36 #include "runtime/deoptimization.hpp"
37 #include "runtime/handles.hpp"
38 #include "runtime/handles.inline.hpp"
39 #include "runtime/interfaceSupport.hpp"
40 #include "runtime/javaCalls.hpp"
41 #include "runtime/os.hpp"
42 #include "runtime/serviceThread.hpp"
43 #include "runtime/signature.hpp"
44 #include "runtime/thread.inline.hpp"
45 #include "runtime/vframe.hpp"
46 #include "runtime/vframe_hp.hpp"
47 #include "runtime/vm_operations.hpp"
48 #include "utilities/exceptions.hpp"
49
50 //
51 // class JvmtiAgentThread
52 //
53 // JavaThread used to wrap a thread started by an agent
54 // using the JVMTI method RunAgentThread.
55 //
56
57 JvmtiAgentThread::JvmtiAgentThread(JvmtiEnv* env, jvmtiStartFunction start_fn, const void *start_arg)
58 : JavaThread(start_function_wrapper) {
59 _env = env;
60 _start_fn = start_fn;
61 _start_arg = start_arg;
62 }
63
64 void
65 JvmtiAgentThread::start_function_wrapper(JavaThread *thread, TRAPS) {
66 // It is expected that any Agent threads will be created as
67 // Java Threads. If this is the case, notification of the creation
68 // of the thread is given in JavaThread::thread_main().
|