Lines Matching refs:selection
161 EventSelection* selection) { in BuildAndCheckEventSelection() argument
177 selection->event_type_modifier = *event_type; in BuildAndCheckEventSelection()
178 selection->event_attr = CreateDefaultPerfEventAttr(event_type->event_type); in BuildAndCheckEventSelection()
179 selection->event_attr.exclude_user = event_type->exclude_user; in BuildAndCheckEventSelection()
180 selection->event_attr.exclude_kernel = event_type->exclude_kernel; in BuildAndCheckEventSelection()
181 selection->event_attr.exclude_hv = event_type->exclude_hv; in BuildAndCheckEventSelection()
182 selection->event_attr.exclude_host = event_type->exclude_host; in BuildAndCheckEventSelection()
183 selection->event_attr.exclude_guest = event_type->exclude_guest; in BuildAndCheckEventSelection()
184 selection->event_attr.precise_ip = event_type->precise_ip; in BuildAndCheckEventSelection()
190 ETMRecorder::GetInstance().SetEtmPerfEventAttr(&selection->event_attr); in BuildAndCheckEventSelection()
195 selection->event_attr.freq = 0; in BuildAndCheckEventSelection()
196 selection->event_attr.sample_period = DEFAULT_SAMPLE_PERIOD_FOR_TRACEPOINT_EVENT; in BuildAndCheckEventSelection()
200 selection->event_attr.freq = 0; in BuildAndCheckEventSelection()
201 selection->event_attr.sample_period = 1; in BuildAndCheckEventSelection()
203 selection->event_attr.freq = 1; in BuildAndCheckEventSelection()
207 selection->event_attr.sample_freq = 1; in BuildAndCheckEventSelection()
213 selection->event_attr.mmap = 1; in BuildAndCheckEventSelection()
214 selection->event_attr.comm = 1; in BuildAndCheckEventSelection()
216 selection->event_attr.mmap2 = 1; in BuildAndCheckEventSelection()
222 !IsEventAttrSupported(selection->event_attr, selection->event_type_modifier.name)) { in BuildAndCheckEventSelection()
228 selection->event_attr.sample_freq = DEFAULT_SAMPLE_FREQ_FOR_NONTRACEPOINT_EVENT; in BuildAndCheckEventSelection()
231 selection->event_fds.clear(); in BuildAndCheckEventSelection()
235 if (sel.event_type_modifier.name == selection->event_type_modifier.name) { in BuildAndCheckEventSelection()
255 EventSelection selection; in AddEventGroup() local
256 if (!BuildAndCheckEventSelection(event_name, first_event, &selection)) { in AddEventGroup()
259 if (IsEtmEventType(selection.event_attr.type)) { in AddEventGroup()
263 auto& event_type = selection.event_type_modifier.event_type; in AddEventGroup()
265 selection.allowed_cpus = event_type.GetPmuCpumask(); in AddEventGroup()
270 group.push_back(std::move(selection)); in AddEventGroup()
283 for (const auto& selection : group) { in GetEvents() local
284 result.push_back(&selection.event_type_modifier.event_type); in GetEvents()
293 for (const auto& selection : group) { in GetTracepointEvents() local
294 if (selection.event_type_modifier.event_type.type == in GetTracepointEvents()
296 result.push_back(&selection.event_type_modifier.event_type); in GetTracepointEvents()
305 for (const auto& selection : group) { in ExcludeKernel() local
306 if (!selection.event_type_modifier.exclude_kernel) { in ExcludeKernel()
317 for (const auto& selection : group) { in GetEventAttrWithId() local
319 attr_id.attr = &selection.event_attr; in GetEventAttrWithId()
320 for (const auto& fd : selection.event_fds) { in GetEventAttrWithId()
334 for (const auto& selection : group) { in UnionSampleType() local
335 sample_type |= selection.event_attr.sample_type; in UnionSampleType()
339 for (auto& selection : group) { in UnionSampleType() local
340 selection.event_attr.sample_type = sample_type; in UnionSampleType()
347 for (auto& selection : group) { in SetEnableOnExec() local
354 selection.event_attr.enable_on_exec = 1; in SetEnableOnExec()
355 selection.event_attr.disabled = 1; in SetEnableOnExec()
357 selection.event_attr.enable_on_exec = 0; in SetEnableOnExec()
358 selection.event_attr.disabled = 0; in SetEnableOnExec()
366 for (const auto& selection : group) { in GetEnableOnExec() local
367 if (selection.event_attr.enable_on_exec == 0) { in GetEnableOnExec()
377 for (auto& selection : group) { in SampleIdAll() local
378 selection.event_attr.sample_id_all = 1; in SampleIdAll()
385 for (auto& selection : groups_[group_id]) { in SetSampleSpeed() local
387 selection.event_attr.freq = 1; in SetSampleSpeed()
388 selection.event_attr.sample_freq = speed.sample_freq; in SetSampleSpeed()
390 selection.event_attr.freq = 0; in SetSampleSpeed()
391 selection.event_attr.sample_period = speed.sample_period; in SetSampleSpeed()
410 for (auto& selection : group) { in SetBranchSampling() local
411 perf_event_attr& attr = selection.event_attr; in SetBranchSampling()
425 for (auto& selection : group) { in EnableFpCallChainSampling() local
426 selection.event_attr.sample_type |= PERF_SAMPLE_CALLCHAIN; in EnableFpCallChainSampling()
437 for (auto& selection : group) { in EnableDwarfCallChainSampling() local
438 selection.event_attr.sample_type |= PERF_SAMPLE_CALLCHAIN | in EnableDwarfCallChainSampling()
441 selection.event_attr.exclude_callchain_user = 1; in EnableDwarfCallChainSampling()
442 selection.event_attr.sample_regs_user = in EnableDwarfCallChainSampling()
444 selection.event_attr.sample_stack_user = dump_stack_size; in EnableDwarfCallChainSampling()
452 for (auto& selection : group) { in SetInherit() local
453 selection.event_attr.inherit = (enable ? 1 : 0); in SetInherit()
460 for (auto& selection : group) { in SetClockId() local
461 selection.event_attr.use_clockid = 1; in SetClockId()
462 selection.event_attr.clockid = clock_id; in SetClockId()
469 for (const auto& selection : group) { in NeedKernelSymbol() local
470 if (!selection.event_type_modifier.exclude_kernel) { in NeedKernelSymbol()
489 EventSelection* selection = nullptr; in SetTracepointFilter() local
494 selection = &group[0]; in SetTracepointFilter()
498 if (selection == nullptr) { in SetTracepointFilter()
522 auto& event_type = selection->event_type_modifier.event_type; in SetTracepointFilter()
536 selection->tracepoint_filter = adjusted_filter.value(); in SetTracepointFilter()
559 for (auto& selection : group) { in OpenEventFilesOnGroup() local
561 selection.event_attr, tid, cpu, group_fd, selection.event_type_modifier.name, false); in OpenEventFilesOnGroup()
563 *failed_event_type = selection.event_type_modifier.name; in OpenEventFilesOnGroup()
669 for (auto& selection : group) { in ApplyAddrFilters() local
670 if (IsEtmEventType(selection.event_type_modifier.event_type.type)) { in ApplyAddrFilters()
671 for (auto& event_fd : selection.event_fds) { in ApplyAddrFilters()
684 for (auto& selection : group) { in ApplyTracepointFilters() local
685 if (!selection.tracepoint_filter.empty()) { in ApplyTracepointFilters()
686 for (auto& event_fd : selection.event_fds) { in ApplyTracepointFilters()
687 if (!event_fd->SetFilter(selection.tracepoint_filter)) { in ApplyTracepointFilters()
709 for (auto& selection : groups_[i]) { in ReadCounters() local
712 counters_info.event_name = selection.event_type_modifier.event_type.name; in ReadCounters()
713 counters_info.event_modifier = selection.event_type_modifier.modifier; in ReadCounters()
714 counters_info.counters = selection.hotplugged_counters; in ReadCounters()
715 for (auto& event_fd : selection.event_fds) { in ReadCounters()
747 for (auto& selection : group) { in PrepareToReadMmapEventData() local
748 for (auto& event_fd : selection.event_fds) { in PrepareToReadMmapEventData()