152 bool is_absolute_path() const { return _is_absolute_path; } |
153 bool is_absolute_path() const { return _is_absolute_path; } |
153 void* os_lib() const { return _os_lib; } |
154 void* os_lib() const { return _os_lib; } |
154 void set_os_lib(void* os_lib) { _os_lib = os_lib; } |
155 void set_os_lib(void* os_lib) { _os_lib = os_lib; } |
155 AgentLibrary* next() const { return _next; } |
156 AgentLibrary* next() const { return _next; } |
156 bool is_static_lib() const { return _is_static_lib; } |
157 bool is_static_lib() const { return _is_static_lib; } |
|
158 bool is_instrument_lib() const { return _is_instrument_lib; } |
157 void set_static_lib(bool is_static_lib) { _is_static_lib = is_static_lib; } |
159 void set_static_lib(bool is_static_lib) { _is_static_lib = is_static_lib; } |
158 bool valid() { return (_state == agent_valid); } |
160 bool valid() { return (_state == agent_valid); } |
159 void set_valid() { _state = agent_valid; } |
161 void set_valid() { _state = agent_valid; } |
160 void set_invalid() { _state = agent_invalid; } |
162 void set_invalid() { _state = agent_invalid; } |
161 |
163 |
162 // Constructor |
164 // Constructor |
163 AgentLibrary(const char* name, const char* options, bool is_absolute_path, void* os_lib); |
165 AgentLibrary(const char* name, const char* options, bool is_absolute_path, |
|
166 void* os_lib, bool instrument_lib=false); |
164 }; |
167 }; |
165 |
168 |
166 // maintain an order of entry list of AgentLibrary |
169 // maintain an order of entry list of AgentLibrary |
167 class AgentLibraryList VALUE_OBJ_CLASS_SPEC { |
170 class AgentLibraryList VALUE_OBJ_CLASS_SPEC { |
168 private: |
171 private: |
335 static void add_init_library(const char* name, char* options); |
338 static void add_init_library(const char* name, char* options); |
336 |
339 |
337 // -agentlib and -agentpath arguments |
340 // -agentlib and -agentpath arguments |
338 static AgentLibraryList _agentList; |
341 static AgentLibraryList _agentList; |
339 static void add_init_agent(const char* name, char* options, bool absolute_path); |
342 static void add_init_agent(const char* name, char* options, bool absolute_path); |
|
343 static void add_instrument_agent(const char* name, char* options, bool absolute_path); |
340 |
344 |
341 // Late-binding agents not started via arguments |
345 // Late-binding agents not started via arguments |
342 static void add_loaded_agent(AgentLibrary *agentLib); |
346 static void add_loaded_agent(AgentLibrary *agentLib); |
343 static void add_loaded_agent(const char* name, char* options, bool absolute_path, void* os_lib); |
347 static void add_loaded_agent(const char* name, char* options, bool absolute_path, void* os_lib); |
344 |
348 |