Linux Perf
util.c File Reference
#include "util.h"
#include "../debug.h"
Include dependency graph for util.c:

Go to the source code of this file.

Functions

static int perf_stdio__error (const char *format, va_list args)
 
static int perf_stdio__warning (const char *format, va_list args)
 
int ui__error (const char *format,...)
 
int ui__warning (const char *format,...)
 
int perf_error__register (struct perf_error_ops *eops)
 
int perf_error__unregister (struct perf_error_ops *eops)
 

Variables

static struct perf_error_ops default_eops
 
static struct perf_error_opsperf_eops = &default_eops
 

Function Documentation

◆ perf_error__register()

int perf_error__register ( struct perf_error_ops eops)

perf_error__register - Register error logging functions : The pointer to error logging function struct

Register UI-specific error logging functions. Before calling this, other logging functions should be unregistered, if any.

Definition at line 63 of file util.c.

◆ perf_error__unregister()

int perf_error__unregister ( struct perf_error_ops eops)

perf_error__unregister - Unregister error logging functions : The pointer to error logging function struct

Unregister already registered error logging functions.

Definition at line 78 of file util.c.

◆ perf_stdio__error()

static int perf_stdio__error ( const char *  format,
va_list  args 
)
static

Definition at line 9 of file util.c.

◆ perf_stdio__warning()

static int perf_stdio__warning ( const char *  format,
va_list  args 
)
static

Definition at line 16 of file util.c.

◆ ui__error()

int ui__error ( const char *  format,
  ... 
)

Definition at line 32 of file util.c.

◆ ui__warning()

int ui__warning ( const char *  format,
  ... 
)

Definition at line 44 of file util.c.

Variable Documentation

◆ default_eops

struct perf_error_ops default_eops
static
Initial value:
=
{
.warning = perf_stdio__warning,
}
static int perf_stdio__error(const char *format, va_list args)
Definition: util.c:9
static int perf_stdio__warning(const char *format, va_list args)
Definition: util.c:16

Definition at line 23 of file util.c.

◆ perf_eops

struct perf_error_ops* perf_eops = &default_eops
static

Definition at line 29 of file util.c.