Linux Perf
perf-hooks.h File Reference
#include "perf-hooks-list.h"
Include dependency graph for perf-hooks.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  perf_hook_desc
 

Macros

#define PERF_HOOK(name)
 

Typedefs

typedef void(* perf_hook_func_t) (void *ctx)
 

Functions

void perf_hooks__invoke (const struct perf_hook_desc *)
 
void perf_hooks__recover (void)
 
int perf_hooks__set_hook (const char *hook_name, perf_hook_func_t hook_func, void *hook_ctx)
 
perf_hook_func_t perf_hooks__get_hook (const char *hook_name)
 

Macro Definition Documentation

◆ PERF_HOOK

#define PERF_HOOK (   name)
Value:
extern struct perf_hook_desc __perf_hook_desc_##name; \
static inline void perf_hooks__invoke_##name(void) \
{ \
perf_hooks__invoke(&__perf_hook_desc_##name); \
}
const char * name

Definition at line 19 of file perf-hooks.h.

Typedef Documentation

◆ perf_hook_func_t

typedef void(* perf_hook_func_t) (void *ctx)

Definition at line 9 of file perf-hooks.h.

Function Documentation

◆ perf_hooks__get_hook()

perf_hook_func_t perf_hooks__get_hook ( const char *  hook_name)

Definition at line 79 of file perf-hooks.c.

◆ perf_hooks__invoke()

void perf_hooks__invoke ( const struct perf_hook_desc )

Definition at line 21 of file perf-hooks.c.

◆ perf_hooks__recover()

void perf_hooks__recover ( void  )

Definition at line 37 of file perf-hooks.c.

◆ perf_hooks__set_hook()

int perf_hooks__set_hook ( const char *  hook_name,
perf_hook_func_t  hook_func,
void *  hook_ctx 
)

Definition at line 60 of file perf-hooks.c.