Function report |
Source Code:kernel\sys.c |
Create Date:2022-07-28 09:20:56 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:getrusage
Proto:void getrusage(struct task_struct *p, int who, struct rusage *r)
Type:void
Parameter:
Type | Parameter | Name |
---|---|---|
struct task_struct * | p | |
int | who | |
struct rusage * | r |
1712 | maxrss = 0 |
1717 | If who == ly the calling thread Then |
1718 | task_cputime_adjusted(current process, & utime, & stime) |
1721 | Go to out |
1724 | If Not lock_task_sighand(p, & flags) Then Return |
1728 | Case who == sys_wait4() uses this |
1729 | Case who == RUSAGE_CHILDREN |
1732 | voluntary context switches = cnvcsw |
1733 | involuntary " = cnivcsw |
1734 | page reclaims = cmin_flt |
1735 | page faults = cmaj_flt |
1736 | block input operations = cinblock |
1737 | block output operations = coublock |
1740 | If who == RUSAGE_CHILDREN Then Break |
1745 | thread_group_cputime_adjusted(p, & tgutime, & tgstime) |
1749 | involuntary " += nivcsw |
1750 | page reclaims += MM fault and swap info: this can arguably be seen as either mm-specific or thread-specific: |
1751 | page faults += maj_flt |
1752 | block input operations += inblock |
1753 | block output operations += oublock |
1757 | Do |
1760 | Break |
1762 | Default |
1763 | BUG() |
1765 | unlock_task_sighand(p, & flags) |
1767 | out : |
1771 | If who != RUSAGE_CHILDREN Then |
1774 | If mm Then |
1779 | maximum resident set size = maxrss * PAGE_SIZE / 1024 |
Name | Describe |
---|---|
wait_task_zombie | Handle sys_wait4 work for one task in state EXIT_ZOMBIE. We hold* read_lock(&tasklist_lock) on entry. If we return zero, we still hold* the lock and this task is uninteresting. If we return nonzero, we have |
wait_task_stopped | wait_task_stopped - Wait for %TASK_STOPPED or %TASK_TRACED*@wo: wait options*@ptrace: is the wait for ptrace*@p: task to wait for* Handle sys_wait4() work for %p in state %TASK_STOPPED or %TASK_TRACED |
wait_task_continued | Handle do_wait work for one task in a live, non-stopped state.* read_lock(&tasklist_lock) on entry. If we return zero, we still hold* the lock and this task is uninteresting. If we return nonzero, we have |
SYSCALL_DEFINE2 | |
COMPAT_SYSCALL_DEFINE2 |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |