#include <iostream>
#include <map>
#include <string>
#include <cstring>
#include <stdexcept>
#include <cerrno>
#include <stdint.h>
#include <jvmpi.h>
#include <opagent.h>
Go to the source code of this file.
Data Structures | |
class | class_details |
Functions | |
void | class_load (JVMPI_Event *event) |
void | class_unload (JVMPI_Event *event) |
void | compiled_method_load (JVMPI_Event *event) |
void | compiled_method_unload (JVMPI_Event *event) |
void | jvm_shutdown (JVMPI_Event *event) |
void | jvm_notify_event (JVMPI_Event *event) |
JNIEXPORT jint JNICALL | JVM_OnLoad (JavaVM *jvm, char *options, void *reserved) |
Variables | |
static bool | debug = false |
static op_agent_t | agent_hdl |
static pthread_mutex_t | class_map_mutex = PTHREAD_MUTEX_INITIALIZER |
static map< jobjectID, class_details > | loaded_classes |
JVMPI_Interface * | jvmpi |
JVMPI agent implementation to report jitted JVM code to OProfile
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Copyright IBM Corporation 2007
Definition in file jvmpi_oprofile.cpp.
void class_load | ( | JVMPI_Event * | event | ) |
Definition at line 56 of file jvmpi_oprofile.cpp.
References class_map_mutex, loaded_classes, class_details::method_names, class_details::method_signatures, and class_details::name.
Referenced by jvm_notify_event().
void class_unload | ( | JVMPI_Event * | event | ) |
Definition at line 74 of file jvmpi_oprofile.cpp.
References class_map_mutex, and loaded_classes.
Referenced by jvm_notify_event().
void compiled_method_load | ( | JVMPI_Event * | event | ) |
Definition at line 83 of file jvmpi_oprofile.cpp.
References agent_hdl, buf, class_map_mutex, debug, jvmpi, loaded_classes, class_details::method_names, class_details::method_signatures, class_details::name, and op_write_native_code().
Referenced by jvm_notify_event().
void compiled_method_unload | ( | JVMPI_Event * | event | ) |
Definition at line 140 of file jvmpi_oprofile.cpp.
References agent_hdl, debug, and op_unload_native_code().
Referenced by jvm_notify_event().
void jvm_notify_event | ( | JVMPI_Event * | event | ) |
Definition at line 163 of file jvmpi_oprofile.cpp.
References class_load(), class_unload(), compiled_method_load(), compiled_method_unload(), and jvm_shutdown().
Referenced by JVM_OnLoad().
JNIEXPORT jint JNICALL JVM_OnLoad | ( | JavaVM * | jvm, | |
char * | options, | |||
void * | reserved | |||
) |
Definition at line 187 of file jvmpi_oprofile.cpp.
References agent_hdl, debug, jvm_notify_event(), jvmpi, op_major_version(), op_minor_version(), and op_open_agent().
void jvm_shutdown | ( | JVMPI_Event * | event | ) |
Definition at line 152 of file jvmpi_oprofile.cpp.
References agent_hdl, and op_close_agent().
Referenced by jvm_notify_event().
op_agent_t agent_hdl [static] |
Definition at line 43 of file jvmpi_oprofile.cpp.
Referenced by compiled_method_load(), compiled_method_unload(), JVM_OnLoad(), and jvm_shutdown().
pthread_mutex_t class_map_mutex = PTHREAD_MUTEX_INITIALIZER [static] |
Definition at line 53 of file jvmpi_oprofile.cpp.
Referenced by class_load(), class_unload(), and compiled_method_load().
bool debug = false [static] |
Definition at line 42 of file jvmpi_oprofile.cpp.
Referenced by _add_jitdumps_to_deletion_list(), _cleanup_jitdumps(), Agent_OnLoad(), cb_compiled_method_load(), cb_compiled_method_unload(), cb_dynamic_code_generated(), compiled_method_load(), compiled_method_unload(), create_debug_line_info(), create_section(), create_text_section(), eliminate_overlaps(), fill_sections(), fill_symtab(), fill_text_section_content(), handle_overlap_region(), invalidate_entry(), JVM_OnLoad(), main(), op_process_jit_dumpfiles(), parse_code_load(), parse_code_unload(), parse_entries(), parse_header(), process_jit_dumpfile(), resolve_overlaps(), scan_overlaps(), and split_entry().
JVMPI_Interface* jvmpi |
Definition at line 81 of file jvmpi_oprofile.cpp.
Referenced by compiled_method_load(), and JVM_OnLoad().
map<jobjectID, class_details> loaded_classes [static] |
Definition at line 54 of file jvmpi_oprofile.cpp.
Referenced by class_load(), class_unload(), and compiled_method_load().