src/share/vm/runtime/os.hpp

Print this page

        

@@ -44,10 +44,12 @@
 #ifdef TARGET_OS_FAMILY_bsd
 # include "jvm_bsd.h"
 # 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.
 
 typedef void (*dll_func)(...);

@@ -535,10 +537,21 @@
   static void* dll_lookup(void* handle, const char* name);
 
   // Unload library
   static void  dll_unload(void *lib);
 
+  // return the handle of this process
+  static void* getDefaultProcessHandle();
+
+  // Check for static linked agent library
+  static bool findBuiltinAgent(AgentLibrary *agentLib, const char *syms[],
+                               size_t symsLen);
+
+  // Find agent entry point
+  static void *findAgentFunction(AgentLibrary *agentLib, bool checkLib,
+                                 const char *syms[], size_t symsLen);
+
   // 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);
   static void print_os_info_brief(outputStream* st);
   static void print_cpu_info(outputStream* st);

@@ -804,10 +817,15 @@
   // Causes the VM to wait until an external stimulus has been applied
   // (for Unix, that stimulus is a signal, for Windows, an external
   // 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*  buildAgentFunctionName(const char *sym, const char *cname,
+                                       bool is_absolute_path);
+ 
   class SuspendedThreadTaskContext {
   public:
     SuspendedThreadTaskContext(Thread* thread, void *ucontext) : _thread(thread), _ucontext(ucontext) {}
     Thread* thread() const { return _thread; }
     void* ucontext() const { return _ucontext; }