blob: 4c954636caf0f978238fc7e6fef10b24dcb31253 [file] [log] [blame]
Steven Rostedt (VMware)bb730b52018-08-16 11:26:55 -04001// SPDX-License-Identifier: GPL-2.0
Steven Rostedtf0868d12008-12-23 23:24:12 -05002#ifndef __TRACE_EVENTS_H
3#define __TRACE_EVENTS_H
4
Steven Rostedt95045042009-04-11 12:59:57 -04005#include <linux/trace_seq.h>
Steven Rostedtf0868d12008-12-23 23:24:12 -05006#include "trace.h"
7
Steven Rostedt5ef841f2009-03-19 12:20:38 -04008extern enum print_line_t
Steven Rostedt (Red Hat)09ae7232013-03-08 21:02:34 -05009trace_print_bputs_msg_only(struct trace_iterator *iter);
10extern enum print_line_t
Steven Rostedt5ef841f2009-03-19 12:20:38 -040011trace_print_bprintk_msg_only(struct trace_iterator *iter);
12extern enum print_line_t
13trace_print_printk_msg_only(struct trace_iterator *iter);
14
Frederic Weisbecker769b0442009-03-06 17:21:49 +010015extern int
Steven Rostedtf0868d12008-12-23 23:24:12 -050016seq_print_ip_sym(struct trace_seq *s, unsigned long ip,
17 unsigned long sym_flags);
Steven Rostedtf0868d12008-12-23 23:24:12 -050018
Steven Rostedt (VMware)773c1672020-11-05 21:32:46 -050019extern void trace_seq_print_sym(struct trace_seq *s, unsigned long address, bool offset);
Eduard - Gabriel Munteanuf2859012009-03-23 15:12:23 +020020extern int trace_print_context(struct trace_iterator *iter);
21extern int trace_print_lat_context(struct trace_iterator *iter);
Frederic Weisbeckerc4a8e8b2009-02-02 20:29:21 -020022
Lai Jiangshan4f535962009-05-18 19:35:34 +080023extern void trace_event_read_lock(void);
24extern void trace_event_read_unlock(void);
Eduard - Gabriel Munteanuf2859012009-03-23 15:12:23 +020025extern struct trace_event *ftrace_find_event(int type);
Steven Rostedtf0868d12008-12-23 23:24:12 -050026
Eduard - Gabriel Munteanuf2859012009-03-23 15:12:23 +020027extern enum print_line_t trace_nop_print(struct trace_iterator *iter,
Steven Rostedta9a57762010-04-22 18:46:14 -040028 int flags, struct trace_event *event);
Steven Rostedtf81c9722009-09-11 14:24:13 -040029extern int
30trace_print_lat_fmt(struct trace_seq *s, struct trace_entry *entry);
Steven Rostedtf633cef2008-12-23 23:24:13 -050031
Steven Rostedt110bf2b2009-06-09 17:29:07 -040032/* used by module unregistering */
Steven Rostedt (Red Hat)9023c932015-05-05 09:39:12 -040033extern int __unregister_trace_event(struct trace_event *event);
zhangwei(Jovi)52f6ad62013-03-11 15:14:03 +080034extern struct rw_semaphore trace_event_sem;
Steven Rostedt110bf2b2009-06-09 17:29:07 -040035
Steven Rostedt (Red Hat)19a7fe22014-11-12 10:29:54 -050036#define SEQ_PUT_FIELD(s, x) \
37 trace_seq_putmem(s, &(x), sizeof(x))
Steven Rostedtf633cef2008-12-23 23:24:13 -050038
Steven Rostedt (Red Hat)19a7fe22014-11-12 10:29:54 -050039#define SEQ_PUT_HEX_FIELD(s, x) \
40 trace_seq_putmem_hex(s, &(x), sizeof(x))
Steven Rostedtf633cef2008-12-23 23:24:13 -050041
Steven Rostedtf0868d12008-12-23 23:24:12 -050042#endif
43