~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/trace.h

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /include/linux/trace.h (Architecture sparc64) and /include/linux/trace.h (Architecture ppc)


  1 /* SPDX-License-Identifier: GPL-2.0 */              1 /* SPDX-License-Identifier: GPL-2.0 */
  2 #ifndef _LINUX_TRACE_H                              2 #ifndef _LINUX_TRACE_H
  3 #define _LINUX_TRACE_H                              3 #define _LINUX_TRACE_H
  4                                                     4 
  5 #define TRACE_EXPORT_FUNCTION   BIT(0)              5 #define TRACE_EXPORT_FUNCTION   BIT(0)
  6 #define TRACE_EXPORT_EVENT      BIT(1)              6 #define TRACE_EXPORT_EVENT      BIT(1)
  7 #define TRACE_EXPORT_MARKER     BIT(2)              7 #define TRACE_EXPORT_MARKER     BIT(2)
  8                                                     8 
  9 /*                                                  9 /*
 10  * The trace export - an export of Ftrace outp     10  * The trace export - an export of Ftrace output. The trace_export
 11  * can process traces and export them to a reg     11  * can process traces and export them to a registered destination as
 12  * an addition to the current only output of F     12  * an addition to the current only output of Ftrace - i.e. ring buffer.
 13  *                                                 13  *
 14  * If you want traces to be sent to some other     14  * If you want traces to be sent to some other place rather than ring
 15  * buffer only, just need to register a new tr     15  * buffer only, just need to register a new trace_export and implement
 16  * its own .write() function for writing trace     16  * its own .write() function for writing traces to the storage.
 17  *                                                 17  *
 18  * next         - pointer to the next trace_ex     18  * next         - pointer to the next trace_export
 19  * write        - copy traces which have been      19  * write        - copy traces which have been delt with ->commit() to
 20  *                the destination                  20  *                the destination
 21  * flags        - which ftrace to be exported      21  * flags        - which ftrace to be exported
 22  */                                                22  */
 23 struct trace_export {                              23 struct trace_export {
 24         struct trace_export __rcu       *next;     24         struct trace_export __rcu       *next;
 25         void (*write)(struct trace_export *, c     25         void (*write)(struct trace_export *, const void *, unsigned int);
 26         int flags;                                 26         int flags;
 27 };                                                 27 };
 28                                                    28 
 29 struct trace_array;                                29 struct trace_array;
 30                                                    30 
 31 #ifdef CONFIG_TRACING                              31 #ifdef CONFIG_TRACING
 32                                                    32 
 33 int register_ftrace_export(struct trace_export     33 int register_ftrace_export(struct trace_export *export);
 34 int unregister_ftrace_export(struct trace_expo     34 int unregister_ftrace_export(struct trace_export *export);
 35                                                    35 
 36 /**                                                36 /**
 37  * trace_array_puts - write a constant string      37  * trace_array_puts - write a constant string into the trace buffer.
 38  * @tr:    The trace array to write to             38  * @tr:    The trace array to write to
 39  * @str:   The constant string to write            39  * @str:   The constant string to write
 40  */                                                40  */
 41 #define trace_array_puts(tr, str)                  41 #define trace_array_puts(tr, str)                                       \
 42         ({                                         42         ({                                                              \
 43                 str ? __trace_array_puts(tr, _     43                 str ? __trace_array_puts(tr, _THIS_IP_, str, strlen(str)) : -1; \
 44         })                                         44         })
 45 int __trace_array_puts(struct trace_array *tr,     45 int __trace_array_puts(struct trace_array *tr, unsigned long ip,
 46                        const char *str, int si     46                        const char *str, int size);
 47                                                    47 
 48 void trace_printk_init_buffers(void);              48 void trace_printk_init_buffers(void);
 49 __printf(3, 4)                                     49 __printf(3, 4)
 50 int trace_array_printk(struct trace_array *tr,     50 int trace_array_printk(struct trace_array *tr, unsigned long ip,
 51                        const char *fmt, ...);      51                        const char *fmt, ...);
 52 int trace_array_init_printk(struct trace_array     52 int trace_array_init_printk(struct trace_array *tr);
 53 void trace_array_put(struct trace_array *tr);      53 void trace_array_put(struct trace_array *tr);
 54 struct trace_array *trace_array_get_by_name(co     54 struct trace_array *trace_array_get_by_name(const char *name, const char *systems);
 55 int trace_array_destroy(struct trace_array *tr     55 int trace_array_destroy(struct trace_array *tr);
 56                                                    56 
 57 /* For osnoise tracer */                           57 /* For osnoise tracer */
 58 int osnoise_arch_register(void);                   58 int osnoise_arch_register(void);
 59 void osnoise_arch_unregister(void);                59 void osnoise_arch_unregister(void);
 60 void osnoise_trace_irq_entry(int id);              60 void osnoise_trace_irq_entry(int id);
 61 void osnoise_trace_irq_exit(int id, const char     61 void osnoise_trace_irq_exit(int id, const char *desc);
 62                                                    62 
 63 #else /* CONFIG_TRACING */                         63 #else /* CONFIG_TRACING */
 64 static inline int register_ftrace_export(struc     64 static inline int register_ftrace_export(struct trace_export *export)
 65 {                                                  65 {
 66         return -EINVAL;                            66         return -EINVAL;
 67 }                                                  67 }
 68 static inline int unregister_ftrace_export(str     68 static inline int unregister_ftrace_export(struct trace_export *export)
 69 {                                                  69 {
 70         return 0;                                  70         return 0;
 71 }                                                  71 }
 72 static inline void trace_printk_init_buffers(v     72 static inline void trace_printk_init_buffers(void)
 73 {                                                  73 {
 74 }                                                  74 }
 75 static inline int trace_array_printk(struct tr     75 static inline int trace_array_printk(struct trace_array *tr, unsigned long ip,
 76                                      const cha     76                                      const char *fmt, ...)
 77 {                                                  77 {
 78         return 0;                                  78         return 0;
 79 }                                                  79 }
 80 static inline int trace_array_init_printk(stru     80 static inline int trace_array_init_printk(struct trace_array *tr)
 81 {                                                  81 {
 82         return -EINVAL;                            82         return -EINVAL;
 83 }                                                  83 }
 84 static inline void trace_array_put(struct trac     84 static inline void trace_array_put(struct trace_array *tr)
 85 {                                                  85 {
 86 }                                                  86 }
 87 static inline struct trace_array *trace_array_     87 static inline struct trace_array *trace_array_get_by_name(const char *name, const char *systems)
 88 {                                                  88 {
 89         return NULL;                               89         return NULL;
 90 }                                                  90 }
 91 static inline int trace_array_destroy(struct t     91 static inline int trace_array_destroy(struct trace_array *tr)
 92 {                                                  92 {
 93         return 0;                                  93         return 0;
 94 }                                                  94 }
 95 #endif  /* CONFIG_TRACING */                       95 #endif  /* CONFIG_TRACING */
 96                                                    96 
 97 #endif  /* _LINUX_TRACE_H */                       97 #endif  /* _LINUX_TRACE_H */
 98                                                    98 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php