Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0
0002 #ifndef __TRACE_SYNTH_H
0003 #define __TRACE_SYNTH_H
0004 
0005 #include "trace_dynevent.h"
0006 
0007 #define SYNTH_SYSTEM        "synthetic"
0008 #define SYNTH_FIELDS_MAX    64
0009 
0010 #define STR_VAR_LEN_MAX     MAX_FILTER_STR_VAL /* must be multiple of sizeof(u64) */
0011 
0012 struct synth_field {
0013     char *type;
0014     char *name;
0015     size_t size;
0016     unsigned int offset;
0017     unsigned int field_pos;
0018     bool is_signed;
0019     bool is_string;
0020     bool is_dynamic;
0021 };
0022 
0023 struct synth_event {
0024     struct dyn_event            devent;
0025     int                 ref;
0026     char                    *name;
0027     struct synth_field          **fields;
0028     unsigned int                n_fields;
0029     struct synth_field          **dynamic_fields;
0030     unsigned int                n_dynamic_fields;
0031     unsigned int                n_u64;
0032     struct trace_event_class        class;
0033     struct trace_event_call         call;
0034     struct tracepoint           *tp;
0035     struct module               *mod;
0036 };
0037 
0038 extern struct synth_event *find_synth_event(const char *name);
0039 
0040 #endif /* __TRACE_SYNTH_H */