Linux Perf
perf_regs.c File Reference
#include <errno.h>
#include <string.h>
#include <regex.h>
#include "../../perf.h"
#include "../../util/util.h"
#include "../../util/perf_regs.h"
#include "../../util/debug.h"
Include dependency graph for perf_regs.c:

Go to the source code of this file.

Classes

struct  sdt_name_reg
 

Macros

#define SDT_NAME_REG(n, m)   {.sdt_name = "%" #n, .uprobe_name = "%" #m}
 
#define SDT_NAME_REG_END   {.sdt_name = NULL, .uprobe_name = NULL}
 
#define SDT_OP_REGEX   "^([+\\-]?)([0-9]*)(\\(?)(%[a-z][a-z0-9]+)(\\)?)$"
 
#define SDT_REG_NAME_SIZE   6
 

Functions

static int sdt_init_op_regex (void)
 
static void sdt_rename_register (char *sdt_reg, int sdt_len, char *uprobe_reg)
 
int arch_sdt_arg_parse_op (char *old_op, char **new_op)
 

Variables

const struct sample_reg sample_reg_masks []
 
static const struct sdt_name_reg sdt_reg_tbl []
 
static regex_t sdt_op_regex
 

Macro Definition Documentation

◆ SDT_NAME_REG

#define SDT_NAME_REG (   n,
 
)    {.sdt_name = "%" #n, .uprobe_name = "%" #m}

Definition at line 41 of file perf_regs.c.

◆ SDT_NAME_REG_END

#define SDT_NAME_REG_END   {.sdt_name = NULL, .uprobe_name = NULL}

Definition at line 42 of file perf_regs.c.

◆ SDT_OP_REGEX

#define SDT_OP_REGEX   "^([+\\-]?)([0-9]*)(\\(?)(%[a-z][a-z0-9]+)(\\)?)$"

Definition at line 125 of file perf_regs.c.

◆ SDT_REG_NAME_SIZE

#define SDT_REG_NAME_SIZE   6

Definition at line 152 of file perf_regs.c.

Function Documentation

◆ arch_sdt_arg_parse_op()

int arch_sdt_arg_parse_op ( char *  old_op,
char **  new_op 
)

Definition at line 174 of file perf_regs.c.

Here is the call graph for this function:

◆ sdt_init_op_regex()

static int sdt_init_op_regex ( void  )
static

Definition at line 129 of file perf_regs.c.

◆ sdt_rename_register()

static void sdt_rename_register ( char *  sdt_reg,
int  sdt_len,
char *  uprobe_reg 
)
static

Definition at line 160 of file perf_regs.c.

Variable Documentation

◆ sample_reg_masks

const struct sample_reg sample_reg_masks[]
Initial value:
= {
SMPL_REG(AX, PERF_REG_X86_AX),
SMPL_REG(BX, PERF_REG_X86_BX),
SMPL_REG(CX, PERF_REG_X86_CX),
SMPL_REG(DX, PERF_REG_X86_DX),
SMPL_REG(SI, PERF_REG_X86_SI),
SMPL_REG(DI, PERF_REG_X86_DI),
SMPL_REG(BP, PERF_REG_X86_BP),
SMPL_REG(SP, PERF_REG_X86_SP),
SMPL_REG(IP, PERF_REG_X86_IP),
SMPL_REG(FLAGS, PERF_REG_X86_FLAGS),
SMPL_REG(CS, PERF_REG_X86_CS),
SMPL_REG(SS, PERF_REG_X86_SS),
}
#define SMPL_REG(n, b)
Definition: perf_regs.h:14
#define SMPL_REG_END
Definition: perf_regs.h:15

Definition at line 11 of file perf_regs.c.

◆ sdt_op_regex

regex_t sdt_op_regex
static

Definition at line 127 of file perf_regs.c.

◆ sdt_reg_tbl

const struct sdt_name_reg sdt_reg_tbl[]
static

Definition at line 44 of file perf_regs.c.