In order to make libtraceevent into a proper library, variables, data structures and functions require a unique prefix to prevent name space conflicts. That prefix will be "tep_". This renames struct format to struct tep_format and struct format_field to struct tep_format_field
Unified · Split
| @@ -1299,7 +1299,7 @@ static int event_read_id(void) · 1298 unmodified lines | ||
| 1299 | 1299 | return -1; |
| 1300 | 1300 | } |
| 1301 | 1301 | |
| 1302 | −static int field_is_string(struct format_field *field) | |
| 1302 | +static int field_is_string(struct tep_format_field *field) | |
| 1303 | 1303 | { |
| 1304 | 1304 | if ((field->flags & FIELD_IS_ARRAY) && |
| 1305 | 1305 | (strstr(field->type, "char") || strstr(field->type, "u8") || |
| @@ -1309,7 +1309,7 @@ static int field_is_string(struct format_field *field) · 3 unmodified lines | ||
| 1309 | 1309 | return 0; |
| 1310 | 1310 | } |
| 1311 | 1311 | |
| 1312 | −static int field_is_dynamic(struct format_field *field) | |
| 1312 | +static int field_is_dynamic(struct tep_format_field *field) | |
| 1313 | 1313 | { |
| 1314 | 1314 | if (strncmp(field->type, "__data_loc", 10) == 0) |
| 1315 | 1315 | return 1; |
| @@ -1317,7 +1317,7 @@ static int field_is_dynamic(struct format_field *field) · 1 unmodified line | ||
| 1317 | 1317 | return 0; |
| 1318 | 1318 | } |
| 1319 | 1319 | |
| 1320 | −static int field_is_long(struct format_field *field) | |
| 1320 | +static int field_is_long(struct tep_format_field *field) | |
| 1321 | 1321 | { |
| 1322 | 1322 | /* includes long long */ |
| 1323 | 1323 | if (strstr(field->type, "long")) |
| @@ -1354,9 +1354,9 @@ static unsigned int type_size(const char *name) · 30 unmodified lines | ||
| 1354 | 1354 | return 0; |
| 1355 | 1355 | } |
| 1356 | 1356 | |
| 1357 | −static int event_read_fields(struct tep_event_format *event, struct format_field **fields) | |
| 1357 | +static int event_read_fields(struct tep_event_format *event, struct tep_format_field **fields) | |
| 1358 | 1358 | { |
| 1359 | − struct format_field *field = NULL; | |
| 1359 | + struct tep_format_field *field = NULL; | |
| 1360 | 1360 | enum event_type type; |
| 1361 | 1361 | char *token; |
| 1362 | 1362 | char *last_token; |
| @@ -2683,7 +2683,7 @@ out: · 1320 unmodified lines | ||
| 2683 | 2683 | static enum event_type |
| 2684 | 2684 | process_dynamic_array(struct tep_event_format *event, struct print_arg *arg, char **tok) |
| 2685 | 2685 | { |
| 2686 | − struct format_field *field; | |
| 2686 | + struct tep_format_field *field; | |
| 2687 | 2687 | enum event_type type; |
| 2688 | 2688 | char *token; |
| 2689 | 2689 | |
| @@ -2748,7 +2748,7 @@ static enum event_type · 58 unmodified lines | ||
| 2748 | 2748 | process_dynamic_array_len(struct tep_event_format *event, struct print_arg *arg, |
| 2749 | 2749 | char **tok) |
| 2750 | 2750 | { |
| 2751 | − struct format_field *field; | |
| 2751 | + struct tep_format_field *field; | |
| 2752 | 2752 | enum event_type type; |
| 2753 | 2753 | char *token; |
| 2754 | 2754 | |
| @@ -3259,10 +3259,10 @@ static int event_read_print(struct tep_event_format *event) · 504 unmodified lines | ||
| 3259 | 3259 | * Returns a common field from the event by the given @name. |
| 3260 | 3260 | * This only searchs the common fields and not all field. |
| 3261 | 3261 | */ |
| 3262 | −struct format_field * | |
| 3262 | +struct tep_format_field * | |
| 3263 | 3263 | tep_find_common_field(struct tep_event_format *event, const char *name) |
| 3264 | 3264 | { |
| 3265 | − struct format_field *format; | |
| 3265 | + struct tep_format_field *format; | |
| 3266 | 3266 | |
| 3267 | 3267 | for (format = event->format.common_fields; |
| 3268 | 3268 | format; format = format->next) { |
| @@ -3281,10 +3281,10 @@ tep_find_common_field(struct tep_event_format *event, const char *name) · 12 unmodified lines | ||
| 3281 | 3281 | * Returns a non-common field by the given @name. |
| 3282 | 3282 | * This does not search common fields. |
| 3283 | 3283 | */ |
| 3284 | −struct format_field * | |
| 3284 | +struct tep_format_field * | |
| 3285 | 3285 | tep_find_field(struct tep_event_format *event, const char *name) |
| 3286 | 3286 | { |
| 3287 | − struct format_field *format; | |
| 3287 | + struct tep_format_field *format; | |
| 3288 | 3288 | |
| 3289 | 3289 | for (format = event->format.fields; |
| 3290 | 3290 | format; format = format->next) { |
| @@ -3304,10 +3304,10 @@ tep_find_field(struct tep_event_format *event, const char *name) · 13 unmodified lines | ||
| 3304 | 3304 | * This searchs the common field names first, then |
| 3305 | 3305 | * the non-common ones if a common one was not found. |
| 3306 | 3306 | */ |
| 3307 | −struct format_field * | |
| 3307 | +struct tep_format_field * | |
| 3308 | 3308 | tep_find_any_field(struct tep_event_format *event, const char *name) |
| 3309 | 3309 | { |
| 3310 | − struct format_field *format; | |
| 3310 | + struct tep_format_field *format; | |
| 3311 | 3311 | |
| 3312 | 3312 | format = tep_find_common_field(event, name); |
| 3313 | 3313 | if (format) |
| @@ -3353,7 +3353,7 @@ unsigned long long tep_read_number(struct tep_handle *pevent, · 39 unmodified lines | ||
| 3353 | 3353 | * |
| 3354 | 3354 | * Returns 0 on success, -1 otherwise. |
| 3355 | 3355 | */ |
| 3356 | −int tep_read_number_field(struct format_field *field, const void *data, | |
| 3356 | +int tep_read_number_field(struct tep_format_field *field, const void *data, | |
| 3357 | 3357 | unsigned long long *value) |
| 3358 | 3358 | { |
| 3359 | 3359 | if (!field) |
| @@ -3375,7 +3375,7 @@ static int get_common_info(struct tep_handle *pevent, · 15 unmodified lines | ||
| 3375 | 3375 | const char *type, int *offset, int *size) |
| 3376 | 3376 | { |
| 3377 | 3377 | struct tep_event_format *event; |
| 3378 | − struct format_field *field; | |
| 3378 | + struct tep_format_field *field; | |
| 3379 | 3379 | |
| 3380 | 3380 | /* |
| 3381 | 3381 | * All events should have the same common elements. |
| @@ -3867,7 +3867,7 @@ static void print_str_arg(struct trace_seq *s, void *data, int size, · 485 unmodified lines | ||
| 3867 | 3867 | { |
| 3868 | 3868 | struct tep_handle *pevent = event->pevent; |
| 3869 | 3869 | struct print_flag_sym *flag; |
| 3870 | − struct format_field *field; | |
| 3870 | + struct tep_format_field *field; | |
| 3871 | 3871 | struct printk_map *printk; |
| 3872 | 3872 | long long val, fval; |
| 3873 | 3873 | unsigned long long addr; |
| @@ -4008,7 +4008,7 @@ static void print_str_arg(struct trace_seq *s, void *data, int size, · 134 unmodified lines | ||
| 4008 | 4008 | |
| 4009 | 4009 | if (arg->int_array.field->type == PRINT_DYNAMIC_ARRAY) { |
| 4010 | 4010 | unsigned long offset; |
| 4011 | − struct format_field *field = | |
| 4011 | + struct tep_format_field *field = | |
| 4012 | 4012 | arg->int_array.field->dynarray.field; |
| 4013 | 4013 | offset = tep_read_number(pevent, |
| 4014 | 4014 | data + field->offset, |
| @@ -4056,7 +4056,7 @@ static void print_str_arg(struct trace_seq *s, void *data, int size, · 41 unmodified lines | ||
| 4056 | 4056 | int str_offset; |
| 4057 | 4057 | |
| 4058 | 4058 | if (arg->string.offset == -1) { |
| 4059 | − struct format_field *f; | |
| 4059 | + struct tep_format_field *f; | |
| 4060 | 4060 | |
| 4061 | 4061 | f = tep_find_any_field(event, arg->string.string); |
| 4062 | 4062 | arg->string.offset = f->offset; |
| @@ -4074,7 +4074,7 @@ static void print_str_arg(struct trace_seq *s, void *data, int size, · 11 unmodified lines | ||
| 4074 | 4074 | int bitmask_size; |
| 4075 | 4075 | |
| 4076 | 4076 | if (arg->bitmask.offset == -1) { |
| 4077 | − struct format_field *f; | |
| 4077 | + struct tep_format_field *f; | |
| 4078 | 4078 | |
| 4079 | 4079 | f = tep_find_any_field(event, arg->bitmask.bitmask); |
| 4080 | 4080 | arg->bitmask.offset = f->offset; |
| @@ -4215,7 +4215,7 @@ static void free_args(struct print_arg *args) · 134 unmodified lines | ||
| 4215 | 4215 | static struct print_arg *make_bprint_args(char *fmt, void *data, int size, struct tep_event_format *event) |
| 4216 | 4216 | { |
| 4217 | 4217 | struct tep_handle *pevent = event->pevent; |
| 4218 | − struct format_field *field, *ip_field; | |
| 4218 | + struct tep_format_field *field, *ip_field; | |
| 4219 | 4219 | struct print_arg *args, *arg, **next; |
| 4220 | 4220 | unsigned long long ip, val; |
| 4221 | 4221 | char *ptr; |
| @@ -4393,7 +4393,7 @@ get_bprint_format(void *data, int size __maybe_unused, · 171 unmodified lines | ||
| 4393 | 4393 | { |
| 4394 | 4394 | struct tep_handle *pevent = event->pevent; |
| 4395 | 4395 | unsigned long long addr; |
| 4396 | − struct format_field *field; | |
| 4396 | + struct tep_format_field *field; | |
| 4397 | 4397 | struct printk_map *printk; |
| 4398 | 4398 | char *format; |
| 4399 | 4399 | |
| @@ -4788,7 +4788,7 @@ static int is_printable_array(char *p, unsigned int len) · 388 unmodified lines | ||
| 4788 | 4788 | } |
| 4789 | 4789 | |
| 4790 | 4790 | void tep_print_field(struct trace_seq *s, void *data, |
| 4791 | − struct format_field *field) | |
| 4791 | + struct tep_format_field *field) | |
| 4792 | 4792 | { |
| 4793 | 4793 | unsigned long long val; |
| 4794 | 4794 | unsigned int offset, len, i; |
| @@ -4855,7 +4855,7 @@ void tep_print_field(struct trace_seq *s, void *data, · 60 unmodified lines | ||
| 4855 | 4855 | void tep_print_fields(struct trace_seq *s, void *data, |
| 4856 | 4856 | int size __maybe_unused, struct tep_event_format *event) |
| 4857 | 4857 | { |
| 4858 | − struct format_field *field; | |
| 4858 | + struct tep_format_field *field; | |
| 4859 | 4859 | |
| 4860 | 4860 | field = event->format.fields; |
| 4861 | 4861 | while (field) { |
| @@ -5664,12 +5664,12 @@ struct tep_event_format **tep_list_events(struct tep_handle *pevent, enum event_ · 802 unmodified lines | ||
| 5664 | 5664 | return events; |
| 5665 | 5665 | } |
| 5666 | 5666 | |
| 5667 | −static struct format_field ** | |
| 5667 | +static struct tep_format_field ** | |
| 5668 | 5668 | get_event_fields(const char *type, const char *name, |
| 5669 | − int count, struct format_field *list) | |
| 5669 | + int count, struct tep_format_field *list) | |
| 5670 | 5670 | { |
| 5671 | − struct format_field **fields; | |
| 5672 | − struct format_field *field; | |
| 5671 | + struct tep_format_field **fields; | |
| 5672 | + struct tep_format_field *field; | |
| 5673 | 5673 | int i = 0; |
| 5674 | 5674 | |
| 5675 | 5675 | fields = malloc(sizeof(*fields) * (count + 1)); |
| @@ -5702,7 +5702,7 @@ get_event_fields(const char *type, const char *name, · 26 unmodified lines | ||
| 5702 | 5702 | * Returns an allocated array of fields. The last item in the array is NULL. |
| 5703 | 5703 | * The array must be freed with free(). |
| 5704 | 5704 | */ |
| 5705 | −struct format_field **tep_event_common_fields(struct tep_event_format *event) | |
| 5705 | +struct tep_format_field **tep_event_common_fields(struct tep_event_format *event) | |
| 5706 | 5706 | { |
| 5707 | 5707 | return get_event_fields("common", event->name, |
| 5708 | 5708 | event->format.nr_common, |
| @@ -5716,7 +5716,7 @@ struct format_field **tep_event_common_fields(struct tep_event_format *event) · 7 unmodified lines | ||
| 5716 | 5716 | * Returns an allocated array of fields. The last item in the array is NULL. |
| 5717 | 5717 | * The array must be freed with free(). |
| 5718 | 5718 | */ |
| 5719 | −struct format_field **tep_event_fields(struct tep_event_format *event) | |
| 5719 | +struct tep_format_field **tep_event_fields(struct tep_event_format *event) | |
| 5720 | 5720 | { |
| 5721 | 5721 | return get_event_fields("event", event->name, |
| 5722 | 5722 | event->format.nr_fields, |
| @@ -6090,7 +6090,7 @@ enum tep_errno __tep_parse_format(struct tep_event_format **eventp, · 367 unmodified lines | ||
| 6090 | 6090 | } |
| 6091 | 6091 | |
| 6092 | 6092 | if (!ret && (event->flags & EVENT_FL_ISFTRACE)) { |
| 6093 | − struct format_field *field; | |
| 6093 | + struct tep_format_field *field; | |
| 6094 | 6094 | struct print_arg *arg, **list; |
| 6095 | 6095 | |
| 6096 | 6096 | /* old ftrace had no args */ |
| @@ -6230,7 +6230,7 @@ int tep_strerror(struct tep_handle *pevent __maybe_unused, · 133 unmodified lines | ||
| 6230 | 6230 | return 0; |
| 6231 | 6231 | } |
| 6232 | 6232 | |
| 6233 | −int get_field_val(struct trace_seq *s, struct format_field *field, | |
| 6233 | +int get_field_val(struct trace_seq *s, struct tep_format_field *field, | |
| 6234 | 6234 | const char *name, struct tep_record *record, |
| 6235 | 6235 | unsigned long long *val, int err) |
| 6236 | 6236 | { |
| @@ -6267,7 +6267,7 @@ void *tep_get_field_raw(struct trace_seq *s, struct tep_event_format *event, · 30 unmodified lines | ||
| 6267 | 6267 | const char *name, struct tep_record *record, |
| 6268 | 6268 | int *len, int err) |
| 6269 | 6269 | { |
| 6270 | − struct format_field *field; | |
| 6270 | + struct tep_format_field *field; | |
| 6271 | 6271 | void *data = record->data; |
| 6272 | 6272 | unsigned offset; |
| 6273 | 6273 | int dummy; |
| @@ -6314,7 +6314,7 @@ int tep_get_field_val(struct trace_seq *s, struct tep_event_format *event, · 40 unmodified lines | ||
| 6314 | 6314 | const char *name, struct tep_record *record, |
| 6315 | 6315 | unsigned long long *val, int err) |
| 6316 | 6316 | { |
| 6317 | − struct format_field *field; | |
| 6317 | + struct tep_format_field *field; | |
| 6318 | 6318 | |
| 6319 | 6319 | if (!event) |
| 6320 | 6320 | return -1; |
| @@ -6339,7 +6339,7 @@ int tep_get_common_field_val(struct trace_seq *s, struct tep_event_format *event · 18 unmodified lines | ||
| 6339 | 6339 | const char *name, struct tep_record *record, |
| 6340 | 6340 | unsigned long long *val, int err) |
| 6341 | 6341 | { |
| 6342 | − struct format_field *field; | |
| 6342 | + struct tep_format_field *field; | |
| 6343 | 6343 | |
| 6344 | 6344 | if (!event) |
| 6345 | 6345 | return -1; |
| @@ -6364,7 +6364,7 @@ int tep_get_any_field_val(struct trace_seq *s, struct tep_event_format *event, · 18 unmodified lines | ||
| 6364 | 6364 | const char *name, struct tep_record *record, |
| 6365 | 6365 | unsigned long long *val, int err) |
| 6366 | 6366 | { |
| 6367 | − struct format_field *field; | |
| 6367 | + struct tep_format_field *field; | |
| 6368 | 6368 | |
| 6369 | 6369 | if (!event) |
| 6370 | 6370 | return -1; |
| @@ -6389,7 +6389,7 @@ int tep_print_num_field(struct trace_seq *s, const char *fmt, · 18 unmodified lines | ||
| 6389 | 6389 | struct tep_event_format *event, const char *name, |
| 6390 | 6390 | struct tep_record *record, int err) |
| 6391 | 6391 | { |
| 6392 | − struct format_field *field = tep_find_field(event, name); | |
| 6392 | + struct tep_format_field *field = tep_find_field(event, name); | |
| 6393 | 6393 | unsigned long long val; |
| 6394 | 6394 | |
| 6395 | 6395 | if (!field) |
| @@ -6421,7 +6421,7 @@ int tep_print_func_field(struct trace_seq *s, const char *fmt, · 25 unmodified lines | ||
| 6421 | 6421 | struct tep_event_format *event, const char *name, |
| 6422 | 6422 | struct tep_record *record, int err) |
| 6423 | 6423 | { |
| 6424 | − struct format_field *field = tep_find_field(event, name); | |
| 6424 | + struct tep_format_field *field = tep_find_field(event, name); | |
| 6425 | 6425 | struct tep_handle *pevent = event->pevent; |
| 6426 | 6426 | unsigned long long val; |
| 6427 | 6427 | struct func_map *func; |
| @@ -6758,7 +6758,7 @@ void tep_ref(struct tep_handle *pevent) · 330 unmodified lines | ||
| 6758 | 6758 | pevent->ref_count++; |
| 6759 | 6759 | } |
| 6760 | 6760 | |
| 6761 | −void tep_free_format_field(struct format_field *field) | |
| 6761 | +void tep_free_format_field(struct tep_format_field *field) | |
| 6762 | 6762 | { |
| 6763 | 6763 | free(field->type); |
| 6764 | 6764 | if (field->alias != field->name) |
| @@ -6767,9 +6767,9 @@ void tep_free_format_field(struct format_field *field) · 2 unmodified lines | ||
| 6767 | 6767 | free(field); |
| 6768 | 6768 | } |
| 6769 | 6769 | |
| 6770 | −static void free_format_fields(struct format_field *field) | |
| 6770 | +static void free_format_fields(struct tep_format_field *field) | |
| 6771 | 6771 | { |
| 6772 | − struct format_field *next; | |
| 6772 | + struct tep_format_field *next; | |
| 6773 | 6773 | |
| 6774 | 6774 | while (field) { |
| 6775 | 6775 | next = field->next; |
| @@ -6778,7 +6778,7 @@ static void free_format_fields(struct format_field *field) · 2 unmodified lines | ||
| 6778 | 6778 | } |
| 6779 | 6779 | } |
| 6780 | 6780 | |
| 6781 | −static void free_formats(struct format *format) | |
| 6781 | +static void free_formats(struct tep_format *format) | |
| 6782 | 6782 | { |
| 6783 | 6783 | free_format_fields(format->common_fields); |
| 6784 | 6784 | free_format_fields(format->fields); |
| @@ -141,8 +141,8 @@ enum format_flags { · 140 unmodified lines | ||
| 141 | 141 | FIELD_IS_SYMBOLIC = 128, |
| 142 | 142 | }; |
| 143 | 143 | |
| 144 | −struct format_field { | |
| 145 | − struct format_field *next; | |
| 144 | +struct tep_format_field { | |
| 145 | + struct tep_format_field *next; | |
| 146 | 146 | struct tep_event_format *event; |
| 147 | 147 | char *type; |
| 148 | 148 | char *name; |
| @@ -154,11 +154,11 @@ struct format_field { · 5 unmodified lines | ||
| 154 | 154 | unsigned long flags; |
| 155 | 155 | }; |
| 156 | 156 | |
| 157 | −struct format { | |
| 157 | +struct tep_format { | |
| 158 | 158 | int nr_common; |
| 159 | 159 | int nr_fields; |
| 160 | − struct format_field *common_fields; | |
| 161 | − struct format_field *fields; | |
| 160 | + struct tep_format_field *common_fields; | |
| 161 | + struct tep_format_field *fields; | |
| 162 | 162 | }; |
| 163 | 163 | |
| 164 | 164 | struct print_arg_atom { |
| @@ -177,7 +177,7 @@ struct print_arg_bitmask { · 12 unmodified lines | ||
| 177 | 177 | |
| 178 | 178 | struct print_arg_field { |
| 179 | 179 | char *name; |
| 180 | − struct format_field *field; | |
| 180 | + struct tep_format_field *field; | |
| 181 | 181 | }; |
| 182 | 182 | |
| 183 | 183 | struct print_flag_sym { |
| @@ -214,7 +214,7 @@ struct print_arg_int_array { · 30 unmodified lines | ||
| 214 | 214 | }; |
| 215 | 215 | |
| 216 | 216 | struct print_arg_dynarray { |
| 217 | − struct format_field *field; | |
| 217 | + struct tep_format_field *field; | |
| 218 | 218 | struct print_arg *index; |
| 219 | 219 | }; |
| 220 | 220 | |
| @@ -282,7 +282,7 @@ struct tep_event_format { · 61 unmodified lines | ||
| 282 | 282 | char *name; |
| 283 | 283 | int id; |
| 284 | 284 | int flags; |
| 285 | − struct format format; | |
| 285 | + struct tep_format format; | |
| 286 | 286 | struct print_fmt print_fmt; |
| 287 | 287 | char *system; |
| 288 | 288 | tep_event_handler_func handler; |
| @@ -477,9 +477,9 @@ struct tep_handle { · 188 unmodified lines | ||
| 477 | 477 | |
| 478 | 478 | int flags; |
| 479 | 479 | |
| 480 | − struct format_field *bprint_ip_field; | |
| 481 | − struct format_field *bprint_fmt_field; | |
| 482 | − struct format_field *bprint_buf_field; | |
| 480 | + struct tep_format_field *bprint_ip_field; | |
| 481 | + struct tep_format_field *bprint_fmt_field; | |
| 482 | + struct tep_format_field *bprint_buf_field; | |
| 483 | 483 | |
| 484 | 484 | struct event_handler *handlers; |
| 485 | 485 | struct tep_function_handler *func_handlers; |
| @@ -607,7 +607,7 @@ enum tep_errno tep_parse_format(struct tep_handle *pevent, · 121 unmodified lines | ||
| 607 | 607 | const char *buf, |
| 608 | 608 | unsigned long size, const char *sys); |
| 609 | 609 | void tep_free_format(struct tep_event_format *event); |
| 610 | −void tep_free_format_field(struct format_field *field); | |
| 610 | +void tep_free_format_field(struct tep_format_field *field); | |
| 611 | 611 | |
| 612 | 612 | void *tep_get_field_raw(struct trace_seq *s, struct tep_event_format *event, |
| 613 | 613 | const char *name, struct tep_record *record, |
| @@ -644,15 +644,15 @@ int tep_register_print_function(struct tep_handle *pevent, · 30 unmodified lines | ||
| 644 | 644 | int tep_unregister_print_function(struct tep_handle *pevent, |
| 645 | 645 | tep_func_handler func, char *name); |
| 646 | 646 | |
| 647 | −struct format_field *tep_find_common_field(struct tep_event_format *event, const char *name); | |
| 648 | −struct format_field *tep_find_field(struct tep_event_format *event, const char *name); | |
| 649 | −struct format_field *tep_find_any_field(struct tep_event_format *event, const char *name); | |
| 647 | +struct tep_format_field *tep_find_common_field(struct tep_event_format *event, const char *name); | |
| 648 | +struct tep_format_field *tep_find_field(struct tep_event_format *event, const char *name); | |
| 649 | +struct tep_format_field *tep_find_any_field(struct tep_event_format *event, const char *name); | |
| 650 | 650 | |
| 651 | 651 | const char *tep_find_function(struct tep_handle *pevent, unsigned long long addr); |
| 652 | 652 | unsigned long long |
| 653 | 653 | tep_find_function_address(struct tep_handle *pevent, unsigned long long addr); |
| 654 | 654 | unsigned long long tep_read_number(struct tep_handle *pevent, const void *ptr, int size); |
| 655 | −int tep_read_number_field(struct format_field *field, const void *data, | |
| 655 | +int tep_read_number_field(struct tep_format_field *field, const void *data, | |
| 656 | 656 | unsigned long long *value); |
| 657 | 657 | |
| 658 | 658 | struct tep_event_format *tep_find_event(struct tep_handle *pevent, int id); |
| @@ -677,7 +677,7 @@ struct cmdline *tep_data_pid_from_comm(struct tep_handle *pevent, const char *co · 18 unmodified lines | ||
| 677 | 677 | int tep_cmdline_pid(struct tep_handle *pevent, struct cmdline *cmdline); |
| 678 | 678 | |
| 679 | 679 | void tep_print_field(struct trace_seq *s, void *data, |
| 680 | − struct format_field *field); | |
| 680 | + struct tep_format_field *field); | |
| 681 | 681 | void tep_print_fields(struct trace_seq *s, void *data, |
| 682 | 682 | int size __maybe_unused, struct tep_event_format *event); |
| 683 | 683 | void tep_event_info(struct trace_seq *s, struct tep_event_format *event, |
| @@ -686,8 +686,8 @@ int tep_strerror(struct tep_handle *pevent, enum tep_errno errnum, · 2 unmodified lines | ||
| 686 | 686 | char *buf, size_t buflen); |
| 687 | 687 | |
| 688 | 688 | struct tep_event_format **tep_list_events(struct tep_handle *pevent, enum event_sort_type); |
| 689 | −struct format_field **tep_event_common_fields(struct tep_event_format *event); | |
| 690 | −struct format_field **tep_event_fields(struct tep_event_format *event); | |
| 689 | +struct tep_format_field **tep_event_common_fields(struct tep_event_format *event); | |
| 690 | +struct tep_format_field **tep_event_fields(struct tep_event_format *event); | |
| 691 | 691 | |
| 692 | 692 | static inline int tep_get_cpus(struct tep_handle *pevent) |
| 693 | 693 | { |
| @@ -832,7 +832,7 @@ struct filter_arg_boolean { · 138 unmodified lines | ||
| 832 | 832 | }; |
| 833 | 833 | |
| 834 | 834 | struct filter_arg_field { |
| 835 | − struct format_field *field; | |
| 835 | + struct tep_format_field *field; | |
| 836 | 836 | }; |
| 837 | 837 | |
| 838 | 838 | struct filter_arg_value { |
| @@ -863,7 +863,7 @@ struct filter_arg_num { · 24 unmodified lines | ||
| 863 | 863 | |
| 864 | 864 | struct filter_arg_str { |
| 865 | 865 | enum filter_cmp_type type; |
| 866 | − struct format_field *field; | |
| 866 | + struct tep_format_field *field; | |
| 867 | 867 | char *val; |
| 868 | 868 | char *buffer; |
| 869 | 869 | regex_t reg; |
| @@ -16,11 +16,11 @@ · 15 unmodified lines | ||
| 16 | 16 | #define COMM "COMM" |
| 17 | 17 | #define CPU "CPU" |
| 18 | 18 | |
| 19 | −static struct format_field comm = { | |
| 19 | +static struct tep_format_field comm = { | |
| 20 | 20 | .name = "COMM", |
| 21 | 21 | }; |
| 22 | 22 | |
| 23 | −static struct format_field cpu = { | |
| 23 | +static struct tep_format_field cpu = { | |
| 24 | 24 | .name = "CPU", |
| 25 | 25 | }; |
| 26 | 26 | |
| @@ -336,7 +336,7 @@ static enum tep_errno · 309 unmodified lines | ||
| 336 | 336 | create_arg_item(struct tep_event_format *event, const char *token, |
| 337 | 337 | enum event_type type, struct filter_arg **parg, char *error_str) |
| 338 | 338 | { |
| 339 | − struct format_field *field; | |
| 339 | + struct tep_format_field *field; | |
| 340 | 340 | struct filter_arg *arg; |
| 341 | 341 | |
| 342 | 342 | arg = allocate_arg(); |
| @@ -1698,7 +1698,7 @@ get_comm(struct tep_event_format *event, struct tep_record *record) · 1355 unmodified lines | ||
| 1698 | 1698 | |
| 1699 | 1699 | static unsigned long long |
| 1700 | 1700 | get_value(struct tep_event_format *event, |
| 1701 | − struct format_field *field, struct tep_record *record) | |
| 1701 | + struct tep_format_field *field, struct tep_record *record) | |
| 1702 | 1702 | { |
| 1703 | 1703 | unsigned long long val; |
| 1704 | 1704 | |
| @@ -27,7 +27,7 @@ · 26 unmodified lines | ||
| 27 | 27 | static int call_site_handler(struct trace_seq *s, struct tep_record *record, |
| 28 | 28 | struct tep_event_format *event, void *context) |
| 29 | 29 | { |
| 30 | − struct format_field *field; | |
| 30 | + struct tep_format_field *field; | |
| 31 | 31 | unsigned long long val, addr; |
| 32 | 32 | void *data = record->data; |
| 33 | 33 | const char *func; |
| @@ -29,7 +29,7 @@ · 28 unmodified lines | ||
| 29 | 29 | static void print_string(struct trace_seq *s, struct tep_event_format *event, |
| 30 | 30 | const char *name, const void *data) |
| 31 | 31 | { |
| 32 | − struct format_field *f = tep_find_field(event, name); | |
| 32 | + struct tep_format_field *f = tep_find_field(event, name); | |
| 33 | 33 | int offset; |
| 34 | 34 | int length; |
| 35 | 35 | |
| @@ -45,7 +45,7 @@ static void write_state(struct trace_seq *s, int val) · 44 unmodified lines | ||
| 45 | 45 | trace_seq_putc(s, 'R'); |
| 46 | 46 | } |
| 47 | 47 | |
| 48 | −static void write_and_save_comm(struct format_field *field, | |
| 48 | +static void write_and_save_comm(struct tep_format_field *field, | |
| 49 | 49 | struct tep_record *record, |
| 50 | 50 | struct trace_seq *s, int pid) |
| 51 | 51 | { |
| @@ -69,7 +69,7 @@ static int sched_wakeup_handler(struct trace_seq *s, · 17 unmodified lines | ||
| 69 | 69 | struct tep_record *record, |
| 70 | 70 | struct tep_event_format *event, void *context) |
| 71 | 71 | { |
| 72 | − struct format_field *field; | |
| 72 | + struct tep_format_field *field; | |
| 73 | 73 | unsigned long long val; |
| 74 | 74 | |
| 75 | 75 | if (tep_get_field_val(s, event, "pid", record, &val, 1)) |
| @@ -98,7 +98,7 @@ static int sched_switch_handler(struct trace_seq *s, · 22 unmodified lines | ||
| 98 | 98 | struct tep_record *record, |
| 99 | 99 | struct tep_event_format *event, void *context) |
| 100 | 100 | { |
| 101 | − struct format_field *field; | |
| 101 | + struct tep_format_field *field; | |
| 102 | 102 | unsigned long long val; |
| 103 | 103 | |
| 104 | 104 | if (tep_get_field_val(s, event, "prev_pid", record, &val, 1)) |
| @@ -181,7 +181,7 @@ static int __tp_field__init_uint(struct tp_field *field, int size, int offset, b · 180 unmodified lines | ||
| 181 | 181 | return 0; |
| 182 | 182 | } |
| 183 | 183 | |
| 184 | −static int tp_field__init_uint(struct tp_field *field, struct format_field *format_field, bool needs_swap) | |
| 184 | +static int tp_field__init_uint(struct tp_field *field, struct tep_format_field *format_field, bool needs_swap) | |
| 185 | 185 | { |
| 186 | 186 | return __tp_field__init_uint(field, format_field->size, format_field->offset, needs_swap); |
| 187 | 187 | } |
| @@ -198,7 +198,7 @@ static int __tp_field__init_ptr(struct tp_field *field, int offset) · 10 unmodified lines | ||
| 198 | 198 | return 0; |
| 199 | 199 | } |
| 200 | 200 | |
| 201 | −static int tp_field__init_ptr(struct tp_field *field, struct format_field *format_field) | |
| 201 | +static int tp_field__init_ptr(struct tp_field *field, struct tep_format_field *format_field) | |
| 202 | 202 | { |
| 203 | 203 | return __tp_field__init_ptr(field, format_field->offset); |
| 204 | 204 | } |
| @@ -214,7 +214,7 @@ static int perf_evsel__init_tp_uint_field(struct perf_evsel *evsel, · 9 unmodified lines | ||
| 214 | 214 | struct tp_field *field, |
| 215 | 215 | const char *name) |
| 216 | 216 | { |
| 217 | − struct format_field *format_field = perf_evsel__field(evsel, name); | |
| 217 | + struct tep_format_field *format_field = perf_evsel__field(evsel, name); | |
| 218 | 218 | |
| 219 | 219 | if (format_field == NULL) |
| 220 | 220 | return -1; |
| @@ -230,7 +230,7 @@ static int perf_evsel__init_tp_ptr_field(struct perf_evsel *evsel, · 9 unmodified lines | ||
| 230 | 230 | struct tp_field *field, |
| 231 | 231 | const char *name) |
| 232 | 232 | { |
| 233 | − struct format_field *format_field = perf_evsel__field(evsel, name); | |
| 233 | + struct tep_format_field *format_field = perf_evsel__field(evsel, name); | |
| 234 | 234 | |
| 235 | 235 | if (format_field == NULL) |
| 236 | 236 | return -1; |
| @@ -867,7 +867,7 @@ struct syscall { · 630 unmodified lines | ||
| 867 | 867 | int args_size; |
| 868 | 868 | bool is_exit; |
| 869 | 869 | bool is_open; |
| 870 | − struct format_field *args; | |
| 870 | + struct tep_format_field *args; | |
| 871 | 871 | const char *name; |
| 872 | 872 | struct syscall_fmt *fmt; |
| 873 | 873 | struct syscall_arg_fmt *arg_fmt; |
| @@ -1279,7 +1279,7 @@ static int syscall__alloc_arg_fmts(struct syscall *sc, int nr_args) · 405 unmodified lines | ||
| 1279 | 1279 | |
| 1280 | 1280 | static int syscall__set_arg_fmts(struct syscall *sc) |
| 1281 | 1281 | { |
| 1282 | − struct format_field *field, *last_field = NULL; | |
| 1282 | + struct tep_format_field *field, *last_field = NULL; | |
| 1283 | 1283 | int idx = 0, len; |
| 1284 | 1284 | |
| 1285 | 1285 | for (field = sc->args; field; field = field->next, ++idx) { |
| @@ -1525,7 +1525,7 @@ static size_t syscall__scnprintf_args(struct syscall *sc, char *bf, size_t size, · 239 unmodified lines | ||
| 1525 | 1525 | ttrace->ret_scnprintf = NULL; |
| 1526 | 1526 | |
| 1527 | 1527 | if (sc->args != NULL) { |
| 1528 | − struct format_field *field; | |
| 1528 | + struct tep_format_field *field; | |
| 1529 | 1529 | |
| 1530 | 1530 | for (field = sc->args; field; |
| 1531 | 1531 | field = field->next, ++arg.idx, bit <<= 1) { |
| @@ -8,7 +8,7 @@ · 7 unmodified lines | ||
| 8 | 8 | static int perf_evsel__test_field(struct perf_evsel *evsel, const char *name, |
| 9 | 9 | int size, bool should_be_signed) |
| 10 | 10 | { |
| 11 | − struct format_field *field = perf_evsel__field(evsel, name); | |
| 11 | + struct tep_format_field *field = perf_evsel__field(evsel, name); | |
| 12 | 12 | int is_signed; |
| 13 | 13 | int ret = 0; |
| 14 | 14 | |
| @@ -182,7 +182,7 @@ err_put_field: · 181 unmodified lines | ||
| 182 | 182 | } |
| 183 | 183 | |
| 184 | 184 | static struct bt_ctf_field_type* |
| 185 | −get_tracepoint_field_type(struct ctf_writer *cw, struct format_field *field) | |
| 185 | +get_tracepoint_field_type(struct ctf_writer *cw, struct tep_format_field *field) | |
| 186 | 186 | { |
| 187 | 187 | unsigned long flags = field->flags; |
| 188 | 188 | |
| @@ -287,7 +287,7 @@ static int add_tracepoint_field_value(struct ctf_writer *cw, · 98 unmodified lines | ||
| 287 | 287 | struct bt_ctf_event_class *event_class, |
| 288 | 288 | struct bt_ctf_event *event, |
| 289 | 289 | struct perf_sample *sample, |
| 290 | − struct format_field *fmtf) | |
| 290 | + struct tep_format_field *fmtf) | |
| 291 | 291 | { |
| 292 | 292 | struct bt_ctf_field_type *type; |
| 293 | 293 | struct bt_ctf_field *array_field; |
| @@ -396,10 +396,10 @@ err_put_field: · 102 unmodified lines | ||
| 396 | 396 | static int add_tracepoint_fields_values(struct ctf_writer *cw, |
| 397 | 397 | struct bt_ctf_event_class *event_class, |
| 398 | 398 | struct bt_ctf_event *event, |
| 399 | − struct format_field *fields, | |
| 399 | + struct tep_format_field *fields, | |
| 400 | 400 | struct perf_sample *sample) |
| 401 | 401 | { |
| 402 | − struct format_field *field; | |
| 402 | + struct tep_format_field *field; | |
| 403 | 403 | int ret; |
| 404 | 404 | |
| 405 | 405 | for (field = fields; field; field = field->next) { |
| @@ -417,8 +417,8 @@ static int add_tracepoint_values(struct ctf_writer *cw, · 11 unmodified lines | ||
| 417 | 417 | struct perf_evsel *evsel, |
| 418 | 418 | struct perf_sample *sample) |
| 419 | 419 | { |
| 420 | − struct format_field *common_fields = evsel->tp_format->format.common_fields; | |
| 421 | − struct format_field *fields = evsel->tp_format->format.fields; | |
| 420 | + struct tep_format_field *common_fields = evsel->tp_format->format.common_fields; | |
| 421 | + struct tep_format_field *fields = evsel->tp_format->format.fields; | |
| 422 | 422 | int ret; |
| 423 | 423 | |
| 424 | 424 | ret = add_tracepoint_fields_values(cw, event_class, event, |
| @@ -970,7 +970,7 @@ out: · 545 unmodified lines | ||
| 970 | 970 | |
| 971 | 971 | static int event_class_add_field(struct bt_ctf_event_class *event_class, |
| 972 | 972 | struct bt_ctf_field_type *type, |
| 973 | − struct format_field *field) | |
| 973 | + struct tep_format_field *field) | |
| 974 | 974 | { |
| 975 | 975 | struct bt_ctf_field_type *t = NULL; |
| 976 | 976 | char *name; |
| @@ -1009,10 +1009,10 @@ static int event_class_add_field(struct bt_ctf_event_class *event_class, · 32 unmodified lines | ||
| 1009 | 1009 | } |
| 1010 | 1010 | |
| 1011 | 1011 | static int add_tracepoint_fields_types(struct ctf_writer *cw, |
| 1012 | − struct format_field *fields, | |
| 1012 | + struct tep_format_field *fields, | |
| 1013 | 1013 | struct bt_ctf_event_class *event_class) |
| 1014 | 1014 | { |
| 1015 | − struct format_field *field; | |
| 1015 | + struct tep_format_field *field; | |
| 1016 | 1016 | int ret; |
| 1017 | 1017 | |
| 1018 | 1018 | for (field = fields; field; field = field->next) { |
| @@ -1055,8 +1055,8 @@ static int add_tracepoint_types(struct ctf_writer *cw, · 36 unmodified lines | ||
| 1055 | 1055 | struct perf_evsel *evsel, |
| 1056 | 1056 | struct bt_ctf_event_class *class) |
| 1057 | 1057 | { |
| 1058 | − struct format_field *common_fields = evsel->tp_format->format.common_fields; | |
| 1059 | − struct format_field *fields = evsel->tp_format->format.fields; | |
| 1058 | + struct tep_format_field *common_fields = evsel->tp_format->format.common_fields; | |
| 1059 | + struct tep_format_field *fields = evsel->tp_format->format.fields; | |
| 1060 | 1060 | int ret; |
| 1061 | 1061 | |
| 1062 | 1062 | ret = add_tracepoint_fields_types(cw, common_fields, class); |
| @@ -2682,7 +2682,7 @@ int perf_event__synthesize_sample(union perf_event *event, u64 type, · 2681 unmodified lines | ||
| 2682 | 2682 | return 0; |
| 2683 | 2683 | } |
| 2684 | 2684 | |
| 2685 | −struct format_field *perf_evsel__field(struct perf_evsel *evsel, const char *name) | |
| 2685 | +struct tep_format_field *perf_evsel__field(struct perf_evsel *evsel, const char *name) | |
| 2686 | 2686 | { |
| 2687 | 2687 | return tep_find_field(evsel->tp_format, name); |
| 2688 | 2688 | } |
| @@ -2690,7 +2690,7 @@ struct format_field *perf_evsel__field(struct perf_evsel *evsel, const char *nam · 1 unmodified line | ||
| 2690 | 2690 | void *perf_evsel__rawptr(struct perf_evsel *evsel, struct perf_sample *sample, |
| 2691 | 2691 | const char *name) |
| 2692 | 2692 | { |
| 2693 | − struct format_field *field = perf_evsel__field(evsel, name); | |
| 2693 | + struct tep_format_field *field = perf_evsel__field(evsel, name); | |
| 2694 | 2694 | int offset; |
| 2695 | 2695 | |
| 2696 | 2696 | if (!field) |
| @@ -2706,7 +2706,7 @@ void *perf_evsel__rawptr(struct perf_evsel *evsel, struct perf_sample *sample, · 9 unmodified lines | ||
| 2706 | 2706 | return sample->raw_data + offset; |
| 2707 | 2707 | } |
| 2708 | 2708 | |
| 2709 | −u64 format_field__intval(struct format_field *field, struct perf_sample *sample, | |
| 2709 | +u64 format_field__intval(struct tep_format_field *field, struct perf_sample *sample, | |
| 2710 | 2710 | bool needs_swap) |
| 2711 | 2711 | { |
| 2712 | 2712 | u64 value; |
| @@ -2748,7 +2748,7 @@ u64 format_field__intval(struct format_field *field, struct perf_sample *sample, · 35 unmodified lines | ||
| 2748 | 2748 | u64 perf_evsel__intval(struct perf_evsel *evsel, struct perf_sample *sample, |
| 2749 | 2749 | const char *name) |
| 2750 | 2750 | { |
| 2751 | − struct format_field *field = perf_evsel__field(evsel, name); | |
| 2751 | + struct tep_format_field *field = perf_evsel__field(evsel, name); | |
| 2752 | 2752 | |
| 2753 | 2753 | if (!field) |
| 2754 | 2754 | return 0; |
| @@ -296,11 +296,11 @@ static inline char *perf_evsel__strval(struct perf_evsel *evsel, · 295 unmodified lines | ||
| 296 | 296 | return perf_evsel__rawptr(evsel, sample, name); |
| 297 | 297 | } |
| 298 | 298 | |
| 299 | −struct format_field; | |
| 299 | +struct tep_format_field; | |
| 300 | 300 | |
| 301 | −u64 format_field__intval(struct format_field *field, struct perf_sample *sample, bool needs_swap); | |
| 301 | +u64 format_field__intval(struct tep_format_field *field, struct perf_sample *sample, bool needs_swap); | |
| 302 | 302 | |
| 303 | −struct format_field *perf_evsel__field(struct perf_evsel *evsel, const char *name); | |
| 303 | +struct tep_format_field *perf_evsel__field(struct perf_evsel *evsel, const char *name); | |
| 304 | 304 | |
| 305 | 305 | #define perf_evsel__match(evsel, t, c) \ |
| 306 | 306 | (evsel->attr.type == PERF_TYPE_##t && \ |
| @@ -73,7 +73,7 @@ int perf_evsel__fprintf(struct perf_evsel *evsel, · 72 unmodified lines | ||
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | if (details->trace_fields) { |
| 76 | − struct format_field *field; | |
| 76 | + struct tep_format_field *field; | |
| 77 | 77 | |
| 78 | 78 | if (evsel->attr.type != PERF_TYPE_TRACEPOINT) { |
| 79 | 79 | printed += comma_fprintf(fp, &first, " (not a tracepoint)"); |
| @@ -340,7 +340,7 @@ static bool is_tracepoint(struct pyrf_event *pevent) · 339 unmodified lines | ||
| 340 | 340 | } |
| 341 | 341 | |
| 342 | 342 | static PyObject* |
| 343 | −tracepoint_field(struct pyrf_event *pe, struct format_field *field) | |
| 343 | +tracepoint_field(struct pyrf_event *pe, struct tep_format_field *field) | |
| 344 | 344 | { |
| 345 | 345 | struct tep_handle *pevent = field->event->pevent; |
| 346 | 346 | void *data = pe->sample.raw_data; |
| @@ -383,7 +383,7 @@ get_tracepoint_field(struct pyrf_event *pevent, PyObject *attr_name) · 36 unmodified lines | ||
| 383 | 383 | { |
| 384 | 384 | const char *str = _PyUnicode_AsString(PyObject_Str(attr_name)); |
| 385 | 385 | struct perf_evsel *evsel = pevent->evsel; |
| 386 | − struct format_field *field; | |
| 386 | + struct tep_format_field *field; | |
| 387 | 387 | |
| 388 | 388 | if (!evsel->tp_format) { |
| 389 | 389 | struct tep_event_format *tp_format; |
| @@ -339,7 +339,7 @@ static void perl_process_tracepoint(struct perf_sample *sample, · 338 unmodified lines | ||
| 339 | 339 | { |
| 340 | 340 | struct thread *thread = al->thread; |
| 341 | 341 | struct tep_event_format *event = evsel->tp_format; |
| 342 | − struct format_field *field; | |
| 342 | + struct tep_format_field *field; | |
| 343 | 343 | static char handler[256]; |
| 344 | 344 | unsigned long long val; |
| 345 | 345 | unsigned long s, ns; |
| @@ -538,7 +538,7 @@ static int perl_stop_script(void) · 192 unmodified lines | ||
| 538 | 538 | static int perl_generate_script(struct tep_handle *pevent, const char *outfile) |
| 539 | 539 | { |
| 540 | 540 | struct tep_event_format *event = NULL; |
| 541 | − struct format_field *f; | |
| 541 | + struct tep_format_field *f; | |
| 542 | 542 | char fname[PATH_MAX]; |
| 543 | 543 | int not_first, count; |
| 544 | 544 | FILE *ofp; |
| @@ -333,7 +333,7 @@ static void define_event_symbols(struct tep_event_format *event, · 332 unmodified lines | ||
| 333 | 333 | } |
| 334 | 334 | |
| 335 | 335 | static PyObject *get_field_numeric_entry(struct tep_event_format *event, |
| 336 | − struct format_field *field, void *data) | |
| 336 | + struct tep_format_field *field, void *data) | |
| 337 | 337 | { |
| 338 | 338 | bool is_array = field->flags & FIELD_IS_ARRAY; |
| 339 | 339 | PyObject *obj = NULL, *list = NULL; |
| @@ -794,7 +794,7 @@ static void python_process_tracepoint(struct perf_sample *sample, · 454 unmodified lines | ||
| 794 | 794 | PyObject *handler, *context, *t, *obj = NULL, *callchain; |
| 795 | 795 | PyObject *dict = NULL, *all_entries_dict = NULL; |
| 796 | 796 | static char handler_name[256]; |
| 797 | − struct format_field *field; | |
| 797 | + struct tep_format_field *field; | |
| 798 | 798 | unsigned long s, ns; |
| 799 | 799 | unsigned n = 0; |
| 800 | 800 | int pid; |
| @@ -1591,7 +1591,7 @@ static int python_stop_script(void) · 790 unmodified lines | ||
| 1591 | 1591 | static int python_generate_script(struct tep_handle *pevent, const char *outfile) |
| 1592 | 1592 | { |
| 1593 | 1593 | struct tep_event_format *event = NULL; |
| 1594 | − struct format_field *f; | |
| 1594 | + struct tep_format_field *f; | |
| 1595 | 1595 | char fname[PATH_MAX]; |
| 1596 | 1596 | int not_first, count; |
| 1597 | 1597 | FILE *ofp; |
| @@ -1884,7 +1884,7 @@ static int __sort_dimension__add_hpp_output(struct sort_dimension *sd, · 1883 unmodified lines | ||
| 1884 | 1884 | struct hpp_dynamic_entry { |
| 1885 | 1885 | struct perf_hpp_fmt hpp; |
| 1886 | 1886 | struct perf_evsel *evsel; |
| 1887 | − struct format_field *field; | |
| 1887 | + struct tep_format_field *field; | |
| 1888 | 1888 | unsigned dynamic_len; |
| 1889 | 1889 | bool raw_trace; |
| 1890 | 1890 | }; |
| @@ -1915,7 +1915,7 @@ static void update_dynamic_len(struct hpp_dynamic_entry *hde, · 24 unmodified lines | ||
| 1915 | 1915 | struct hist_entry *he) |
| 1916 | 1916 | { |
| 1917 | 1917 | char *str, *pos; |
| 1918 | − struct format_field *field = hde->field; | |
| 1918 | + struct tep_format_field *field = hde->field; | |
| 1919 | 1919 | size_t namelen; |
| 1920 | 1920 | bool last = false; |
| 1921 | 1921 | |
| @@ -2000,7 +2000,7 @@ static int __sort__hde_entry(struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, · 78 unmodified lines | ||
| 2000 | 2000 | struct hpp_dynamic_entry *hde; |
| 2001 | 2001 | size_t len = fmt->user_len; |
| 2002 | 2002 | char *str, *pos; |
| 2003 | − struct format_field *field; | |
| 2003 | + struct tep_format_field *field; | |
| 2004 | 2004 | size_t namelen; |
| 2005 | 2005 | bool last = false; |
| 2006 | 2006 | int ret; |
| @@ -2060,7 +2060,7 @@ static int64_t __sort__hde_cmp(struct perf_hpp_fmt *fmt, · 53 unmodified lines | ||
| 2060 | 2060 | struct hist_entry *a, struct hist_entry *b) |
| 2061 | 2061 | { |
| 2062 | 2062 | struct hpp_dynamic_entry *hde; |
| 2063 | − struct format_field *field; | |
| 2063 | + struct tep_format_field *field; | |
| 2064 | 2064 | unsigned offset, size; |
| 2065 | 2065 | |
| 2066 | 2066 | hde = container_of(fmt, struct hpp_dynamic_entry, hpp); |
| @@ -2117,7 +2117,7 @@ static void hde_free(struct perf_hpp_fmt *fmt) · 50 unmodified lines | ||
| 2117 | 2117 | } |
| 2118 | 2118 | |
| 2119 | 2119 | static struct hpp_dynamic_entry * |
| 2120 | −__alloc_dynamic_entry(struct perf_evsel *evsel, struct format_field *field, | |
| 2120 | +__alloc_dynamic_entry(struct perf_evsel *evsel, struct tep_format_field *field, | |
| 2121 | 2121 | int level) |
| 2122 | 2122 | { |
| 2123 | 2123 | struct hpp_dynamic_entry *hde; |
| @@ -2252,7 +2252,7 @@ static struct perf_evsel *find_evsel(struct perf_evlist *evlist, char *event_nam · 128 unmodified lines | ||
| 2252 | 2252 | } |
| 2253 | 2253 | |
| 2254 | 2254 | static int __dynamic_dimension__add(struct perf_evsel *evsel, |
| 2255 | − struct format_field *field, | |
| 2255 | + struct tep_format_field *field, | |
| 2256 | 2256 | bool raw_trace, int level) |
| 2257 | 2257 | { |
| 2258 | 2258 | struct hpp_dynamic_entry *hde; |
| @@ -2270,7 +2270,7 @@ static int __dynamic_dimension__add(struct perf_evsel *evsel, · 11 unmodified lines | ||
| 2270 | 2270 | static int add_evsel_fields(struct perf_evsel *evsel, bool raw_trace, int level) |
| 2271 | 2271 | { |
| 2272 | 2272 | int ret; |
| 2273 | − struct format_field *field; | |
| 2273 | + struct tep_format_field *field; | |
| 2274 | 2274 | |
| 2275 | 2275 | field = evsel->tp_format->format.fields; |
| 2276 | 2276 | while (field) { |
| @@ -2305,7 +2305,7 @@ static int add_all_matching_fields(struct perf_evlist *evlist, · 28 unmodified lines | ||
| 2305 | 2305 | { |
| 2306 | 2306 | int ret = -ESRCH; |
| 2307 | 2307 | struct perf_evsel *evsel; |
| 2308 | − struct format_field *field; | |
| 2308 | + struct tep_format_field *field; | |
| 2309 | 2309 | |
| 2310 | 2310 | evlist__for_each_entry(evlist, evsel) { |
| 2311 | 2311 | if (evsel->attr.type != PERF_TYPE_TRACEPOINT) |
| @@ -2327,7 +2327,7 @@ static int add_dynamic_entry(struct perf_evlist *evlist, const char *tok, · 15 unmodified lines | ||
| 2327 | 2327 | { |
| 2328 | 2328 | char *str, *event_name, *field_name, *opt_name; |
| 2329 | 2329 | struct perf_evsel *evsel; |
| 2330 | − struct format_field *field; | |
| 2330 | + struct tep_format_field *field; | |
| 2331 | 2331 | bool raw_trace = symbol_conf.raw_trace; |
| 2332 | 2332 | int ret = 0; |
| 2333 | 2333 | |
| @@ -34,7 +34,7 @@ static int get_common_field(struct scripting_context *context, · 33 unmodified lines | ||
| 34 | 34 | { |
| 35 | 35 | struct tep_handle *pevent = context->pevent; |
| 36 | 36 | struct tep_event_format *event; |
| 37 | − struct format_field *field; | |
| 37 | + struct tep_format_field *field; | |
| 38 | 38 | |
| 39 | 39 | if (!*size) { |
| 40 | 40 | if (!pevent->events) |
| @@ -96,7 +96,7 @@ int common_pc(struct scripting_context *context) · 55 unmodified lines | ||
| 96 | 96 | unsigned long long |
| 97 | 97 | raw_field_value(struct tep_event_format *event, const char *name, void *data) |
| 98 | 98 | { |
| 99 | − struct format_field *field; | |
| 99 | + struct tep_format_field *field; | |
| 100 | 100 | unsigned long long val; |
| 101 | 101 | |
| 102 | 102 | field = tep_find_any_field(event, name); |