diff src/share/vm/runtime/os.hpp @ 12117:f92b82d454fa

8014135: The JVMTI specification does not conform to recent changes in JNI specification Summary: Added support for statically linked agents Reviewed-by: sspitsyn, bobv, coleenp
author bpittore
date Fri, 23 Aug 2013 20:33:02 -0400
parents af21010d1062
children 62f527c674d2
line wrap: on
line diff
--- a/src/share/vm/runtime/os.hpp	Fri Aug 23 03:14:54 2013 -0700
+++ b/src/share/vm/runtime/os.hpp	Fri Aug 23 20:33:02 2013 -0400
@@ -46,6 +46,8 @@
 # include <setjmp.h>
 #endif
 
+class AgentLibrary;
+
 // os defines the interface to operating system; this includes traditional
 // OS services (time, I/O) as well as other functionality with system-
 // dependent code.
@@ -537,6 +539,17 @@
   // Unload library
   static void  dll_unload(void *lib);
 
+  // Return the handle of this process
+  static void* get_default_process_handle();
+
+  // Check for static linked agent library
+  static bool find_builtin_agent(AgentLibrary *agent_lib, const char *syms[],
+                                 size_t syms_len);
+
+  // Find agent entry point
+  static void *find_agent_function(AgentLibrary *agent_lib, bool check_lib,
+                                   const char *syms[], size_t syms_len);
+
   // Print out system information; they are called by fatal error handler.
   // Output format may be different on different platforms.
   static void print_os_info(outputStream* st);
@@ -806,6 +819,11 @@
   // ResumeThread call)
   static void pause();
 
+  // Builds a platform dependent Agent_OnLoad_<libname> function name
+  // which is used to find statically linked in agents.
+  static char*  build_agent_function_name(const char *sym, const char *cname,
+                                          bool is_absolute_path);
+
   class SuspendedThreadTaskContext {
   public:
     SuspendedThreadTaskContext(Thread* thread, void *ucontext) : _thread(thread), _ucontext(ucontext) {}