函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\acct.c Create Date:2022-07-27 12:02:19
Last Modify:2020-03-17 15:14:29 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Write an accounting entry for an exiting process* The acct_process() call is the workhorse of the process* accounting system. The struct acct is built here and then written* into the accounting file. This function should only be called from

函数原型:static void fill_ac(acct_t *ac)

返回类型:void

参数:

类型参数名称
acct_t *ac
417  pacct等于pacct
425  memset(ac, 0, sizeof(acct_t))
427  Always set to ACCT_VERSION 等于ACCT_VERSION按位或accounting file is little endian
428  长字符串复制
431  run_time等于ktime_get_ns()
432  run_time减等于start_time
434  elapsed等于nsec_to_AHZ(run_time)
438  Elapsed Time 等于encode_comp_t(elapsed < (unsignedlong) - 1l ? (unsignedlong)elapsed : (unsignedlong) - 1l)
444  etime等于encode_comp2_t(elapsed)
446  Elapsed Time MSB 等于etime右移16位
447  Elapsed Time LSB 等于etime
450  do_div() is NOT a C function(elapsed, AHZ)
451  Process Creation Time 等于These interfaces are all based on the old timespec type* and should get replaced with the timespec64 based versions* over time so we can remove the file here.elapsed
453  AHZ 等于AHZ
456  spin_lock_irq( & siglock)
457  tty等于tty
458  Control Terminal 等于如果ttyold_encode_dev(tty_devnum(tty))否则0
459  User Time 等于encode_comp_t(nsec_to_AHZ(ac_utime))
460  System Time 等于encode_comp_t(nsec_to_AHZ(ac_stime))
461  Flags 等于ac_flag
462  Average Memory Usage 等于encode_comp_t(ac_mem)
463  Minor Pagefaults 等于encode_comp_t(ac_minflt)
464  Major Pagefaults 等于encode_comp_t(ac_majflt)
465  Exitcode 等于ac_exitcode
466  spin_unlock_irq( & siglock)
调用者
名称描述
do_acct_process