linux/kernel/trace/trace_export.c

// SPDX-License-Identifier: GPL-2.0
/*
 * trace_export.c - export basic ftrace utilities to user space
 *
 * Copyright (C) 2009 Steven Rostedt <[email protected]>
 */
#include <linux/stringify.h>
#include <linux/kallsyms.h>
#include <linux/seq_file.h>
#include <linux/uaccess.h>
#include <linux/ftrace.h>
#include <linux/module.h>
#include <linux/init.h>

#include "trace_output.h"

/* Stub function for events with triggers */
static int ftrace_event_register(struct trace_event_call *call,
				 enum trace_reg type, void *data)
{}

#undef TRACE_SYSTEM
#define TRACE_SYSTEM

/*
 * The FTRACE_ENTRY_REG macro allows ftrace entry to define register
 * function and thus become accessible via perf.
 */
#undef FTRACE_ENTRY_REG
#define FTRACE_ENTRY_REG(name, struct_name, id, tstruct, print, regfn)

/* not needed for this file */
#undef __field_struct
#define __field_struct(type, item)

#undef __field
#define __field(type, item)

#undef __field_fn
#define __field_fn(type, item)

#undef __field_desc
#define __field_desc(type, container, item)

#undef __field_packed
#define __field_packed(type, container, item)

#undef __array
#define __array(type, item, size)

#undef __stack_array
#define __stack_array(type, item, size, field)

#undef __array_desc
#define __array_desc(type, container, item, size)

#undef __dynamic_array
#define __dynamic_array(type, item)

#undef F_STRUCT
#define F_STRUCT(args...)

#undef F_printk
#define F_printk(fmt, args...)

#undef FTRACE_ENTRY
#define FTRACE_ENTRY(name, struct_name, id, tstruct, print)

#undef FTRACE_ENTRY_DUP
#define FTRACE_ENTRY_DUP(name, struct_name, id, tstruct, print)

#include "trace_entries.h"

#undef __field_ext
#define __field_ext(_type, _item, _filter_type)


#undef __field_ext_packed
#define __field_ext_packed(_type, _item, _filter_type)

#undef __field
#define __field(_type, _item)

#undef __field_fn
#define __field_fn(_type, _item)

#undef __field_desc
#define __field_desc(_type, _container, _item)

#undef __field_packed
#define __field_packed(_type, _container, _item)

#undef __array
#define __array(_type, _item, _len)

#undef __stack_array
#define __stack_array(_type, _item, _len, _field)

#undef __array_desc
#define __array_desc(_type, _container, _item, _len)

#undef __dynamic_array
#define __dynamic_array(_type, _item)

#undef FTRACE_ENTRY
#define FTRACE_ENTRY(name, struct_name, id, tstruct, print)

#include "trace_entries.h"

#undef __entry
#define __entry

#undef __field
#define __field(type, item)

#undef __field_fn
#define __field_fn(type, item)

#undef __field_desc
#define __field_desc(type, container, item)

#undef __field_packed
#define __field_packed(type, container, item)

#undef __array
#define __array(type, item, len)

#undef __stack_array
#define __stack_array(type, item, len, field)

#undef __array_desc
#define __array_desc(type, container, item, len)

#undef __dynamic_array
#define __dynamic_array(type, item)

#undef F_printk
#define F_printk(fmt, args...)

#undef FTRACE_ENTRY_REG
#define FTRACE_ENTRY_REG(call, struct_name, etype, tstruct, print, regfn)

#undef FTRACE_ENTRY
#define FTRACE_ENTRY(call, struct_name, etype, tstruct, print)

bool ftrace_event_is_function(struct trace_event_call *call)
{}

#include "trace_entries.h"