9 from collections
import defaultdict
12 return defaultdict(autodict)
18 flag_fields[event_name][field_name][
'delim'] = delim
21 flag_fields[event_name][field_name][
'values'][value] = field_str
28 symbolic_fields[event_name][field_name][
'values'][value] = field_str
33 if flag_fields[event_name][field_name]:
35 keys = flag_fields[event_name][field_name][
'values'].
keys()
38 if not value
and not idx:
39 string += flag_fields[event_name][field_name][
'values'][idx]
41 if idx
and (value & idx) == idx:
42 if print_delim
and flag_fields[event_name][field_name][
'delim']:
43 string +=
" " + flag_fields[event_name][field_name][
'delim'] +
" " 44 string += flag_fields[event_name][field_name][
'values'][idx]
53 if symbolic_fields[event_name][field_name]:
54 keys = symbolic_fields[event_name][field_name][
'values'].
keys()
57 if not value
and not idx:
58 string = symbolic_fields[event_name][field_name][
'values'][idx]
61 string = symbolic_fields[event_name][field_name][
'values'][idx]
66 trace_flags = { 0x00:
"NONE", \
68 0x02:
"IRQS_NOSUPPORT", \
69 0x04:
"NEED_RESCHED", \
77 keys = trace_flags.keys()
80 if not value
and not idx:
84 if idx
and (value & idx) == idx:
87 string += trace_flags[idx]
102 if state
not in states:
109 def __init__(self, common_cpu, common_secs, common_nsecs,
110 common_pid, common_comm, common_callchain):
119 return (self.
secs * (10 ** 9)) + self.
nsecs 122 return "%d.%d" % (self.
secs, int(self.
nsecs / 1000))
def define_symbolic_field(event_name, field_name)
def define_flag_value(event_name, field_name, value, field_str)
def flag_str(event_name, field_name, value)
def trace_flag_str(value)
def define_symbolic_value(event_name, field_name, value, field_str)
def symbol_str(event_name, field_name, value)
def define_flag_field(event_name, field_name, delim)