Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Functions | Variables
debug.h File Reference
#include <linux/string.h>
#include <linux/spinlock.h>
#include <linux/kernel.h>
#include <linux/time.h>
#include <uapi/asm/debug.h>

Go to the source code of this file.

Data Structures

struct  debug_info
 
struct  debug_view
 

Macros

#define DEBUG_MAX_LEVEL   6 /* debug levels range from 0 to 6 */
 
#define DEBUG_OFF_LEVEL   -1 /* level where debug is switched off */
 
#define DEBUG_FLUSH_ALL   -1 /* parameter to flush all areas */
 
#define DEBUG_MAX_VIEWS   10 /* max number of views in proc fs */
 
#define DEBUG_MAX_NAME_LEN   64 /* max length for a debugfs file name */
 
#define DEBUG_DEFAULT_LEVEL   3 /* initial debug level */
 
#define DEBUG_DIR_ROOT   "s390dbf" /* name of debug root directory in proc fs */
 
#define DEBUG_DATA(entry)   (char*)(entry + 1) /* data is stored behind */
 
#define DEBUG_LEVEL   4
 
#define INTERNAL_ERRMSG(x, y...)   "E" __FILE__ "%d: " x, __LINE__, y
 
#define INTERNAL_WRNMSG(x, y...)   "W" __FILE__ "%d: " x, __LINE__, y
 
#define INTERNAL_INFMSG(x, y...)   "I" __FILE__ "%d: " x, __LINE__, y
 
#define INTERNAL_DEBMSG(x, y...)   "D" __FILE__ "%d: " x, __LINE__, y
 
#define PRINT_DEBUG(x...)   printk ( KERN_DEBUG PRINTK_HEADER x )
 
#define PRINT_INFO(x...)   printk ( KERN_INFO PRINTK_HEADER x )
 
#define PRINT_WARN(x...)   printk ( KERN_WARNING PRINTK_HEADER x )
 
#define PRINT_ERR(x...)   printk ( KERN_ERR PRINTK_HEADER x )
 
#define PRINT_FATAL(x...)   panic ( PRINTK_HEADER x )
 

Typedefs

typedef struct __debug_entry debug_entry_t
 
typedef struct debug_info debug_info_t
 
typedef intdebug_header_proc_t )(debug_info_t *id, struct debug_view *view, int area, debug_entry_t *entry, char *out_buf)
 
typedef intdebug_format_proc_t )(debug_info_t *id, struct debug_view *view, char *out_buf, const char *in_buf)
 
typedef intdebug_prolog_proc_t )(debug_info_t *id, struct debug_view *view, char *out_buf)
 
typedef intdebug_input_proc_t )(debug_info_t *id, struct debug_view *view, struct file *file, const char __user *user_buf, size_t in_buf_size, loff_t *offset)
 

Functions

int debug_dflt_header_fn (debug_info_t *id, struct debug_view *view, int area, debug_entry_t *entry, char *out_buf)
 
debug_entry_tdebug_event_common (debug_info_t *id, int level, const void *data, int length)
 
debug_entry_tdebug_exception_common (debug_info_t *id, int level, const void *data, int length)
 
debug_info_tdebug_register (const char *name, int pages, int nr_areas, int buf_size)
 
debug_info_tdebug_register_mode (const char *name, int pages, int nr_areas, int buf_size, umode_t mode, uid_t uid, gid_t gid)
 
void debug_unregister (debug_info_t *id)
 
void debug_set_level (debug_info_t *id, int new_level)
 
void debug_set_critical (void)
 
void debug_stop_all (void)
 
