Linux Perf
libjvmti.c File Reference
#include <linux/compiler.h>
#include <sys/types.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <err.h>
#include <jvmti.h>
#include <jvmticmlr.h>
#include <limits.h>
#include "jvmti_agent.h"
Include dependency graph for libjvmti.c:

Go to the source code of this file.

Functions

static void print_error (jvmtiEnv *jvmti, const char *msg, jvmtiError ret)
 
static jvmtiError do_get_line_numbers (jvmtiEnv *jvmti, void *pc, jmethodID m, jint bci, jvmti_line_info_t *tab, jint *nr)
 
static jvmtiError get_line_numbers (jvmtiEnv *jvmti, const void *compile_info, jvmti_line_info_t **tab, int *nr_lines)
 
static void copy_class_filename (const char *class_sign, const char *file_name, char *result, size_t max_length)
 
static jvmtiError get_source_filename (jvmtiEnv *jvmti, jmethodID methodID, char **buffer)
 
static jvmtiError fill_source_filenames (jvmtiEnv *jvmti, int nr_lines, const jvmti_line_info_t *line_tab, char **file_names)
 
static void JNICALL compiled_method_load_cb (jvmtiEnv *jvmti, jmethodID method, jint code_size, void const *code_addr, jint map_length, jvmtiAddrLocationMap const *map, const void *compile_info)
 
static void JNICALL code_generated_cb (jvmtiEnv *jvmti, char const *name, void const *code_addr, jint code_size)
 
JNIEXPORT jint JNICALL Agent_OnLoad (JavaVM *jvm, char *options, void *reserved __maybe_unused)
 
JNIEXPORT void JNICALL Agent_OnUnload (JavaVM *jvm __maybe_unused)
 

Variables

static int has_line_numbers
 
void * jvmti_agent
 

Function Documentation

◆ Agent_OnLoad()

JNIEXPORT jint JNICALL Agent_OnLoad ( JavaVM *  jvm,
char *  options,
void *reserved  __maybe_unused 
)

Definition at line 340 of file libjvmti.c.

Here is the call graph for this function:

◆ Agent_OnUnload()

JNIEXPORT void JNICALL Agent_OnUnload ( JavaVM *jvm  __maybe_unused)

Definition at line 415 of file libjvmti.c.

Here is the call graph for this function:

◆ code_generated_cb()

static void JNICALL code_generated_cb ( jvmtiEnv *  jvmti,
char const *  name,
void const *  code_addr,
jint  code_size 
)
static

Definition at line 326 of file libjvmti.c.

Here is the call graph for this function:

◆ compiled_method_load_cb()

static void JNICALL compiled_method_load_cb ( jvmtiEnv *  jvmti,
jmethodID  method,
jint  code_size,
void const *  code_addr,
jint  map_length,
jvmtiAddrLocationMap const *  map,
const void *  compile_info 
)
static

Definition at line 223 of file libjvmti.c.

Here is the call graph for this function:

◆ copy_class_filename()

static void copy_class_filename ( const char *  class_sign,
const char *  file_name,
char *  result,
size_t  max_length 
)
static

Definition at line 130 of file libjvmti.c.

◆ do_get_line_numbers()

static jvmtiError do_get_line_numbers ( jvmtiEnv *  jvmti,
void *  pc,
jmethodID  m,
jint  bci,
jvmti_line_info_t tab,
jint *  nr 
)
static

Definition at line 31 of file libjvmti.c.

Here is the call graph for this function:

◆ fill_source_filenames()

static jvmtiError fill_source_filenames ( jvmtiEnv *  jvmti,
int  nr_lines,
const jvmti_line_info_t line_tab,
char **  file_names 
)
static

Definition at line 206 of file libjvmti.c.

Here is the call graph for this function:

◆ get_line_numbers()

static jvmtiError get_line_numbers ( jvmtiEnv *  jvmti,
const void *  compile_info,
jvmti_line_info_t **  tab,
int *  nr_lines 
)
static

Definition at line 62 of file libjvmti.c.

Here is the call graph for this function:

◆ get_source_filename()

static jvmtiError get_source_filename ( jvmtiEnv *  jvmti,
jmethodID  methodID,
char **  buffer 
)
static

Definition at line 159 of file libjvmti.c.

Here is the call graph for this function:

◆ print_error()

static void print_error ( jvmtiEnv *  jvmti,
const char *  msg,
jvmtiError  ret 
)
static

Definition at line 17 of file libjvmti.c.

Variable Documentation

◆ has_line_numbers

int has_line_numbers
static

Definition at line 14 of file libjvmti.c.

◆ jvmti_agent

void* jvmti_agent

Definition at line 15 of file libjvmti.c.