This source file includes following definitions.
- trace_seq_init
- trace_seq_used
- trace_seq_buffer_ptr
- trace_seq_has_overflowed
- __printf
- trace_seq_bprintf
- trace_seq_bitmask
- trace_print_seq
- trace_seq_to_user
- trace_seq_puts
- trace_seq_putc
- trace_seq_putmem
- trace_seq_putmem_hex
- trace_seq_path
   1 
   2 #ifndef _LINUX_TRACE_SEQ_H
   3 #define _LINUX_TRACE_SEQ_H
   4 
   5 #include <linux/seq_buf.h>
   6 
   7 #include <asm/page.h>
   8 
   9 
  10 
  11 
  12 
  13 
  14 struct trace_seq {
  15         unsigned char           buffer[PAGE_SIZE];
  16         struct seq_buf          seq;
  17         int                     full;
  18 };
  19 
  20 static inline void
  21 trace_seq_init(struct trace_seq *s)
  22 {
  23         seq_buf_init(&s->seq, s->buffer, PAGE_SIZE);
  24         s->full = 0;
  25 }
  26 
  27 
  28 
  29 
  30 
  31 
  32 
  33 
  34 
  35 
  36 
  37 
  38 
  39 
  40 static inline int trace_seq_used(struct trace_seq *s)
  41 {
  42         return seq_buf_used(&s->seq);
  43 }
  44 
  45 
  46 
  47 
  48 
  49 
  50 
  51 
  52 
  53 
  54 static inline unsigned char *
  55 trace_seq_buffer_ptr(struct trace_seq *s)
  56 {
  57         return s->buffer + seq_buf_used(&s->seq);
  58 }
  59 
  60 
  61 
  62 
  63 
  64 
  65 
  66 
  67 static inline bool trace_seq_has_overflowed(struct trace_seq *s)
  68 {
  69         return s->full || seq_buf_has_overflowed(&s->seq);
  70 }
  71 
  72 
  73 
  74 
  75 #ifdef CONFIG_TRACING
  76 extern __printf(2, 3)
  77 void trace_seq_printf(struct trace_seq *s, const char *fmt, ...);
  78 extern __printf(2, 0)
  79 void trace_seq_vprintf(struct trace_seq *s, const char *fmt, va_list args);
  80 extern void
  81 trace_seq_bprintf(struct trace_seq *s, const char *fmt, const u32 *binary);
  82 extern int trace_print_seq(struct seq_file *m, struct trace_seq *s);
  83 extern int trace_seq_to_user(struct trace_seq *s, char __user *ubuf,
  84                              int cnt);
  85 extern void trace_seq_puts(struct trace_seq *s, const char *str);
  86 extern void trace_seq_putc(struct trace_seq *s, unsigned char c);
  87 extern void trace_seq_putmem(struct trace_seq *s, const void *mem, unsigned int len);
  88 extern void trace_seq_putmem_hex(struct trace_seq *s, const void *mem,
  89                                 unsigned int len);
  90 extern int trace_seq_path(struct trace_seq *s, const struct path *path);
  91 
  92 extern void trace_seq_bitmask(struct trace_seq *s, const unsigned long *maskp,
  93                              int nmaskbits);
  94 
  95 #else 
  96 static inline void trace_seq_printf(struct trace_seq *s, const char *fmt, ...)
  97 {
  98 }
  99 static inline void
 100 trace_seq_bprintf(struct trace_seq *s, const char *fmt, const u32 *binary)
 101 {
 102 }
 103 
 104 static inline void
 105 trace_seq_bitmask(struct trace_seq *s, const unsigned long *maskp,
 106                   int nmaskbits)
 107 {
 108 }
 109 
 110 static inline int trace_print_seq(struct seq_file *m, struct trace_seq *s)
 111 {
 112         return 0;
 113 }
 114 static inline int trace_seq_to_user(struct trace_seq *s, char __user *ubuf,
 115                                     int cnt)
 116 {
 117         return 0;
 118 }
 119 static inline void trace_seq_puts(struct trace_seq *s, const char *str)
 120 {
 121 }
 122 static inline void trace_seq_putc(struct trace_seq *s, unsigned char c)
 123 {
 124 }
 125 static inline void
 126 trace_seq_putmem(struct trace_seq *s, const void *mem, unsigned int len)
 127 {
 128 }
 129 static inline void trace_seq_putmem_hex(struct trace_seq *s, const void *mem,
 130                                        unsigned int len)
 131 {
 132 }
 133 static inline int trace_seq_path(struct trace_seq *s, const struct path *path)
 134 {
 135         return 0;
 136 }
 137 #endif 
 138 
 139 #endif