Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Enumerations | Functions
trace_probe.h File Reference
#include <linux/seq_file.h>
#include <linux/slab.h>
#include <linux/smp.h>
#include <linux/debugfs.h>
#include <linux/types.h>
#include <linux/string.h>
#include <linux/ctype.h>
#include <linux/ptrace.h>
#include <linux/perf_event.h>
#include <linux/kprobes.h>
#include <linux/stringify.h>
#include <linux/limits.h>
#include <linux/uaccess.h>
#include <asm/bitsperlong.h>
#include "trace.h"
#include "trace_output.h"

Go to the source code of this file.

Data Structures

struct  fetch_type
 
struct  fetch_param
 
struct  probe_arg
 

Macros

#define MAX_TRACE_ARGS   128
 
#define MAX_ARGSTR_LEN   63
 
#define MAX_EVENT_NAME_LEN   64
 
#define MAX_STRING_SIZE   PATH_MAX
 
#define FIELD_STRING_IP   "__probe_ip"
 
#define FIELD_STRING_RETIP   "__probe_ret_ip"
 
#define FIELD_STRING_FUNC   "__probe_func"
 
#define DEFINE_FIELD(type, item, name, is_signed)
 
#define TP_FLAG_TRACE   1
 
#define TP_FLAG_PROFILE   2
 
#define TP_FLAG_REGISTERED   4
 
#define TP_FLAG_UPROBE   8
 
#define make_data_rloc(len, roffs)   (((u32)(len) << 16) | ((u32)(roffs) & 0xffff))
 
#define get_rloc_len(dl)   ((u32)(dl) >> 16)
 
#define get_rloc_offs(dl)   ((u32)(dl) & 0xffff)
 
#define convert_rloc_to_loc(dl, offs)   ((u32)(dl) + (offs))
 

Typedefs

typedef void(* fetch_func_t )(struct pt_regs *, void *, void *)
 
typedef int(* print_type_func_t )(struct trace_seq *, const char *, void *, void *)
 

Enumerations

enum  {
  FETCH_MTD_reg = 0, FETCH_MTD_stack, FETCH_MTD_retval, FETCH_MTD_memory,
  FETCH_MTD_symbol, FETCH_MTD_deref, FETCH_MTD_bitfield, FETCH_MTD_END
}
 

Functions

int traceprobe_parse_probe_arg (char *arg, ssize_t *size, struct probe_arg *parg, bool is_return, bool is_kprobe)
 
int traceprobe_conflict_field_name (const char *name, struct probe_arg *args, int narg)
 
void traceprobe_update_arg (struct probe_arg *arg)
 
void traceprobe_free_probe_arg (struct probe_arg *arg)
 
int traceprobe_split_symbol_offset (char *symbol, unsigned long *offset)
 
ssize_t traceprobe_probes_write (struct file *file, const char __user *buffer, size_t count, loff_t *ppos, int(*createfn)(int, char **))
 
int traceprobe_command (const char *buf, int(*createfn)(int, char **))
 

Macro Definition Documentation

#define convert_rloc_to_loc (   dl,
  offs 
)    ((u32)(dl) + (offs))

Definition at line 83 of file trace_probe.h.

#define DEFINE_FIELD (   type,
  item,
  name,
  is_signed 
)
Value:
do { \
ret = trace_define_field(event_call, #type, name, \
sizeof(field.item), is_signed, \
if (ret) \
return ret; \
} while (0)

Definition at line 54 of file trace_probe.h.

#define FIELD_STRING_FUNC   "__probe_func"

Definition at line 51 of file trace_probe.h.

#define FIELD_STRING_IP   "__probe_ip"

Definition at line 49 of file trace_probe.h.

#define FIELD_STRING_RETIP   "__probe_ret_ip"

Definition at line 50 of file trace_probe.h.

#define get_rloc_len (   dl)    ((u32)(dl) >> 16)

Definition at line 75 of file trace_probe.h.

#define get_rloc_offs (   dl)    ((u32)(dl) & 0xffff)

Definition at line 76 of file trace_probe.h.

#define make_data_rloc (   len,
  roffs 
)    (((u32)(len) << 16) | ((u32)(roffs) & 0xffff))

Definition at line 73 of file trace_probe.h.

#define MAX_ARGSTR_LEN   63

Definition at line 44 of file trace_probe.h.

#define MAX_EVENT_NAME_LEN   64

Definition at line 45 of file trace_probe.h.

#define MAX_STRING_SIZE   PATH_MAX

Definition at line 46 of file trace_probe.h.

#define MAX_TRACE_ARGS   128

Definition at line 43 of file trace_probe.h.

#define TP_FLAG_PROFILE   2

Definition at line 67 of file trace_probe.h.

#define TP_FLAG_REGISTERED   4

Definition at line 68 of file trace_probe.h.

#define TP_FLAG_TRACE   1

Definition at line 66 of file trace_probe.h.

#define TP_FLAG_UPROBE   8

Definition at line 69 of file trace_probe.h.

Typedef Documentation

typedef void(* fetch_func_t)(struct pt_regs *, void *, void *)

Definition at line 86 of file trace_probe.h.

typedef int(* print_type_func_t)(struct trace_seq *, const char *, void *, void *)

Definition at line 88 of file trace_probe.h.

Enumeration Type Documentation

anonymous enum
Enumerator:
FETCH_MTD_reg 
FETCH_MTD_stack 
FETCH_MTD_retval 
FETCH_MTD_memory 
FETCH_MTD_symbol 
FETCH_MTD_deref 
FETCH_MTD_bitfield 
FETCH_MTD_END 

Definition at line 91 of file trace_probe.h.

Function Documentation

int traceprobe_command ( const char buf,
int(*)(int, char **)  createfn 
)

Definition at line 766 of file trace_probe.c.

int traceprobe_conflict_field_name ( const char name,
struct probe_arg args,
int  narg 
)

Definition at line 727 of file trace_probe.c.

void traceprobe_free_probe_arg ( struct probe_arg arg)

Definition at line 753 of file trace_probe.c.

int traceprobe_parse_probe_arg ( char arg,
ssize_t size,
struct probe_arg parg,
bool  is_return,
bool  is_kprobe 
)

Definition at line 685 of file trace_probe.c.

ssize_t traceprobe_probes_write ( struct file file,
const char __user buffer,
size_t  count,
loff_t *  ppos,
int(*)(int, char **)  createfn 
)

Definition at line 787 of file trace_probe.c.

int traceprobe_split_symbol_offset ( char symbol,
unsigned long offset 
)

Definition at line 494 of file trace_probe.c.

void traceprobe_update_arg ( struct probe_arg arg)

Definition at line 743 of file trace_probe.c.