X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=genevent-new%2Fparser.h;h=ec360f8444ce5b3466f49abb3004282427961a25;hb=b7793f0ca69da7484af0341f41c618b0699cf671;hp=588790989895417e8e483487873a983a24dc4342;hpb=be97b9537557ac5ed4b010dbacb26be3452f6035;p=lttv.git diff --git a/genevent-new/parser.h b/genevent-new/parser.h index 58879098..ec360f84 100644 --- a/genevent-new/parser.h +++ b/genevent-new/parser.h @@ -101,25 +101,23 @@ typedef enum _data_type { NONE } data_type_t; -/* Event type descriptors */ - typedef struct _type_descriptor { char * type_name; //used for named type data_type_t type; char *fmt; - unsigned long long size; + size_t size; sequence_t labels; // for enumeration + sequence_t labels_values; // for enumeration sequence_t labels_description; int already_printed; - sequence_t fields; // for structure - struct _type_descriptor *nested_type; // for array and sequence - struct _type_descriptor *length_type; // for sequence - int alignment; + sequence_t fields; // for structure, array and sequence (field_t type) + int custom_write; /* Should we use a custom write function ? */ + int network; /* Is the type a in network byte order ? */ } type_descriptor_t; -/* Fields within types */ +/* Fields within types or events */ typedef struct _field{ char *name; char *description; @@ -136,15 +134,20 @@ typedef struct _event { sequence_t fields; /* event fields */ int per_trace; /* Is the event able to be logged to a specific trace ? */ int per_tracefile; /* Must we log this event in a specific tracefile ? */ + int param_buffer; /* For userspace tracing : takes a buffer as parameter? */ + int no_instrument_function; } event_t; typedef struct _facility { char * name; char * capname; + char * arch; char * description; sequence_t events; - sequence_t unnamed_types; + sequence_t unnamed_types; //FIXME : remove table_t named_types; + unsigned int checksum; + int user; /* Is this a userspace facility ? */ } facility_t; int getSizeindex(unsigned int value); @@ -159,19 +162,20 @@ void parseTypeDefinition(parse_file_t *in, type_descriptor_t *parseType(parse_file_t *in, type_descriptor_t *t, sequence_t * unnamed_types, table_t * named_types); void parseFields(parse_file_t *in, field_t *f, - sequence_t * unnamed_types, table_t * named_types); + sequence_t * unnamed_types, + table_t * named_types, + int tag); void checkNamedTypesImplemented(table_t * namedTypes); type_descriptor_t * find_named_type(char *name, table_t * named_types); void generateChecksum(char * facName, - unsigned long * checksum, sequence_t * events); + unsigned int * checksum, sequence_t * events); /* get attributes */ char * getNameAttribute(parse_file_t *in); char * getFormatAttribute(parse_file_t *in); int getSizeAttribute(parse_file_t *in); -int getValueAttribute(parse_file_t *in); -char * getValueStrAttribute(parse_file_t *in); +int getValueAttribute(parse_file_t *in, long long *value); char * getDescription(parse_file_t *in);