Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\events\core.c Create Date:2022-07-28 13:33:56
Last Modify:2022-05-20 07:50:19 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:mbine freq adjustment with unthrottling to avoid two passes over the* events. At the same time, make sure, having freq events does not change* the rate of unthrottling as that would introduce bias.

Proto:static void perf_adjust_freq_unthr_context(struct perf_event_context *ctx, int needs_unthr)

Type:void

Parameter:

TypeParameterName
struct perf_event_context *ctx
intneeds_unthr
3750  period = TICK_NSEC is the time between ticks in nsec assuming SHIFTED_HZ
3758  If Not (nr_freq || needs_unthr) Then Return
3761  raw_spin_lock( & Protect the states of the events in the list,* nr_active, and the list:)
3762  perf_pmu_disable(pmu)
3765  If state != PERF_EVENT_STATE_ACTIVE Then Continue
3768  If Not event_filter_match(event) Then Continue
3771  perf_pmu_disable(pmu)
3773  hwc = hw
3775  If interrupts == MAX_INTERRUPTS Then
3776  interrupts = 0
3777  perf_log_throttle(event, 1)
3778  start(event, 0)
3781  If Not freq || Not sample_freq Then Go to next
3787  stop(event, update the counter when stopping )
3789  now = local64_read( & count)
3790  delta = now - freq_count_stamp
3791  freq_count_stamp = now
3800  If delta > 0 Then perf_adjust_period(event, period, delta, false)
3803  start(event, delta > 0 ? load the counter when starting : 0)
3804  :
3805  perf_pmu_enable(pmu)
3808  perf_pmu_enable(pmu)
3809  raw_spin_unlock( & Protect the states of the events in the list,* nr_active, and the list:)
Caller
NameDescribe
perf_event_task_tick