Lines Matching +full:inter +full:- +full:data

1 // SPDX-License-Identifier: GPL-2.0-only
20 * The latency is stored in fixed sized data structures in an accumulated form;
22 * in the data structure. Both the count, total accumulated latency and maximum
23 * latency are tracked in this data structure. When the fixed size structure is
37 * | | | +----> the stringified backtrace
38 * | | +---------> The maximum latency for this entry in microseconds
39 * | +--------------> The accumulated latency for this entry (microseconds)
40 * +-------------------> The number of times this entry is hit
83 .data = &latencytop_enabled,
97 memset(&p->latency_record, 0, sizeof(p->latency_record)); in clear_tsk_latency_tracing()
98 p->latency_record_count = 0; in clear_tsk_latency_tracing()
119 if (!tsk->mm) in account_global_scheduler_latency()
132 unsigned long record = lat->backtrace[q]; in account_global_scheduler_latency()
145 latency_record[i].time += lat->time; in account_global_scheduler_latency()
146 if (lat->time > latency_record[i].max) in account_global_scheduler_latency()
147 latency_record[i].max = lat->time; in account_global_scheduler_latency()
161 * __account_scheduler_latency - record an occurred latency
162 * @tsk - the task struct of the task hitting the latency
163 * @usecs - the duration of the latency in microseconds
164 * @inter - 1 if the sleep was interruptible, 0 if uninterruptible
169 * This function has a few special cases to deal with normal 'non-latency'
177 __account_scheduler_latency(struct task_struct *tsk, int usecs, int inter) in __account_scheduler_latency() argument
184 if (inter && usecs > 5000) in __account_scheduler_latency()
188 /* Zero-time sleeps are non-interesting */ in __account_scheduler_latency()
203 for (i = 0; i < tsk->latency_record_count; i++) { in __account_scheduler_latency()
207 mylat = &tsk->latency_record[i]; in __account_scheduler_latency()
211 if (mylat->backtrace[q] != record) { in __account_scheduler_latency()
221 mylat->count++; in __account_scheduler_latency()
222 mylat->time += lat.time; in __account_scheduler_latency()
223 if (lat.time > mylat->max) in __account_scheduler_latency()
224 mylat->max = lat.time; in __account_scheduler_latency()
232 if (tsk->latency_record_count >= LT_SAVECOUNT) in __account_scheduler_latency()
236 i = tsk->latency_record_count++; in __account_scheduler_latency()
237 memcpy(&tsk->latency_record[i], &lat, sizeof(struct latency_record)); in __account_scheduler_latency()
252 if (lr->backtrace[0]) { in lstats_show()
255 lr->count, lr->time, lr->max); in lstats_show()
257 unsigned long bt = lr->backtrace[q]; in lstats_show()