hc
2025-02-14 bbb9540dc49f70f6b703d1c8d1b85fa5f602d86e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// 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        MAX_FILTER_STR_VAL /* must be multiple of sizeof(u64) */
 
struct synth_field {
   char *type;
   char *name;
   size_t size;
   unsigned int offset;
   unsigned int field_pos;
   bool is_signed;
   bool is_string;
   bool is_dynamic;
};
 
struct synth_event {
   struct dyn_event            devent;
   int                    ref;
   char                    *name;
   struct synth_field            **fields;
   unsigned int                n_fields;
   struct synth_field            **dynamic_fields;
   unsigned int                n_dynamic_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 */