Steven Rostedt (VMware) | bb730b5 | 2018-08-16 11:26:55 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0 |
Steven Rostedt | f0868d1 | 2008-12-23 23:24:12 -0500 | [diff] [blame] | 2 | #ifndef __TRACE_EVENTS_H |
| 3 | #define __TRACE_EVENTS_H |
| 4 | |
Steven Rostedt | 9504504 | 2009-04-11 12:59:57 -0400 | [diff] [blame] | 5 | #include <linux/trace_seq.h> |
Steven Rostedt | f0868d1 | 2008-12-23 23:24:12 -0500 | [diff] [blame] | 6 | #include "trace.h" |
| 7 | |
Steven Rostedt | 5ef841f | 2009-03-19 12:20:38 -0400 | [diff] [blame] | 8 | extern enum print_line_t |
Steven Rostedt (Red Hat) | 09ae723 | 2013-03-08 21:02:34 -0500 | [diff] [blame] | 9 | trace_print_bputs_msg_only(struct trace_iterator *iter); |
| 10 | extern enum print_line_t |
Steven Rostedt | 5ef841f | 2009-03-19 12:20:38 -0400 | [diff] [blame] | 11 | trace_print_bprintk_msg_only(struct trace_iterator *iter); |
| 12 | extern enum print_line_t |
| 13 | trace_print_printk_msg_only(struct trace_iterator *iter); |
| 14 | |
Frederic Weisbecker | 769b044 | 2009-03-06 17:21:49 +0100 | [diff] [blame] | 15 | extern int |
Steven Rostedt | f0868d1 | 2008-12-23 23:24:12 -0500 | [diff] [blame] | 16 | seq_print_ip_sym(struct trace_seq *s, unsigned long ip, |
| 17 | unsigned long sym_flags); |
Steven Rostedt | f0868d1 | 2008-12-23 23:24:12 -0500 | [diff] [blame] | 18 | |
Steven Rostedt (VMware) | 773c167 | 2020-11-05 21:32:46 -0500 | [diff] [blame] | 19 | extern void trace_seq_print_sym(struct trace_seq *s, unsigned long address, bool offset); |
Eduard - Gabriel Munteanu | f285901 | 2009-03-23 15:12:23 +0200 | [diff] [blame] | 20 | extern int trace_print_context(struct trace_iterator *iter); |
| 21 | extern int trace_print_lat_context(struct trace_iterator *iter); |
Frederic Weisbecker | c4a8e8b | 2009-02-02 20:29:21 -0200 | [diff] [blame] | 22 | |
Lai Jiangshan | 4f53596 | 2009-05-18 19:35:34 +0800 | [diff] [blame] | 23 | extern void trace_event_read_lock(void); |
| 24 | extern void trace_event_read_unlock(void); |
Eduard - Gabriel Munteanu | f285901 | 2009-03-23 15:12:23 +0200 | [diff] [blame] | 25 | extern struct trace_event *ftrace_find_event(int type); |
Steven Rostedt | f0868d1 | 2008-12-23 23:24:12 -0500 | [diff] [blame] | 26 | |
Eduard - Gabriel Munteanu | f285901 | 2009-03-23 15:12:23 +0200 | [diff] [blame] | 27 | extern enum print_line_t trace_nop_print(struct trace_iterator *iter, |
Steven Rostedt | a9a5776 | 2010-04-22 18:46:14 -0400 | [diff] [blame] | 28 | int flags, struct trace_event *event); |
Steven Rostedt | f81c972 | 2009-09-11 14:24:13 -0400 | [diff] [blame] | 29 | extern int |
| 30 | trace_print_lat_fmt(struct trace_seq *s, struct trace_entry *entry); |
Steven Rostedt | f633cef | 2008-12-23 23:24:13 -0500 | [diff] [blame] | 31 | |
Steven Rostedt | 110bf2b | 2009-06-09 17:29:07 -0400 | [diff] [blame] | 32 | /* used by module unregistering */ |
Steven Rostedt (Red Hat) | 9023c93 | 2015-05-05 09:39:12 -0400 | [diff] [blame] | 33 | extern int __unregister_trace_event(struct trace_event *event); |
zhangwei(Jovi) | 52f6ad6 | 2013-03-11 15:14:03 +0800 | [diff] [blame] | 34 | extern struct rw_semaphore trace_event_sem; |
Steven Rostedt | 110bf2b | 2009-06-09 17:29:07 -0400 | [diff] [blame] | 35 | |
Steven Rostedt (Red Hat) | 19a7fe2 | 2014-11-12 10:29:54 -0500 | [diff] [blame] | 36 | #define SEQ_PUT_FIELD(s, x) \ |
| 37 | trace_seq_putmem(s, &(x), sizeof(x)) |
Steven Rostedt | f633cef | 2008-12-23 23:24:13 -0500 | [diff] [blame] | 38 | |
Steven Rostedt (Red Hat) | 19a7fe2 | 2014-11-12 10:29:54 -0500 | [diff] [blame] | 39 | #define SEQ_PUT_HEX_FIELD(s, x) \ |
| 40 | trace_seq_putmem_hex(s, &(x), sizeof(x)) |
Steven Rostedt | f633cef | 2008-12-23 23:24:13 -0500 | [diff] [blame] | 41 | |
Steven Rostedt | f0868d1 | 2008-12-23 23:24:12 -0500 | [diff] [blame] | 42 | #endif |
| 43 | |