1 /* SPDX-License-Identifier: GPL-2.0 */ << 2 /* 1 /* 3 * latencytop.h: Infrastructure for displaying 2 * latencytop.h: Infrastructure for displaying latency 4 * 3 * 5 * (C) Copyright 2008 Intel Corporation 4 * (C) Copyright 2008 Intel Corporation 6 * Author: Arjan van de Ven <arjan@linux.intel 5 * Author: Arjan van de Ven <arjan@linux.intel.com> 7 * 6 * 8 */ 7 */ 9 8 10 #ifndef _INCLUDE_GUARD_LATENCYTOP_H_ 9 #ifndef _INCLUDE_GUARD_LATENCYTOP_H_ 11 #define _INCLUDE_GUARD_LATENCYTOP_H_ 10 #define _INCLUDE_GUARD_LATENCYTOP_H_ 12 11 13 #include <linux/compiler.h> 12 #include <linux/compiler.h> 14 struct task_struct; << 15 << 16 #ifdef CONFIG_LATENCYTOP 13 #ifdef CONFIG_LATENCYTOP 17 14 18 #define LT_SAVECOUNT 32 15 #define LT_SAVECOUNT 32 19 #define LT_BACKTRACEDEPTH 12 16 #define LT_BACKTRACEDEPTH 12 20 17 21 struct latency_record { 18 struct latency_record { 22 unsigned long backtrace[LT_BACKTRACE 19 unsigned long backtrace[LT_BACKTRACEDEPTH]; 23 unsigned int count; 20 unsigned int count; 24 unsigned long time; 21 unsigned long time; 25 unsigned long max; 22 unsigned long max; 26 }; 23 }; 27 24 28 25 >> 26 struct task_struct; 29 27 30 extern int latencytop_enabled; 28 extern int latencytop_enabled; 31 void __account_scheduler_latency(struct task_s 29 void __account_scheduler_latency(struct task_struct *task, int usecs, int inter); 32 static inline void 30 static inline void 33 account_scheduler_latency(struct task_struct * 31 account_scheduler_latency(struct task_struct *task, int usecs, int inter) 34 { 32 { 35 if (unlikely(latencytop_enabled)) 33 if (unlikely(latencytop_enabled)) 36 __account_scheduler_latency(ta 34 __account_scheduler_latency(task, usecs, inter); 37 } 35 } 38 36 39 void clear_tsk_latency_tracing(struct task_str !! 37 void clear_all_latency_tracing(struct task_struct *p); 40 38 41 #else 39 #else 42 40 43 static inline void 41 static inline void 44 account_scheduler_latency(struct task_struct * 42 account_scheduler_latency(struct task_struct *task, int usecs, int inter) 45 { 43 { 46 } 44 } 47 45 48 static inline void clear_tsk_latency_tracing(s !! 46 static inline void clear_all_latency_tracing(struct task_struct *p) 49 { 47 { 50 } 48 } 51 49 52 #endif 50 #endif 53 51 54 #endif 52 #endif 55 53
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.