blob: dbba03ed96dee0dbb947d8c298e10776f6180fbb [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* 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
Eduard - Gabriel Munteanuf2859012009-03-23 15:12:23 +020019extern int trace_print_context(struct trace_iterator *iter);
20extern int trace_print_lat_context(struct trace_iterator *iter);
Frederic Weisbeckerc4a8e8b2009-02-02 20:29:21 -020021
Lai Jiangshan4f535962009-05-18 19:35:34 +080022extern void trace_event_read_lock(void);
23extern void trace_event_read_unlock(void);
Eduard - Gabriel Munteanuf2859012009-03-23 15:12:23 +020024extern struct trace_event *ftrace_find_event(int type);
Steven Rostedtf0868d12008-12-23 23:24:12 -050025
Eduard - Gabriel Munteanuf2859012009-03-23 15:12:23 +020026extern enum print_line_t trace_nop_print(struct trace_iterator *iter,
Steven Rostedta9a57762010-04-22 18:46:14 -040027 int flags, struct trace_event *event);
Steven Rostedtf81c9722009-09-11 14:24:13 -040028extern int
29trace_print_lat_fmt(struct trace_seq *s, struct trace_entry *entry);
Steven Rostedtf633cef2008-12-23 23:24:13 -050030
Steven Rostedt110bf2b2009-06-09 17:29:07 -040031/* used by module unregistering */
Steven Rostedt (Red Hat)9023c932015-05-05 09:39:12 -040032extern int __unregister_trace_event(struct trace_event *event);
zhangwei(Jovi)52f6ad62013-03-11 15:14:03 +080033extern struct rw_semaphore trace_event_sem;
Steven Rostedt110bf2b2009-06-09 17:29:07 -040034
Steven Rostedt (Red Hat)19a7fe22014-11-12 10:29:54 -050035#define SEQ_PUT_FIELD(s, x) \
36 trace_seq_putmem(s, &(x), sizeof(x))
Steven Rostedtf633cef2008-12-23 23:24:13 -050037
Steven Rostedt (Red Hat)19a7fe22014-11-12 10:29:54 -050038#define SEQ_PUT_HEX_FIELD(s, x) \
39 trace_seq_putmem_hex(s, &(x), sizeof(x))
Steven Rostedtf633cef2008-12-23 23:24:13 -050040
Steven Rostedtf0868d12008-12-23 23:24:12 -050041#endif
42