函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:perf_event_mmap_event

函数原型:static void perf_event_mmap_event(struct perf_mmap_event *mmap_event)

返回类型:void

参数:

类型参数名称
struct perf_mmap_event *mmap_event
7668  vma等于vma
7669  file等于File we map to (can be NULL).
7670  maj等于0, min等于0
7671  ino等于0, gen等于0
7672  prot等于0, flags等于0
7675  char * buf = NULL
7678  如果Flags, see mm.h. 按位与currently active flags prot或等于page can be read
7680  如果Flags, see mm.h. 按位与VM_WRITEprot或等于page can be written
7682  如果Flags, see mm.h. 按位与VM_EXECprot或等于page can be executed
7685  如果Flags, see mm.h. 按位与VM_MAYSHAREflags等于Share changes
7687  否则flags等于Changes are private
7690  如果Flags, see mm.h. 按位与ETXTBSY on write attempts.. flags或等于ETXTBSY
7692  如果Flags, see mm.h. 按位与VM_MAYEXECflags或等于mark it as an executable
7694  如果Flags, see mm.h. 按位与VM_LOCKEDflags或等于pages are locked
7696  如果Flags, see mm.h. 按位与Huge TLB Page VM flags或等于create a huge page mapping
7699  如果file
7703  buf等于开辟内存
7704  如果非buf
7705  name等于"//enomem"
7706  转到:cpy_name
7713  name等于file_path(file, buf, # chars in a path name including nul - sizeof(u64))
7714  如果是错误
7715  name等于"//toolong"
7716  转到:cpy_name
7718  inode等于file_inode(File we map to (can be NULL). )
7719  dev等于s_dev
7720  ino等于Stat data, not accessed from path walking
7721  gen等于i_generation
7722  maj等于MAJOR(dev)
7723  min等于MINOR(dev)
7725  转到:got_name
7726  否则
7728  name等于name(vma)
7729  如果name则转到:cpy_name
7733  name等于arch_vma_name(vma)
7734  如果name则转到:cpy_name
7739  name等于"[heap]"
7740  转到:cpy_name
7744  name等于"[stack]"
7745  转到:cpy_name
7748  name等于"//anon"
7749  转到:cpy_name
7752  cpy_name :
7753  长字符串复制
7754  name等于tmp
7755  got_name :
7761  size等于strlen - Find the length of a string*@s: The string to be sized加1
7762  当非IS_ALIGNED(size, sizeof(u64))循环
7763  name[size++]等于'\0'
7765  file_name等于name
7766  file_size等于size
7767  maj等于maj
7768  min等于min
7769  ino等于ino
7770  ino_generation等于gen
7771  prot等于prot
7772  flags等于flags
7774  如果非Flags, see mm.h. 按位与VM_EXEC的值则misc或等于Following PERF_RECORD_MISC_* are used on different* events, so can reuse the same bit position:* PERF_RECORD_MISC_MMAP_DATA - PERF_RECORD_MMAP* events* PERF_RECORD_MISC_COMM_EXEC - PERF_RECORD_COMM event* PERF_RECORD_MISC_FORK_EXEC - PERF_RECORD_FORK
7777  size等于event_id的长度加size
7779  Iterate all events that need to receive side-band events.* For new callers; ensure that account_pmu_sb_event() includes* your event, otherwise it might not get delivered.
7783  kfree(buf)
调用者
名称描述
perf_event_mmap