函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\events\core.c Create Date:2022-07-27 14:53:11
Last Modify:2022-05-20 07:50:19 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称: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.

函数原型:static void perf_adjust_freq_unthr_context(struct perf_event_context *ctx, int needs_unthr)

返回类型:void

参数:

类型参数名称
struct perf_event_context *ctx
intneeds_unthr
3750  period等于TICK_NSEC is the time between ticks in nsec assuming SHIFTED_HZ
3758  如果非nr_freqneeds_unthr的值则返回
3761  raw_spin_lock( & Protect the states of the events in the list,* nr_active, and the list:)
3762  perf_pmu_disable(pmu)
3765  如果state不等于PERF_EVENT_STATE_ACTIVE则继续下一循环
3768  如果非event_filter_match(event)则继续下一循环
3771  perf_pmu_disable(pmu)
3773  hwc等于hw
3775  如果interrupts恒等于MAX_INTERRUPTS
3776  interrupts等于0
3777  perf_log_throttle(event, 1)
3778  start(event, 0)
3781  如果非freq或非sample_freq则转到:next
3787  stop(event, update the counter when stopping )
3789  now等于local64_read( & count)
3790  delta等于nowfreq_count_stamp
3791  freq_count_stamp等于now
3800  如果delta大于0则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:)
调用者
名称描述
perf_event_task_tick