2020-05-28 19:32:37 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0
|
|
|
|
#ifndef __TRACE_SYNTH_H
|
|
|
|
#define __TRACE_SYNTH_H
|
|
|
|
|
|
|
|
#include "trace_dynevent.h"
|
|
|
|
|
|
|
|
#define SYNTH_SYSTEM "synthetic"
|
2021-09-01 13:55:13 +00:00
|
|
|
#define SYNTH_FIELDS_MAX 64
|
2020-05-28 19:32:37 +00:00
|
|
|
|
2020-10-04 22:14:03 +00:00
|
|
|
#define STR_VAR_LEN_MAX MAX_FILTER_STR_VAL /* must be multiple of sizeof(u64) */
|
2020-05-28 19:32:37 +00:00
|
|
|
|
|
|
|
struct synth_field {
|
|
|
|
char *type;
|
|
|
|
char *name;
|
|
|
|
size_t size;
|
|
|
|
unsigned int offset;
|
2021-07-21 23:10:08 +00:00
|
|
|
unsigned int field_pos;
|
2020-05-28 19:32:37 +00:00
|
|
|
bool is_signed;
|
|
|
|
bool is_string;
|
2020-10-04 22:14:06 +00:00
|
|
|
bool is_dynamic;
|
2023-01-17 15:21:28 +00:00
|
|
|
bool is_stack;
|
2020-05-28 19:32:37 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct synth_event {
|
|
|
|
struct dyn_event devent;
|
|
|
|
int ref;
|
|
|
|
char *name;
|
|
|
|
struct synth_field **fields;
|
|
|
|
unsigned int n_fields;
|
2020-10-04 22:14:06 +00:00
|
|
|
struct synth_field **dynamic_fields;
|
|
|
|
unsigned int n_dynamic_fields;
|
2020-05-28 19:32:37 +00:00
|
|
|
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 */
|