• Home
  • Raw
  • Download

Lines Matching refs:p

107 static inline void task_group_account_field(struct task_struct *p, int index,  in task_group_account_field()  argument
118 cgroup_account_cputime_field(p, index, tmp); in task_group_account_field()
126 void account_user_time(struct task_struct *p, u64 cputime) in account_user_time() argument
131 p->utime += cputime; in account_user_time()
132 account_group_user_time(p, cputime); in account_user_time()
134 index = (task_nice(p) > 0) ? CPUTIME_NICE : CPUTIME_USER; in account_user_time()
137 task_group_account_field(p, index, cputime); in account_user_time()
140 acct_account_cputime(p); in account_user_time()
143 cpufreq_acct_update_power(p, cputime); in account_user_time()
151 void account_guest_time(struct task_struct *p, u64 cputime) in account_guest_time() argument
156 p->utime += cputime; in account_guest_time()
157 account_group_user_time(p, cputime); in account_guest_time()
158 p->gtime += cputime; in account_guest_time()
161 if (task_nice(p) > 0) { in account_guest_time()
162 task_group_account_field(p, CPUTIME_NICE, cputime); in account_guest_time()
165 task_group_account_field(p, CPUTIME_USER, cputime); in account_guest_time()
176 void account_system_index_time(struct task_struct *p, in account_system_index_time() argument
180 p->stime += cputime; in account_system_index_time()
181 account_group_system_time(p, cputime); in account_system_index_time()
184 task_group_account_field(p, index, cputime); in account_system_index_time()
187 acct_account_cputime(p); in account_system_index_time()
190 cpufreq_acct_update_power(p, cputime); in account_system_index_time()
199 void account_system_time(struct task_struct *p, int hardirq_offset, u64 cputime) in account_system_time() argument
203 if ((p->flags & PF_VCPU) && (irq_count() - hardirq_offset == 0)) { in account_system_time()
204 account_guest_time(p, cputime); in account_system_time()
215 account_system_index_time(p, cputime, index); in account_system_time()
251 void __account_forceidle_time(struct task_struct *p, u64 delta) in __account_forceidle_time() argument
253 __schedstat_add(p->stats.core_forceidle_sum, delta); in __account_forceidle_time()
255 task_group_account_field(p, CPUTIME_FORCEIDLE, delta); in __account_forceidle_time()
387 static void irqtime_account_process_tick(struct task_struct *p, int user_tick, in irqtime_account_process_tick() argument
405 if (this_cpu_ksoftirqd() == p) { in irqtime_account_process_tick()
411 account_system_index_time(p, cputime, CPUTIME_SOFTIRQ); in irqtime_account_process_tick()
413 account_user_time(p, cputime); in irqtime_account_process_tick()
414 } else if (p == this_rq()->idle) { in irqtime_account_process_tick()
416 } else if (p->flags & PF_VCPU) { /* System time or guest time */ in irqtime_account_process_tick()
417 account_guest_time(p, cputime); in irqtime_account_process_tick()
419 account_system_index_time(p, cputime, CPUTIME_SYSTEM); in irqtime_account_process_tick()
421 trace_android_vh_irqtime_account_process_tick(p, this_rq(), user_tick, ticks); in irqtime_account_process_tick()
430 static inline void irqtime_account_process_tick(struct task_struct *p, int user_tick, in irqtime_account_process_tick() argument
475 void task_cputime_adjusted(struct task_struct *p, u64 *ut, u64 *st) in task_cputime_adjusted() argument
477 *ut = p->utime; in task_cputime_adjusted()
478 *st = p->stime; in task_cputime_adjusted()
482 void thread_group_cputime_adjusted(struct task_struct *p, u64 *ut, u64 *st) in thread_group_cputime_adjusted() argument
486 thread_group_cputime(p, &cputime); in thread_group_cputime_adjusted()
500 void account_process_tick(struct task_struct *p, int user_tick) in account_process_tick() argument
511 trace_android_vh_account_task_time(p, this_rq(), user_tick, ticks); in account_process_tick()
514 irqtime_account_process_tick(p, user_tick, ticks); in account_process_tick()
527 account_user_time(p, cputime); in account_process_tick()
528 else if ((p != this_rq()->idle) || (irq_count() != HARDIRQ_OFFSET)) in account_process_tick()
529 account_system_time(p, HARDIRQ_OFFSET, cputime); in account_process_tick()
649 void task_cputime_adjusted(struct task_struct *p, u64 *ut, u64 *st) in task_cputime_adjusted() argument
652 .sum_exec_runtime = p->se.sum_exec_runtime, in task_cputime_adjusted()
655 if (task_cputime(p, &cputime.utime, &cputime.stime)) in task_cputime_adjusted()
656 cputime.sum_exec_runtime = task_sched_runtime(p); in task_cputime_adjusted()
657 cputime_adjust(&cputime, &p->prev_cputime, ut, st); in task_cputime_adjusted()
661 void thread_group_cputime_adjusted(struct task_struct *p, u64 *ut, u64 *st) in thread_group_cputime_adjusted() argument
665 thread_group_cputime(p, &cputime); in thread_group_cputime_adjusted()
666 cputime_adjust(&cputime, &p->signal->prev_cputime, ut, st); in thread_group_cputime_adjusted()