Chapter 2. The JIT support API

Table of Contents

1. op_open_agent
2. op_close_agent
3. op_write_native_code
4. op_write_debug_line_info
5. op_unload_native_code

This chapter describes the JIT support API. See opagent.h for more details.

1. op_open_agent

Initializes the agent library.
#include <opagent.h>
op_agent_t op_open_agent(); 
void;
 

Description

This function must be called by agents before any other function. Creates and opens a JIT dump file in /var/lib/oprofile/jitdump using the naming convention <process_id>.dump.

Parameters

None

Return value

Returns a valid op_agent_t handle or NULL. If NULL is returned, errno is set to indicate the nature of the error. For a list of possible errno values, see the man pages for:

stat, creat, gettimeofday, fdopen, fwrite