Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:perf_event_mmap_event

Proto:static void perf_event_mmap_event(struct perf_mmap_event *mmap_event)

Type:void

Parameter:

TypeParameterName
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  If Flags, see mm.h. & currently active flags Then prot |= page can be read
7680  If Flags, see mm.h. & VM_WRITE Then prot |= page can be written
7682  If Flags, see mm.h. & VM_EXEC Then prot |= page can be executed
7685  If Flags, see mm.h. & VM_MAYSHARE Then flags = Share changes
7687  Else flags = Changes are private
7690  If Flags, see mm.h. & ETXTBSY on write attempts.. Then flags |= ETXTBSY
7692  If Flags, see mm.h. & VM_MAYEXEC Then flags |= mark it as an executable
7694  If Flags, see mm.h. & VM_LOCKED Then flags |= pages are locked
7696  If Flags, see mm.h. & Huge TLB Page VM Then flags |= create a huge page mapping
7699  If file Then
7703  buf = Allocation memory
7704  If Not buf Then
7705  name = "//enomem"
7706  Go to cpy_name
7713  name = file_path(file, buf, # chars in a path name including nul - sizeof(u64))
7714  If IS_ERR(name) Then
7715  name = "//toolong"
7716  Go to 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  Go to got_name
7726  Else
7728  name = name(vma)
7729  If name Then Go to cpy_name
7733  name = arch_vma_name(vma)
7734  If name Then Go to cpy_name
7739  name = "[heap]"
7740  Go to cpy_name
7744  name = "[stack]"
7745  Go to cpy_name
7748  name = "//anon"
7749  Go to cpy_name
7752  cpy_name :
7753  Copy a NUL terminated string into a sized buffer
7754  name = tmp
7755  got_name :
7761  size = strlen - Find the length of a string*@s: The string to be sized + 1
7762  When Not IS_ALIGNED(size, sizeof(u64)) cycle
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  If Not (Flags, see mm.h. & VM_EXEC) Then 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 = size of 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)
Caller
NameDescribe
perf_event_mmap