函数源码 |
Source File:include\trace\events\printk.h |
Create Date:2022-07-27 11:05:30 |
首页 | Copyright©Brick |
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 | #endif /* _LINUX_SYSLOG_H */ #include <linux/cpu.h> #include <linux/rculist.h> #include <linux/poll.h> #include <linux/irq_work.h> #include <linux/ctype.h> #include <linux/uio.h> #include <linux/sched/clock.h> #include <linux/sched/debug.h> #include <linux/sched/task_stack.h> #include <linux/uaccess.h> #include <asm/sections.h> #include <trace/events/initcall.h> /* SPDX-License-Identifier: GPL-2.0 */ #undef TRACE_SYSTEM #define TRACE_SYSTEM initcall #if !defined(_TRACE_INITCALL_H) || defined(TRACE_HEADER_MULTI_READ) #define _TRACE_INITCALL_H #include <linux/tracepoint.h> TRACE_EVENT(initcall_level, TP_PROTO( const char *level), TP_ARGS(level), TP_STRUCT__entry( __string(level, level) ), TP_fast_assign( __assign_str(level, level); ), TP_printk( "level=%s" , __get_str(level)) ); TRACE_EVENT(initcall_start, TP_PROTO(initcall_t func), TP_ARGS(func), TP_STRUCT__entry( /* * Use field_struct to avoid is_signed_type() * comparison of a function pointer */ __field_struct(initcall_t, func) ), TP_fast_assign( __entry->func = func; ), TP_printk( "func=%pS" , __entry->func) ); TRACE_EVENT(initcall_finish, TP_PROTO(initcall_t func, int ret), TP_ARGS(func, ret), TP_STRUCT__entry( /* * Use field_struct to avoid is_signed_type() * comparison of a function pointer */ __field_struct(initcall_t, func) __field( int , ret) ), TP_fast_assign( __entry->func = func; __entry->ret = ret; ), TP_printk( "func=%pS ret=%d" , __entry->func, __entry->ret) ); #endif /* if !defined(_TRACE_GPIO_H) || defined(TRACE_HEADER_MULTI_READ) */ /* This part must be outside protection */ #include <trace/define_trace.h> #define CREATE_TRACE_POINTS #include <trace/events/printk.h> /* SPDX-License-Identifier: GPL-2.0 */ #undef TRACE_SYSTEM #define TRACE_SYSTEM printk #if !defined(_TRACE_PRINTK_H) || defined(TRACE_HEADER_MULTI_READ) #define _TRACE_PRINTK_H #include <linux/tracepoint.h> TRACE_EVENT(console, TP_PROTO( const char *text, size_t len), TP_ARGS(text, len), TP_STRUCT__entry( __dynamic_array( char , msg, len + 1) ), TP_fast_assign( /* * Each trace entry is printed in a new line. * If the msg finishes with '\n', cut it off * to avoid blank lines in the trace. */ if ((len > 0) && (text[len-1] == '\n' )) len -= 1; memcpy (__get_str(msg), text, len); __get_str(msg)[len] = 0; ), TP_printk( "%s" , __get_str(msg)) ); |