/linux-4.1.27/arch/s390/include/asm/ |
H A D | cputime.h | 31 * Convert cputime to jiffies and back. 33 static inline unsigned long cputime_to_jiffies(const cputime_t cputime) cputime_to_jiffies() argument 35 return __div((__force unsigned long long) cputime, CPUTIME_PER_SEC / HZ); cputime_to_jiffies() 43 static inline u64 cputime64_to_jiffies64(cputime64_t cputime) cputime64_to_jiffies64() argument 45 unsigned long long jif = (__force unsigned long long) cputime; cputime64_to_jiffies64() 56 * Convert cputime to microseconds and back. 58 static inline unsigned int cputime_to_usecs(const cputime_t cputime) cputime_to_usecs() argument 60 return (__force unsigned long long) cputime >> 12; cputime_to_usecs() 71 * Convert cputime to milliseconds and back. 73 static inline unsigned int cputime_to_secs(const cputime_t cputime) cputime_to_secs() argument 75 return __div((__force unsigned long long) cputime, CPUTIME_PER_SEC / 2) >> 1; cputime_to_secs() 84 * Convert cputime to timespec and back. 92 static inline void cputime_to_timespec(const cputime_t cputime, cputime_to_timespec() argument 95 unsigned long long __cputime = (__force unsigned long long) cputime; cputime_to_timespec() 101 * Convert cputime to timeval and back. 102 * Since cputime and timeval have the same resolution (microseconds) 111 static inline void cputime_to_timeval(const cputime_t cputime, cputime_to_timeval() argument 114 unsigned long long __cputime = (__force unsigned long long) cputime; cputime_to_timeval() 120 * Convert cputime to clock and back. 122 static inline clock_t cputime_to_clock_t(cputime_t cputime) cputime_to_clock_t() argument 124 unsigned long long clock = (__force unsigned long long) cputime; cputime_to_clock_t() 137 static inline clock_t cputime64_to_clock_t(cputime64_t cputime) cputime64_to_clock_t() argument 139 unsigned long long clock = (__force unsigned long long) cputime; cputime64_to_clock_t()
|
/linux-4.1.27/kernel/sched/ |
H A D | cpuacct.h | 3 extern void cpuacct_charge(struct task_struct *tsk, u64 cputime); 8 static inline void cpuacct_charge(struct task_struct *tsk, u64 cputime) cpuacct_charge() argument
|
H A D | cputime.c | 132 * @cputime: the cpu time spent in user space since the last update 133 * @cputime_scaled: cputime scaled by cpu frequency 135 void account_user_time(struct task_struct *p, cputime_t cputime, account_user_time() argument 141 p->utime += cputime; account_user_time() 143 account_group_user_time(p, cputime); account_user_time() 148 task_group_account_field(p, index, (__force u64) cputime); account_user_time() 157 * @cputime: the cpu time spent in virtual machine since the last update 158 * @cputime_scaled: cputime scaled by cpu frequency 160 static void account_guest_time(struct task_struct *p, cputime_t cputime, account_guest_time() argument 166 p->utime += cputime; account_guest_time() 168 account_group_user_time(p, cputime); account_guest_time() 169 p->gtime += cputime; account_guest_time() 173 cpustat[CPUTIME_NICE] += (__force u64) cputime; account_guest_time() 174 cpustat[CPUTIME_GUEST_NICE] += (__force u64) cputime; account_guest_time() 176 cpustat[CPUTIME_USER] += (__force u64) cputime; account_guest_time() 177 cpustat[CPUTIME_GUEST] += (__force u64) cputime; account_guest_time() 184 * @cputime: the cpu time spent in kernel space since the last update 185 * @cputime_scaled: cputime scaled by cpu frequency 189 void __account_system_time(struct task_struct *p, cputime_t cputime, __account_system_time() argument 193 p->stime += cputime; __account_system_time() 195 account_group_system_time(p, cputime); __account_system_time() 198 task_group_account_field(p, index, (__force u64) cputime); __account_system_time() 208 * @cputime: the cpu time spent in kernel space since the last update 209 * @cputime_scaled: cputime scaled by cpu frequency 212 cputime_t cputime, cputime_t cputime_scaled) account_system_time() 217 account_guest_time(p, cputime, cputime_scaled); account_system_time() 228 __account_system_time(p, cputime, cputime_scaled, index); account_system_time() 233 * @cputime: the cpu time spent in involuntary wait 235 void account_steal_time(cputime_t cputime) account_steal_time() argument 239 cpustat[CPUTIME_STEAL] += (__force u64) cputime; account_steal_time() 244 * @cputime: the cpu time spent in idle wait 246 void account_idle_time(cputime_t cputime) account_idle_time() argument 252 cpustat[CPUTIME_IOWAIT] += (__force u64) cputime; account_idle_time() 254 cpustat[CPUTIME_IDLE] += (__force u64) cputime; account_idle_time() 283 * Accumulate raw cputime values of dead tasks (sig->[us]time) and live 343 u64 cputime = (__force u64) cputime_one_jiffy; irqtime_account_process_tick() local 349 cputime *= ticks; irqtime_account_process_tick() 353 cpustat[CPUTIME_IRQ] += cputime; irqtime_account_process_tick() 355 cpustat[CPUTIME_SOFTIRQ] += cputime; irqtime_account_process_tick() 362 __account_system_time(p, cputime, scaled, CPUTIME_SOFTIRQ); irqtime_account_process_tick() 364 account_user_time(p, cputime, scaled); irqtime_account_process_tick() 366 account_idle_time(cputime); irqtime_account_process_tick() 368 account_guest_time(p, cputime, scaled); irqtime_account_process_tick() 370 __account_system_time(p, cputime, scaled, CPUTIME_SYSTEM); irqtime_account_process_tick() 450 struct task_cputime cputime; thread_group_cputime_adjusted() local 452 thread_group_cputime(p, &cputime); thread_group_cputime_adjusted() 454 *ut = cputime.utime; thread_group_cputime_adjusted() 455 *st = cputime.stime; thread_group_cputime_adjusted() 575 * Adjust tick based cputime random precision against scheduler 579 struct cputime *prev, cputime_adjust() 585 * Tick based cputime accounting depend on random scheduling cputime_adjust() 589 * cputime with a variable precision. cputime_adjust() 629 struct task_cputime cputime = { task_cputime_adjusted() local 633 task_cputime(p, &cputime.utime, &cputime.stime); task_cputime_adjusted() 634 cputime_adjust(&cputime, &p->prev_cputime, ut, st); task_cputime_adjusted() 639 struct task_cputime cputime; thread_group_cputime_adjusted() local 641 thread_group_cputime(p, &cputime); thread_group_cputime_adjusted() 642 cputime_adjust(&cputime, &p->signal->prev_cputime, ut, st); thread_group_cputime_adjusted() 665 /* CHECKME: always safe to convert nsecs to cputime? */ get_vtime_delta() 783 * Fetch cputime raw values from fields of task_struct and 785 * cputime snapshot. 211 account_system_time(struct task_struct *p, int hardirq_offset, cputime_t cputime, cputime_t cputime_scaled) account_system_time() argument
|
H A D | stats.h | 183 * cputime consumed by that task, even though the task can still be cputimer_running() 186 * In order to keep a consistent behaviour between thread group cputime cputimer_running() 187 * and thread group cputimer accounting, lets also ignore the cputime cputimer_running() 204 * @cputime: Time value by which to increment the utime field of the 211 cputime_t cputime) account_group_user_time() 219 cputimer->cputime.utime += cputime; account_group_user_time() 227 * @cputime: Time value by which to increment the stime field of the 234 cputime_t cputime) account_group_system_time() 242 cputimer->cputime.stime += cputime; account_group_system_time() 265 cputimer->cputime.sum_exec_runtime += ns; account_group_exec_runtime() 210 account_group_user_time(struct task_struct *tsk, cputime_t cputime) account_group_user_time() argument 233 account_group_system_time(struct task_struct *tsk, cputime_t cputime) account_group_system_time() argument
|
H A D | Makefile | 14 obj-y += core.o proc.o clock.o cputime.o
|
H A D | cpuacct.c | 235 void cpuacct_charge(struct task_struct *tsk, u64 cputime) cpuacct_charge() argument 248 *cpuusage += cputime; cpuacct_charge()
|
/linux-4.1.27/include/linux/ |
H A D | cputime.h | 4 #include <asm/cputime.h>
|
H A D | context_tracking.h | 105 * to assume that it's the stime pending cputime guest_enter() 114 /* Flush the guest cputime we spent on the guest */ guest_exit()
|
H A D | vtime.h | 97 /* On hard|softirq exit we always account to hard|softirq cputime */ vtime_account_irq_exit()
|
H A D | kernel_stat.h | 12 #include <linux/cputime.h>
|
H A D | init_task.h | 53 .cputime = INIT_CPUTIME, \
|
H A D | sched.h | 32 #include <linux/cputime.h> 528 * struct cputime - snaphsot of system and user cputime 534 struct cputime { struct 545 * This is an extension of struct cputime that includes the total runtime 587 * @cputime: thread group interval timers. 589 * @cputime receives updates. 596 struct task_cputime cputime; member in struct:thread_group_cputimer 699 struct cputime prev_cputime; 1435 struct cputime prev_cputime;
|
/linux-4.1.27/include/asm-generic/ |
H A D | cputime_nsecs.h | 2 * Definitions for measuring cputime in nsecs resolution. 4 * Based on <arch/ia64/include/asm/cputime.h> 33 * Convert cputime <-> jiffies (HZ) 47 * Convert cputime <-> nanoseconds 56 * Convert cputime <-> microseconds 66 * Convert cputime <-> seconds 74 * Convert cputime <-> timespec (nsec) 90 * Convert cputime <-> timeval (msec) 107 * Convert cputime <-> clock (USER_HZ)
|
H A D | cputime_jiffies.h | 20 * Convert nanoseconds <-> cputime 31 * Convert cputime to microseconds and back. 41 * Convert cputime to seconds and back. 47 * Convert cputime to timespec and back. 55 * Convert cputime to timeval and back. 63 * Convert cputime to clock and back.
|
/linux-4.1.27/arch/ia64/include/asm/ |
H A D | cputime.h | 2 * Definitions for measuring cputime on ia64 machines. 4 * Based on <asm-powerpc/cputime.h>. 22 # include <asm-generic/cputime.h>
|
/linux-4.1.27/arch/powerpc/include/asm/ |
H A D | cputime.h | 2 * Definitions for measuring cputime on powerpc machines. 20 #include <asm-generic/cputime.h> 45 * Convert cputime <-> jiffies setup_cputime_one_jiffy() 56 /* Estimate the scaled cputime by scaling the real cputime based on 113 * Convert cputime <-> microseconds 142 * Convert cputime <-> seconds 157 * Convert cputime <-> timespec 181 * Convert cputime <-> timeval 205 * Convert cputime <-> clock_t (units of 1/USER_HZ seconds)
|
/linux-4.1.27/fs/proc/ |
H A D | uptime.c | 8 #include <linux/cputime.h>
|
H A D | stat.c | 12 #include <linux/cputime.h>
|
/linux-4.1.27/kernel/time/ |
H A D | posix-cpu-timers.c | 24 cputime_t cputime = secs_to_cputime(rlim_new); update_rlimit_cpu() local 27 set_process_cpu_timer(task, CPUCLOCK_PROF, &cputime, NULL); update_rlimit_cpu() 114 * @cputime: The struct to compare. 116 * Checks @cputime to see if all fields are zero. Returns true if all fields 119 static inline int task_cputime_zero(const struct task_cputime *cputime) task_cputime_zero() argument 121 if (!cputime->utime && !cputime->stime && !cputime->sum_exec_runtime) task_cputime_zero() 227 update_gt_cputime(&cputimer->cputime, &sum); thread_group_cputimer() 230 *times = cputimer->cputime; thread_group_cputimer() 243 struct task_cputime cputime; cpu_clock_sample_group() local 249 thread_group_cputime(p, &cputime); cpu_clock_sample_group() 250 *sample = cputime_to_expires(cputime.utime + cputime.stime); cpu_clock_sample_group() 253 thread_group_cputime(p, &cputime); cpu_clock_sample_group() 254 *sample = cputime_to_expires(cputime.utime); cpu_clock_sample_group() 257 thread_group_cputime(p, &cputime); cpu_clock_sample_group() 258 *sample = cputime.sum_exec_runtime; cpu_clock_sample_group() 543 struct task_cputime cputime; cpu_timer_sample_group() local 545 thread_group_cputimer(p, &cputime); cpu_timer_sample_group() 550 *sample = cputime_to_expires(cputime.utime + cputime.stime); cpu_timer_sample_group() 553 *sample = cputime_to_expires(cputime.utime); cpu_timer_sample_group() 556 *sample = cputime.sum_exec_runtime; cpu_timer_sample_group() 939 struct task_cputime cputime; check_process_timers() local 945 thread_group_cputimer(tsk, &cputime); check_process_timers() 946 utime = cputime_to_expires(cputime.utime); check_process_timers() 947 ptime = utime + cputime_to_expires(cputime.stime); check_process_timers() 948 sum_sched_runtime = cputime.sum_exec_runtime; check_process_timers() 1118 group_sample = sig->cputimer.cputime; fastpath_timer_check()
|
H A D | itimer.c | 56 struct task_cputime cputime; get_cpu_itimer() local 59 thread_group_cputimer(tsk, &cputime); get_cpu_itimer() 61 t = cputime.utime + cputime.stime; get_cpu_itimer() 64 t = cputime.utime; get_cpu_itimer()
|
/linux-4.1.27/arch/mips/kernel/ |
H A D | binfmt_elfn32.c | 125 cputime_to_compat_timeval(const cputime_t cputime, struct compat_timeval *value) cputime_to_compat_timeval() argument 127 unsigned long jiffies = cputime_to_jiffies(cputime); cputime_to_compat_timeval()
|
H A D | binfmt_elfo32.c | 144 cputime_to_compat_timeval(const cputime_t cputime, struct compat_timeval *value) cputime_to_compat_timeval() argument 146 unsigned long jiffies = cputime_to_jiffies(cputime); cputime_to_compat_timeval()
|
/linux-4.1.27/arch/parisc/kernel/ |
H A D | binfmt_elf32.c | 97 cputime_to_compat_timeval(const cputime_t cputime, struct compat_timeval *value) cputime_to_compat_timeval() argument 99 unsigned long jiffies = cputime_to_jiffies(cputime); cputime_to_compat_timeval()
|
/linux-4.1.27/fs/ |
H A D | compat_binfmt_elf.c | 58 static void cputime_to_compat_timeval(const cputime_t cputime, cputime_to_compat_timeval() argument 62 cputime_to_timeval(cputime, &tv); cputime_to_compat_timeval()
|
H A D | binfmt_elf_fdpic.c | 1339 struct task_cputime cputime; fill_prstatus() local 1345 thread_group_cputime(p, &cputime); fill_prstatus() 1346 cputime_to_timeval(cputime.utime, &prstatus->pr_utime); fill_prstatus() 1347 cputime_to_timeval(cputime.stime, &prstatus->pr_stime); fill_prstatus()
|
H A D | binfmt_elf.c | 1406 struct task_cputime cputime; fill_prstatus() local 1412 thread_group_cputime(p, &cputime); fill_prstatus() 1413 cputime_to_timeval(cputime.utime, &prstatus->pr_utime); fill_prstatus() 1414 cputime_to_timeval(cputime.stime, &prstatus->pr_stime); fill_prstatus()
|
/linux-4.1.27/tools/testing/selftests/timers/ |
H A D | nanosleep.c | 148 /* Skip cputime clockids since nanosleep won't increment cputime */ main()
|
H A D | nsleep-lat.c | 162 /* Skip cputime clockids since nanosleep won't increment cputime */ main()
|
H A D | posix_timers.c | 211 * on parallel multithread cputime. We could arm it to expire main()
|
/linux-4.1.27/arch/s390/kernel/vdso64/ |
H A D | clock_gettime.S | 125 algr %r1,%r0 /* r1 = cputime as TOD value */ 127 srlg %r1,%r1,12 /* r1 = cputime in nanosec */
|
/linux-4.1.27/arch/s390/kernel/ |
H A D | idle.c | 15 #include <asm/cputime.h>
|
H A D | irq.c | 23 #include <asm/cputime.h>
|
H A D | nmi.c | 20 #include <asm/cputime.h>
|
H A D | vtime.c | 15 #include <asm/cputime.h>
|
H A D | early.c | 166 /* re-initialize cputime accounting. */ create_kernel_nss()
|
H A D | swsusp.S | 75 /* Update cputime accounting before going to sleep */
|
/linux-4.1.27/kernel/ |
H A D | tsacct.c | 162 * acct_account_cputime - update mm integral after cputime update
|
/linux-4.1.27/fs/ocfs2/cluster/ |
H A D | heartbeat.c | 591 u64 cputime; o2hb_prepare_block() local 601 cputime = CURRENT_TIME.tv_sec; o2hb_prepare_block() 602 if (!cputime) o2hb_prepare_block() 603 cputime = 1; o2hb_prepare_block() 605 hb_block->hb_seq = cpu_to_le64(cputime); o2hb_prepare_block() 775 u64 cputime; o2hb_check_slot() local 820 cputime = le64_to_cpu(hb_block->hb_seq); o2hb_check_slot() 821 if (slot->ds_last_time != cputime) o2hb_check_slot() 825 slot->ds_last_time = cputime; o2hb_check_slot()
|
/linux-4.1.27/drivers/cpufreq/ |
H A D | cpufreq_stats.c | 16 #include <linux/cputime.h>
|
/linux-4.1.27/drivers/s390/cio/ |
H A D | cio.c | 32 #include <linux/cputime.h>
|
/linux-4.1.27/arch/s390/hypfs/ |
H A D | hypfs_diag.c | 640 rc = hypfs_create_u64(cpu_dir, "cputime", hypfs_create_cpu_files()
|
/linux-4.1.27/arch/powerpc/kernel/ |
H A D | time.c | 73 #include <asm/cputime.h>
|