jvmpi_oprofile.cpp File Reference

#include <iostream>
#include <map>
#include <string>
#include <cstring>
#include <stdexcept>
#include <cerrno>
#include <stdint.h>
#include <jvmpi.h>
#include <opagent.h>
Include dependency graph for jvmpi_oprofile.cpp:

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

Detailed Description

JVMPI agent implementation to report jitted JVM code to OProfile

Remarks:
Copyright 2007 OProfile authors

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

Author:
Maynard Johnson

Copyright IBM Corporation 2007

Definition in file jvmpi_oprofile.cpp.


Function Documentation

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().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

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]
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().


Generated on 8 Nov 2012 for Oprofile by  doxygen 1.6.1