swh:1:snp:3c665ee4f67729f27f2e40193ab88e7298cf0fef
Raw File
Tip revision: 92ed301919932f777713b9172e525674157e983d authored by Linus Torvalds on 26 July 2020, 21:14:06 UTC
Linux 5.8-rc7
Tip revision: 92ed301
trace_synth.h
// SPDX-License-Identifier: GPL-2.0
#ifndef __TRACE_SYNTH_H
#define __TRACE_SYNTH_H

#include "trace_dynevent.h"

#define SYNTH_SYSTEM		"synthetic"
#define SYNTH_FIELDS_MAX	32

#define STR_VAR_LEN_MAX		32 /* must be multiple of sizeof(u64) */

struct synth_field {
	char *type;
	char *name;
	size_t size;
	unsigned int offset;
	bool is_signed;
	bool is_string;
};

struct synth_event {
	struct dyn_event			devent;
	int					ref;
	char					*name;
	struct synth_field			**fields;
	unsigned int				n_fields;
	unsigned int				n_u64;
	struct trace_event_class		class;
	struct trace_event_call			call;
	struct tracepoint			*tp;
	struct module				*mod;
};

extern struct synth_event *find_synth_event(const char *name);

#endif /* __TRACE_SYNTH_H */
back to top