Linux Perf
jitdump.c File Reference
#include <sys/sysmacros.h>
#include <sys/types.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <unistd.h>
#include <inttypes.h>
#include <byteswap.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <linux/stringify.h>
#include "util.h"
#include "event.h"
#include "debug.h"
#include "evlist.h"
#include "symbol.h"
#include <elf.h>
#include "tsc.h"
#include "session.h"
#include "jit.h"
#include "jitdump.h"
#include "genelf.h"
#include "../builtin.h"
#include "sane_ctype.h"
Include dependency graph for jitdump.c:

Go to the source code of this file.

Classes

struct  jit_buf_desc
 
struct  debug_line_info
 
struct  jit_tool
 

Macros

#define hmax(a, b)   ((a) > (b) ? (a) : (b))
 
#define get_jit_tool(t)   (container_of(tool, struct jit_tool, tool))
 

Functions

static int jit_emit_elf (char *filename, const char *sym, uint64_t code_addr, const void *code, int csize, void *debug, int nr_debug_entries, void *unwinding, uint32_t unwinding_header_size, uint32_t unwinding_size)
 
static void jit_close (struct jit_buf_desc *jd)
 
static int jit_validate_events (struct perf_session *session)
 
static int jit_open (struct jit_buf_desc *jd, const char *name)
 
static union jr_entryjit_get_next_entry (struct jit_buf_desc *jd)
 
static int jit_inject_event (struct jit_buf_desc *jd, union perf_event *event)
 
static uint64_t convert_timestamp (struct jit_buf_desc *jd, uint64_t timestamp)
 
static int jit_repipe_code_load (struct jit_buf_desc *jd, union jr_entry *jr)
 
static int jit_repipe_code_move (struct jit_buf_desc *jd, union jr_entry *jr)
 
static int jit_repipe_debug_info (struct jit_buf_desc *jd, union jr_entry *jr)
 
static int jit_repipe_unwinding_info (struct jit_buf_desc *jd, union jr_entry *jr)
 
static int jit_process_dump (struct jit_buf_desc *jd)
 
static int jit_inject (struct jit_buf_desc *jd, char *path)
 
static int jit_detect (char *mmap_name, pid_t pid)
 
int jit_process (struct perf_session *session, struct perf_data *output, struct machine *machine, char *filename, pid_t pid, u64 *nbytes)
 

Macro Definition Documentation

◆ get_jit_tool

#define get_jit_tool (   t)    (container_of(tool, struct jit_tool, tool))

Definition at line 70 of file jitdump.c.

◆ hmax

#define hmax (   a,
 
)    ((a) > (b) ? (a) : (b))

Definition at line 69 of file jitdump.c.

Function Documentation

◆ convert_timestamp()

static uint64_t convert_timestamp ( struct jit_buf_desc jd,
uint64_t  timestamp 
)
static

Definition at line 368 of file jitdump.c.

Here is the call graph for this function:

◆ jit_close()

static void jit_close ( struct jit_buf_desc jd)
static

Definition at line 107 of file jitdump.c.

◆ jit_detect()

static int jit_detect ( char *  mmap_name,
pid_t  pid 
)
static

Definition at line 699 of file jitdump.c.

◆ jit_emit_elf()

static int jit_emit_elf ( char *  filename,
const char *  sym,
uint64_t  code_addr,
const void *  code,
int  csize,
void *  debug,
int  nr_debug_entries,
void *  unwinding,
uint32_t  unwinding_header_size,
uint32_t  unwinding_size 
)
static

Definition at line 73 of file jitdump.c.

Here is the call graph for this function:

◆ jit_get_next_entry()

static union jr_entry* jit_get_next_entry ( struct jit_buf_desc jd)
static

Definition at line 239 of file jitdump.c.

Here is the call graph for this function:

◆ jit_inject()

static int jit_inject ( struct jit_buf_desc jd,
char *  path 
)
static

Definition at line 672 of file jitdump.c.

Here is the call graph for this function:

◆ jit_inject_event()

static int jit_inject_event ( struct jit_buf_desc jd,
union perf_event event 
)
static

Definition at line 356 of file jitdump.c.

Here is the call graph for this function:

◆ jit_open()

static int jit_open ( struct jit_buf_desc jd,
const char *  name 
)
static

Definition at line 132 of file jitdump.c.

Here is the call graph for this function:

◆ jit_process()

int jit_process ( struct perf_session session,
struct perf_data output,
struct machine machine,
char *  filename,
pid_t  pid,
u64 *  nbytes 
)

Definition at line 754 of file jitdump.c.

Here is the call graph for this function:

◆ jit_process_dump()

static int jit_process_dump ( struct jit_buf_desc jd)
static

Definition at line 644 of file jitdump.c.

Here is the call graph for this function:

◆ jit_repipe_code_load()

static int jit_repipe_code_load ( struct jit_buf_desc jd,
union jr_entry jr 
)
static

Definition at line 385 of file jitdump.c.

Here is the call graph for this function:

◆ jit_repipe_code_move()

static int jit_repipe_code_move ( struct jit_buf_desc jd,
union jr_entry jr 
)
static

Definition at line 503 of file jitdump.c.

Here is the call graph for this function:

◆ jit_repipe_debug_info()

static int jit_repipe_debug_info ( struct jit_buf_desc jd,
union jr_entry jr 
)
static

Definition at line 592 of file jitdump.c.

Here is the call graph for this function:

◆ jit_repipe_unwinding_info()

static int jit_repipe_unwinding_info ( struct jit_buf_desc jd,
union jr_entry jr 
)
static

Definition at line 619 of file jitdump.c.

Here is the call graph for this function:

◆ jit_validate_events()

static int jit_validate_events ( struct perf_session session)
static

Definition at line 117 of file jitdump.c.