debug_entry_tdebug_sprintf_event (debug_info_t *id, int level, char *string,...) __attribute__((format(printf
 
debug_entry_tdebug_sprintf_exception (debug_info_t *id, int level, char *string,...) __attribute__((format(printf
 
debug_entry_t int debug_register_view (debug_info_t *id, struct debug_view *view)
 
int debug_unregister_view (debug_info_t *id, struct debug_view *view)
 

Variables

struct debug_view debug_hex_ascii_view
 
struct debug_view debug_raw_view
 
struct debug_view debug_sprintf_view
 

Macro Definition Documentation

#define DEBUG_DATA (   entry)    (char*)(entry + 1) /* data is stored behind */

Definition at line 24 of file debug.h.

#define DEBUG_DEFAULT_LEVEL   3 /* initial debug level */

Definition at line 20 of file debug.h.

#define DEBUG_DIR_ROOT   "s390dbf" /* name of debug root directory in proc fs */

Definition at line 22 of file debug.h.

#define DEBUG_FLUSH_ALL   -1 /* parameter to flush all areas */

Definition at line 17 of file debug.h.

#define DEBUG_LEVEL   4

Definition at line 210 of file debug.h.

#define DEBUG_MAX_LEVEL   6 /* debug levels range from 0 to 6 */

Definition at line 15 of file debug.h.

#define DEBUG_MAX_NAME_LEN   64 /* max length for a debugfs file name */

Definition at line 19 of file debug.h.

#define DEBUG_MAX_VIEWS   10 /* max number of views in proc fs */

Definition at line 18 of file debug.h.

#define DEBUG_OFF_LEVEL   -1 /* level where debug is switched off */

Definition at line 16 of file debug.h.

#define INTERNAL_DEBMSG (   x,
  y... 
)    "D" __FILE__ "%d: " x, __LINE__, y

Definition at line 216 of file debug.h.

#define INTERNAL_ERRMSG (   x,
  y... 
)    "E" __FILE__ "%d: " x, __LINE__, y

Definition at line 213 of file debug.h.

#define INTERNAL_INFMSG (   x,
  y... 
)    "I" __FILE__ "%d: " x, __LINE__, y

Definition at line 215 of file debug.h.

#define INTERNAL_WRNMSG (   x,
  y... 
)    "W" __FILE__ "%d: " x, __LINE__, y

Definition at line 214 of file debug.h.

#define PRINT_DEBUG (   x...)    printk ( KERN_DEBUG PRINTK_HEADER x )

Definition at line 219 of file debug.h.

#define PRINT_ERR (   x...)    printk ( KERN_ERR PRINTK_HEADER x )

Definition at line 222 of file debug.h.

#define PRINT_FATAL (   x...)    panic ( PRINTK_HEADER x )

Definition at line 223 of file debug.h.

#define PRINT_INFO (   x...)    printk ( KERN_INFO PRINTK_HEADER x )

Definition at line 220 of file debug.h.

#define PRINT_WARN (   x...)    printk ( KERN_WARNING PRINTK_HEADER x )

Definition at line 221 of file debug.h.

Typedef Documentation

Definition at line 27 of file debug.h.

typedef int( debug_format_proc_t)(debug_info_t *id, struct debug_view *view, char *out_buf, const char *in_buf)

Definition at line 58 of file debug.h.

typedef int( debug_header_proc_t)(debug_info_t *id, struct debug_view *view, int area, debug_entry_t *entry, char *out_buf)

Definition at line 52 of file debug.h.

typedef int( debug_input_proc_t)(debug_info_t *id, struct debug_view *view, struct file *file, const char __user *user_buf, size_t in_buf_size, loff_t *offset)

Definition at line 64 of file debug.h.

typedef int( debug_prolog_proc_t)(debug_info_t *id, struct debug_view *view, char *out_buf)

Definition at line 61 of file debug.h.

Function Documentation

int debug_dflt_header_fn ( debug_info_t id,
struct debug_view view,
int  area,
debug_entry_t entry,
char out_buf 
)

Definition at line 1458 of file debug.c.

debug_entry_t* debug_event_common ( debug_info_t id,
int  level,
const void data,
int  length 
)

Definition at line 951 of file debug.c.

debug_entry_t* debug_exception_common ( debug_info_t id,
int  level,
const void data,
int  length 
)

Definition at line 979 of file debug.c.

debug_info_t* debug_register ( const char name,
int  pages,
int  nr_areas,
int  buf_size 
)

Definition at line 730 of file debug.c.

debug_info_t* debug_register_mode ( const char name,
int  pages,
int  nr_areas,
int  buf_size,
umode_t  mode,
uid_t  uid,
gid_t  gid 
)

Definition at line 693 of file debug.c.

debug_entry_t int debug_register_view ( debug_info_t id,
struct debug_view view 
)

Definition at line 1099 of file debug.c.

void debug_set_critical ( void  )

Definition at line 940 of file debug.c.

void debug_set_level ( debug_info_t id,
int  new_level 
)

Definition at line 801 of file debug.c.

debug_entry_t* debug_sprintf_event ( debug_info_t id,
int  level,
char string,
  ... 
)
debug_entry_t* debug_sprintf_exception ( debug_info_t id,
int  level,
char string,
  ... 
)
void debug_stop_all ( void  )

Definition at line 933 of file debug.c.

void debug_unregister ( debug_info_t id)

Definition at line 744 of file debug.c.

int debug_unregister_view ( debug_info_t id,
struct debug_view view 
)

Definition at line 1147 of file debug.c.

Variable Documentation

struct debug_view debug_hex_ascii_view

Definition at line 115 of file debug.c.

struct debug_view debug_raw_view

Definition at line 105 of file debug.c.

struct debug_view debug_sprintf_view

Definition at line 152 of file debug.c.