函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Update event's address range filters based on the* task's existing mappings, if any.

函数原型:static void perf_event_addr_filters_apply(struct perf_event *event)

返回类型:void

参数:

类型参数名称
struct perf_event *event
9460  ifh等于perf_event_addr_filters(event)
9461  task等于READ_ONCE(task)
9463  struct mm_struct * mm = NULL
9464  count等于0
9471  如果task恒等于TASK_TOMBSTONE则返回
9474  如果nr_file_filters
9475  mm等于get_task_mm - acquire a reference to the task's mm* Returns %NULL if the task has no mm. Checks PF_KTHREAD (meaning* this kernel workthread has transiently adopted a user mm with use_mm,* to do its AIO) is not set and if so returns a reference to it, after
9476  如果非mm则转到:restart
9479  lock for reading
9482  raw_spin_lock_irqsave( & lock, flags)
9484  如果dentry
9489  start等于0
9490  size等于0
9492  Scan through mm's vmas and see if one of them matches the*@filter; if so, adjust filter's address range.* Called with mm::mmap_sem down for reading.
9493  否则
9494  start等于offset
9495  size等于size
9498  count自加
9501  addr_filters_gen自加
9502  raw_spin_unlock_irqrestore( & lock, flags)
9504  如果nr_file_filters
9505  lease a read lock
9507  Decrement the use count and release all resources for an mm.
9510  restart :
9511  perf_event_stop(event, 1)