Home | History | Annotate | Download | only in simpleperf

Lines Matching refs:attr

78   perf_event_attr attr;
79 memset(&attr, 0, sizeof(attr));
80 attr.size = sizeof(perf_event_attr);
81 attr.type = event_type.type;
82 attr.config = event_type.config;
83 attr.mmap = 1;
84 attr.comm = 1;
85 attr.disabled = 0;
88 attr.read_format =
90 attr.sample_type |=
93 if (attr.type == PERF_TYPE_TRACEPOINT) {
94 attr.sample_freq = 0;
95 attr.sample_period = 1;
97 attr.sample_type |= PERF_SAMPLE_RAW;
99 return attr;
102 void DumpPerfEventAttr(const perf_event_attr& attr, size_t indent) {
104 const EventType* event_type = FindEventTypeByConfig(attr.type, attr.config);
111 PrintIndented(indent + 1, "type %u, size %u, config %llu\n", attr.type, attr.size, attr.config);
113 if (attr.freq != 0) {
114 PrintIndented(indent + 1, "sample_freq %llu\n", attr.sample_freq);
116 PrintIndented(indent + 1, "sample_period %llu\n", attr.sample_period);
119 PrintIndented(indent + 1, "sample_type (0x%llx) %s\n", attr.sample_type,
120 SampleTypeToString(attr.sample_type).c_str());
122 PrintIndented(indent + 1, "read_format (0x%llx) %s\n", attr.read_format,
123 ReadFormatToString(attr.read_format).c_str());
125 PrintIndented(indent + 1, "disabled %u, inherit %u, pinned %u, exclusive %u\n", attr.disabled,
126 attr.inherit, attr.pinned, attr.exclusive);
129 attr.exclude_user, attr.exclude_kernel, attr.exclude_hv);
131 PrintIndented(indent + 1, "exclude_idle %u, mmap %u, comm %u, freq %u\n", attr.exclude_idle,
132 attr.mmap, attr.comm, attr.freq);
134 PrintIndented(indent + 1, "inherit_stat %u, enable_on_exec %u, task %u\n", attr.inherit_stat,
135 attr.enable_on_exec, attr.task);
137 PrintIndented(indent + 1, "watermark %u, precise_ip %u, mmap_data %u\n", attr.watermark,
138 attr.precise_ip, attr.mmap_data);
141 attr.sample_id_all, attr.exclude_host, attr.exclude_guest);
142 PrintIndented(indent + 1, "branch_sample_type 0x%" PRIx64 "\n", attr.branch_sample_type);
144 attr.exclude_callchain_kernel, attr.exclude_callchain_user);
145 PrintIndented(indent + 1, "sample_regs_user 0x%" PRIx64 "\n", attr.sample_regs_user);
146 PrintIndented(indent + 1, "sample_stack_user 0x%" PRIx64 "\n", attr.sample_stack_user);