Home
last modified time | relevance | path

Searched refs:field (Results 1 – 25 of 68) sorted by relevance

123

/tools/lib/traceevent/Documentation/
Dlibtraceevent-field_find.txt7 Search for a field in an event.
22 These functions search for a field with given name in an event. The field
23 returned can be used to find the field content from within a data record.
25 The _tep_find_common_field()_ function searches for a common field with _name_
28 The _tep_find_field()_ function searches for an event specific field with
31 The _tep_find_any_field()_ function searches for any field with _name_ in the
37 functions return a pointer to the found field, or NULL in case there is no field
48 struct tep_format_field *field;
56 field = tep_find_common_field(event, "common_pid");
57 if (field == NULL) {
[all …]
Dlibtraceevent-field_print.txt7 Print the field content.
24 These functions print recorded field's data, according to the field's type.
27 the _field_ and prints it into _s_, according to the field type.
29 The _tep_print_fields()_ prints each field name followed by the record's field
30 value according to the field's type:
38 The _tep_print_num_field()_ function prints a numeric field with given format
39 string. A search is performed in the _event_ for a field with _name_. If such
40 field is found, its value is extracted from the _record_ and is printed in the
44 The _tep_print_func_field()_ function prints a function field with given format
45 string. A search is performed in the _event_ for a field with _name_. If such
[all …]
Dlibtraceevent-field_get_val.txt7 tep_get_field_raw - Get value of a field.
24 These functions can be used to find a field and retrieve its value.
26 The _tep_get_any_field_val()_ function searches in the _record_ for a field
27 with _name_, part of the _event_. If the field is found, its value is stored in
38 The _tep_get_field_raw()_ function searches in the _record_ for a field with
39 _name_, part of the _event_. If the field is found, a pointer to where the field
49 The _tep_get_field_raw()_ function returns a pointer to field's raw data, and
74 /* Got the value of common type field */
77 /* Got the value of pid specific field */
81 /* Got a pointer to the comm event specific field */
/tools/lib/traceevent/plugins/
Dplugin_sched_switch.c33 static void write_and_save_comm(struct tep_format_field *field, in write_and_save_comm() argument
40 comm = (char *)(record->data + field->offset); in write_and_save_comm()
43 field->size, comm); in write_and_save_comm()
50 tep_register_comm(field->event->tep, comm, pid); in write_and_save_comm()
57 struct tep_format_field *field; in sched_wakeup_handler() local
63 field = tep_find_any_field(event, "comm"); in sched_wakeup_handler()
64 if (field) { in sched_wakeup_handler()
65 write_and_save_comm(field, record, s, val); in sched_wakeup_handler()
86 struct tep_format_field *field; in sched_switch_handler() local
92 field = tep_find_any_field(event, "prev_comm"); in sched_switch_handler()
[all …]
Dplugin_kmem.c15 struct tep_format_field *field; in call_site_handler() local
20 field = tep_find_field(event, "call_site"); in call_site_handler()
21 if (!field) in call_site_handler()
24 if (tep_read_number_field(field, data, &val)) in call_site_handler()
Dplugin_function.c176 struct tep_format_field *field; in trace_stack_handler() local
182 field = tep_find_any_field(event, "caller"); in trace_stack_handler()
183 if (!field) { in trace_stack_handler()
192 for (data += field->offset; data < record->data + record->size; in trace_stack_handler()
214 struct tep_format_field *field; in trace_raw_data_handler() local
224 field = tep_find_any_field(event, "buf"); in trace_raw_data_handler()
225 if (!field) { in trace_raw_data_handler()
232 for (data += field->offset; data < record->data + record->size; in trace_raw_data_handler()
/tools/lib/traceevent/
Devent-parse.c874 free(arg->field.name); in free_arg()
877 free_arg(arg->flags.field); in free_arg()
882 free_arg(arg->symbol.field); in free_arg()
887 free_arg(arg->hex.field); in free_arg()
891 free_arg(arg->int_array.field); in free_arg()
1352 static int field_is_string(struct tep_format_field *field) in field_is_string() argument
1354 if ((field->flags & TEP_FIELD_IS_ARRAY) && in field_is_string()
1355 (strstr(field->type, "char") || strstr(field->type, "u8") || in field_is_string()
1356 strstr(field->type, "s8"))) in field_is_string()
1362 static int field_is_dynamic(struct tep_format_field *field) in field_is_dynamic() argument
[all …]
Dparse-filter.c335 struct tep_format_field *field; in create_arg_item() local
367 field = tep_find_any_field(event, token); in create_arg_item()
368 if (!field) { in create_arg_item()
371 field = &comm; in create_arg_item()
373 field = &cpu; in create_arg_item()
382 arg->field.field = field; in create_arg_item()
549 op->str.field = left->field.field; in add_right()
558 op->str.buffer = malloc(op->str.field->size + 1); in add_right()
564 op->str.buffer[op->str.field->size] = 0; in add_right()
1540 struct tep_format_field *field, struct tep_record *record) in get_value() argument
[all …]
Devent-parse.h166 struct tep_format_field *field; member
181 struct tep_print_arg *field; member
187 struct tep_print_arg *field; member
192 struct tep_print_arg *field; member
197 struct tep_print_arg *field; member
203 struct tep_format_field *field; member
247 struct tep_print_arg_field field; member
521 int tep_read_number_field(struct tep_format_field *field, const void *data,
544 struct tep_format_field *field);
651 struct tep_format_field *field; member
[all …]
/tools/perf/scripts/perl/Perf-Trace-Util/lib/Perf/Trace/
DCore.pm106 for my $field (keys %{$flag_fields{$event}}) {
107 print " field: $field:\n";
108 print " delim: $flag_fields{$event}{$field}{'delim'}\n";
109 foreach my $idx (sort {$a <=> $b} keys %{$flag_fields{$event}{$field}{"values"}}) {
110 print " value $idx: $flag_fields{$event}{$field}{'values'}{$idx}\n";
153 for my $field (keys %{$symbolic_fields{$event}}) {
154 print " field: $field:\n";
155 foreach my $idx (sort {$a <=> $b} keys %{$symbolic_fields{$event}{$field}{"values"}}) {
156 print " value $idx: $symbolic_fields{$event}{$field}{'values'}{$idx}\n";
/tools/testing/selftests/bpf/verifier/
Dwide_access.c1 #define BPF_SOCK_ADDR_STORE(field, off, res, err) \ argument
3 "wide store to bpf_sock_addr." #field "[" #off "]", \
7 offsetof(struct bpf_sock_addr, field[off])), \
38 #define BPF_SOCK_ADDR_LOAD(field, off, res, err) \ argument
40 "wide load from bpf_sock_addr." #field "[" #off "]", \
43 offsetof(struct bpf_sock_addr, field[off])), \
/tools/perf/pmu-events/
Djevents.c193 static struct field { struct
194 const char *field; argument
219 static int match_field(char *map, jsmntok_t *field, int nz, in match_field() argument
222 struct field *f; in match_field()
225 for (f = fields; f->field; f++) in match_field()
226 if (json_streq(map, field, f->field) && nz) { in match_field()
406 #define ADD_EVENT_FIELD(field) do { if (je->field) { \ argument
407 es->field = strdup(je->field); \
408 if (!es->field) \
412 #define FREE_EVENT_FIELD(field) free(es->field) argument
[all …]
/tools/perf/util/
Dtrace-event-parse.c20 struct tep_format_field *field; in get_common_field() local
28 field = tep_find_common_field(event, type); in get_common_field()
29 if (!field) in get_common_field()
31 *offset = field->offset; in get_common_field()
32 *size = field->size; in get_common_field()
83 struct tep_format_field *field; in raw_field_value() local
86 field = tep_find_any_field(event, name); in raw_field_value()
87 if (!field) in raw_field_value()
90 tep_read_number_field(field, data, &val); in raw_field_value()
Ddata-convert-bt.c102 struct bt_ctf_field *field; in value_set() local
106 field = bt_ctf_field_create(type); in value_set()
107 if (!field) { in value_set()
113 ret = bt_ctf_field_signed_integer_set_value(field, val); in value_set()
119 ret = bt_ctf_field_unsigned_integer_set_value(field, val); in value_set()
126 ret = bt_ctf_event_set_payload(event, name, field); in value_set()
135 bt_ctf_field_put(field); in value_set()
157 static int string_set_value(struct bt_ctf_field *field, const char *string);
163 struct bt_ctf_field *field; in value_set_string() local
166 field = bt_ctf_field_create(type); in value_set_string()
[all …]
Devsel_fprintf.c77 struct tep_format_field *field; in evsel__fprintf() local
84 field = evsel->tp_format->format.fields; in evsel__fprintf()
85 if (field == NULL) { in evsel__fprintf()
90 printed += comma_fprintf(fp, &first, " trace_fields: %s", field->name); in evsel__fprintf()
92 field = field->next; in evsel__fprintf()
93 while (field) { in evsel__fprintf()
94 printed += comma_fprintf(fp, &first, "%s", field->name); in evsel__fprintf()
95 field = field->next; in evsel__fprintf()
Dsort.c2019 struct tep_format_field *field; member
2028 int namelen = strlen(hde->field->name); in hde_width()
2029 int fieldlen = hde->field->size; in hde_width()
2034 if (!(hde->field->flags & TEP_FIELD_IS_STRING)) { in hde_width()
2036 fieldlen = hde->field->size * 2 + 2; in hde_width()
2050 struct tep_format_field *field = hde->field; in update_dynamic_len() local
2061 namelen = strlen(field->name); in update_dynamic_len()
2071 if (!strncmp(str, field->name, namelen)) { in update_dynamic_len()
2102 return scnprintf(hpp->buf, hpp->size, "%*.*s", len, len, hde->field->name); in __sort__hde_header()
2135 struct tep_format_field *field; in __sort__hde_entry() local
[all …]
/tools/perf/tests/
Devsel-tp-sched.c11 struct tep_format_field *field = evsel__field(evsel, name); in perf_evsel__test_field() local
15 if (field == NULL) { in perf_evsel__test_field()
20 is_signed = !!(field->flags & TEP_FIELD_IS_SIGNED); in perf_evsel__test_field()
27 if (field->size != size) { in perf_evsel__test_field()
29 evsel->name, name, field->size, size); in perf_evsel__test_field()
/tools/perf/util/scripting-engines/
Dtrace-event-perl.c104 static void define_symbolic_values(struct tep_print_flag_sym *field, in define_symbolic_values() argument
108 define_symbolic_value(ev_name, field_name, field->value, field->str); in define_symbolic_values()
109 if (field->next) in define_symbolic_values()
110 define_symbolic_values(field->next, ev_name, field_name); in define_symbolic_values()
162 static void define_flag_values(struct tep_print_flag_sym *field, in define_flag_values() argument
166 define_flag_value(ev_name, field_name, field->value, field->str); in define_flag_values()
167 if (field->next) in define_flag_values()
168 define_flag_values(field->next, ev_name, field_name); in define_flag_values()
211 cur_field_name = strdup(args->field.name); in define_event_symbols()
214 define_event_symbols(event, ev_name, args->flags.field); in define_event_symbols()
[all …]
Dtrace-event-python.c231 struct tep_print_flag_sym *field, in define_values() argument
235 define_value(field_type, ev_name, field_name, field->value, in define_values()
236 field->str); in define_values()
238 if (field->next) in define_values()
239 define_values(field_type, field->next, ev_name, field_name); in define_values()
288 cur_field_name = strdup(args->field.name); in define_event_symbols()
291 define_event_symbols(event, ev_name, args->flags.field); in define_event_symbols()
298 define_event_symbols(event, ev_name, args->symbol.field); in define_event_symbols()
305 define_event_symbols(event, ev_name, args->hex.field); in define_event_symbols()
309 define_event_symbols(event, ev_name, args->int_array.field); in define_event_symbols()
[all …]
/tools/lib/bpf/
Dbpf_core_read.h40 #define __CORE_RELO(src, field, info) \ argument
41 __builtin_preserve_field_info((src)->field, BPF_FIELD_##info)
69 #define BPF_CORE_READ_BITFIELD_PROBED(s, field) ({ \ argument
72 __CORE_BITFIELD_PROBE_READ(&val, s, field); \
73 val <<= __CORE_RELO(s, field, LSHIFT_U64); \
74 if (__CORE_RELO(s, field, SIGNED)) \
75 val = ((long long)val) >> __CORE_RELO(s, field, RSHIFT_U64); \
77 val = val >> __CORE_RELO(s, field, RSHIFT_U64); \
87 #define BPF_CORE_READ_BITFIELD(s, field) ({ \ argument
88 const void *p = (const void *)s + __CORE_RELO(s, field, BYTE_OFFSET); \
[all …]
Dlibbpf_internal.h139 #define OPTS_HAS(opts, field) \ argument
140 ((opts) && opts->sz >= offsetofend(typeof(*(opts)), field))
141 #define OPTS_GET(opts, field, fallback_value) \ argument
142 (OPTS_HAS(opts, field) ? (opts)->field : fallback_value)
143 #define OPTS_SET(opts, field, value) \ argument
145 if (OPTS_HAS(opts, field)) \
146 (opts)->field = value; \
/tools/kvm/kvm_stat/
Dkvm_stat268 def tracepoint_is_child(self, field): argument
269 if (TRACE_FILTER.match(field)):
271 return field.split('(', 1)[0]
281 def debugfs_is_child(self, field): argument
301 def debugfs_is_child(self, field): argument
313 def debugfs_is_child(self, field): argument
325 def debugfs_is_child(self, field): argument
327 if field.startswith('instruction_'):
512 def is_field_wanted(fields_filter, field): argument
516 return re.match(fields_filter, field) is not None
[all …]
/tools/include/linux/
Drbtree.h97 #define rbtree_postorder_for_each_entry_safe(pos, n, root, field) \ argument
98 for (pos = rb_entry_safe(rb_first_postorder(root), typeof(*pos), field); \
99 pos && ({ n = rb_entry_safe(rb_next_postorder(&pos->field), \
100 typeof(*pos), field); 1; }); \
/tools/perf/Documentation/
Dperf-script-perl.txt28 field for each event in the trace file.
45 Most of the event's field values are passed as arguments to the
62 field:unsigned short common_type;
63 field:unsigned char common_flags;
64 field:unsigned char common_preempt_count;
65 field:int common_pid;
67 field:char comm[TASK_COMM_LEN];
68 field:pid_t pid;
69 field:int prio;
70 field:int success;
[all …]
/tools/perf/
Dbuiltin-trace.c207 u64 (*integer)(struct tp_field *field, struct perf_sample *sample);
208 void *(*pointer)(struct tp_field *field, struct perf_sample *sample);
213 static u64 tp_field__u##bits(struct tp_field *field, struct perf_sample *sample) \
216 memcpy(&value, sample->raw_data + field->offset, sizeof(value)); \
226 static u64 tp_field__swapped_u##bits(struct tp_field *field, struct perf_sample *sample) \
229 memcpy(&value, sample->raw_data + field->offset, sizeof(value)); \
237 static int __tp_field__init_uint(struct tp_field *field, int size, int offset, bool needs_swap) in __tp_field__init_uint() argument
239 field->offset = offset; in __tp_field__init_uint()
243 field->integer = tp_field__u8; in __tp_field__init_uint()
246 field->integer = needs_swap ? tp_field__swapped_u16 : tp_field__u16; in __tp_field__init_uint()
[all …]

123