Lines Matching refs:selection
171 EventSelection* selection) { in BuildAndCheckEventSelection() argument
185 selection->event_type_modifier = *event_type; in BuildAndCheckEventSelection()
186 selection->event_attr = CreateDefaultPerfEventAttr(event_type->event_type); in BuildAndCheckEventSelection()
187 selection->event_attr.exclude_user = event_type->exclude_user; in BuildAndCheckEventSelection()
188 selection->event_attr.exclude_kernel = event_type->exclude_kernel; in BuildAndCheckEventSelection()
189 selection->event_attr.exclude_hv = event_type->exclude_hv; in BuildAndCheckEventSelection()
190 selection->event_attr.exclude_host = event_type->exclude_host; in BuildAndCheckEventSelection()
191 selection->event_attr.exclude_guest = event_type->exclude_guest; in BuildAndCheckEventSelection()
192 selection->event_attr.precise_ip = event_type->precise_ip; in BuildAndCheckEventSelection()
198 ETMRecorder::GetInstance().SetEtmPerfEventAttr(&selection->event_attr); in BuildAndCheckEventSelection()
203 selection->event_attr.freq = 0; in BuildAndCheckEventSelection()
204 selection->event_attr.sample_period = DEFAULT_SAMPLE_PERIOD_FOR_TRACEPOINT_EVENT; in BuildAndCheckEventSelection()
208 selection->event_attr.freq = 0; in BuildAndCheckEventSelection()
209 selection->event_attr.sample_period = 1; in BuildAndCheckEventSelection()
211 selection->event_attr.freq = 1; in BuildAndCheckEventSelection()
215 selection->event_attr.sample_freq = 1; in BuildAndCheckEventSelection()
221 selection->event_attr.mmap = 1; in BuildAndCheckEventSelection()
222 selection->event_attr.comm = 1; in BuildAndCheckEventSelection()
224 selection->event_attr.mmap2 = 1; in BuildAndCheckEventSelection()
230 !IsEventAttrSupported(selection->event_attr, selection->event_type_modifier.name)) { in BuildAndCheckEventSelection()
235 selection->event_attr.sample_freq = DEFAULT_SAMPLE_FREQ_FOR_NONTRACEPOINT_EVENT; in BuildAndCheckEventSelection()
238 selection->event_fds.clear(); in BuildAndCheckEventSelection()
242 if (sel.event_type_modifier.name == selection->event_type_modifier.name) { in BuildAndCheckEventSelection()
261 EventSelection selection; in AddEventGroup() local
262 if (!BuildAndCheckEventSelection(event_name, first_event, &selection)) { in AddEventGroup()
265 if (IsEtmEventType(selection.event_attr.type)) { in AddEventGroup()
269 auto& event_type = selection.event_type_modifier.event_type; in AddEventGroup()
271 selection.allowed_cpus = event_type.GetPmuCpumask(); in AddEventGroup()
276 group.push_back(std::move(selection)); in AddEventGroup()
289 for (const auto& selection : group) { in GetEvents() local
290 result.push_back(&selection.event_type_modifier.event_type); in GetEvents()
299 for (const auto& selection : group) { in GetTracepointEvents() local
300 if (selection.event_type_modifier.event_type.type == PERF_TYPE_TRACEPOINT) { in GetTracepointEvents()
301 result.push_back(&selection.event_type_modifier.event_type); in GetTracepointEvents()
310 for (const auto& selection : group) { in ExcludeKernel() local
311 if (!selection.event_type_modifier.exclude_kernel) { in ExcludeKernel()
322 for (const auto& selection : group) { in GetEventAttrWithId() local
324 attr_id.attr = &selection.event_attr; in GetEventAttrWithId()
325 for (const auto& fd : selection.event_fds) { in GetEventAttrWithId()
337 for (const auto& selection : group) { in GetEventNamesById() local
338 for (const auto& fd : selection.event_fds) { in GetEventNamesById()
339 result[fd->Id()] = selection.event_type_modifier.name; in GetEventNamesById()
351 for (const auto& selection : group) { in UnionSampleType() local
352 sample_type |= selection.event_attr.sample_type; in UnionSampleType()
356 for (auto& selection : group) { in UnionSampleType() local
357 selection.event_attr.sample_type = sample_type; in UnionSampleType()
364 for (auto& selection : group) { in SetEnableOnExec() local
371 selection.event_attr.enable_on_exec = 1; in SetEnableOnExec()
372 selection.event_attr.disabled = 1; in SetEnableOnExec()
374 selection.event_attr.enable_on_exec = 0; in SetEnableOnExec()
375 selection.event_attr.disabled = 0; in SetEnableOnExec()
383 for (const auto& selection : group) { in GetEnableOnExec() local
384 if (selection.event_attr.enable_on_exec == 0) { in GetEnableOnExec()
394 for (auto& selection : group) { in SampleIdAll() local
395 selection.event_attr.sample_id_all = 1; in SampleIdAll()
402 for (auto& selection : groups_[group_id]) { in SetSampleSpeed() local
404 selection.event_attr.freq = 1; in SetSampleSpeed()
405 selection.event_attr.sample_freq = speed.sample_freq; in SetSampleSpeed()
407 selection.event_attr.freq = 0; in SetSampleSpeed()
408 selection.event_attr.sample_period = speed.sample_period; in SetSampleSpeed()
425 for (auto& selection : group) { in SetBranchSampling() local
426 perf_event_attr& attr = selection.event_attr; in SetBranchSampling()
440 for (auto& selection : group) { in EnableFpCallChainSampling() local
441 selection.event_attr.sample_type |= PERF_SAMPLE_CALLCHAIN; in EnableFpCallChainSampling()
452 for (auto& selection : group) { in EnableDwarfCallChainSampling() local
453 selection.event_attr.sample_type |= in EnableDwarfCallChainSampling()
455 selection.event_attr.exclude_callchain_user = 1; in EnableDwarfCallChainSampling()
456 selection.event_attr.sample_regs_user = GetSupportedRegMask(GetMachineArch()); in EnableDwarfCallChainSampling()
457 selection.event_attr.sample_stack_user = dump_stack_size; in EnableDwarfCallChainSampling()
465 for (auto& selection : group) { in SetInherit() local
466 selection.event_attr.inherit = (enable ? 1 : 0); in SetInherit()
473 for (auto& selection : group) { in SetClockId() local
474 selection.event_attr.use_clockid = 1; in SetClockId()
475 selection.event_attr.clockid = clock_id; in SetClockId()
495 for (auto& selection : group) { in WakeupPerSample() local
496 selection.event_attr.watermark = 0; in WakeupPerSample()
497 selection.event_attr.wakeup_events = 1; in WakeupPerSample()
504 EventSelection* selection = nullptr; in SetTracepointFilter() local
509 selection = &group[0]; in SetTracepointFilter()
513 if (selection == nullptr) { in SetTracepointFilter()
533 auto& event_type = selection->event_type_modifier.event_type; in SetTracepointFilter()
547 selection->tracepoint_filter = adjusted_filter.value(); in SetTracepointFilter()
568 for (auto& selection : group) { in OpenEventFilesOnGroup() local
570 selection.event_attr, tid, cpu, group_fd, selection.event_type_modifier.name, false); in OpenEventFilesOnGroup()
572 *failed_event_type = selection.event_type_modifier.name; in OpenEventFilesOnGroup()
678 for (auto& selection : group) { in ApplyAddrFilters() local
679 if (IsEtmEventType(selection.event_type_modifier.event_type.type)) { in ApplyAddrFilters()
680 for (auto& event_fd : selection.event_fds) { in ApplyAddrFilters()
693 for (auto& selection : group) { in ApplyTracepointFilters() local
694 if (!selection.tracepoint_filter.empty()) { in ApplyTracepointFilters()
695 for (auto& event_fd : selection.event_fds) { in ApplyTracepointFilters()
696 if (!event_fd->SetFilter(selection.tracepoint_filter)) { in ApplyTracepointFilters()
718 for (auto& selection : groups_[i]) { in ReadCounters() local
721 counters_info.event_name = selection.event_type_modifier.event_type.name; in ReadCounters()
722 counters_info.event_modifier = selection.event_type_modifier.modifier; in ReadCounters()
723 counters_info.counters = selection.hotplugged_counters; in ReadCounters()
724 for (auto& event_fd : selection.event_fds) { in ReadCounters()
755 for (auto& selection : group) { in PrepareToReadMmapEventData() local
756 for (auto& event_fd : selection.event_fds) { in PrepareToReadMmapEventData()