summaryrefslogtreecommitdiffstats
path: root/sys/sys/sched.h
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2009-01-17 07:17:57 +0000
committerjeff <jeff@FreeBSD.org>2009-01-17 07:17:57 +0000
commit3d8d825555e01db8b5e675c6852c0b611791c3eb (patch)
treede5dcf2f543f8bc9f57e15ad2509863476bbe371 /sys/sys/sched.h
parentc4410efa0c6a38771669b82f73318d656bd1edd6 (diff)
downloadFreeBSD-src-3d8d825555e01db8b5e675c6852c0b611791c3eb.zip
FreeBSD-src-3d8d825555e01db8b5e675c6852c0b611791c3eb.tar.gz
- Implement generic macros for producing KTR records that are compatible
with src/tools/sched/schedgraph.py. This allows developers to quickly create a graphical view of ktr data for any resource in the system. - Add sched_tdname() and the pcpu field 'name' for quickly and uniformly identifying records associated with a thread or cpu. - Reimplement the KTR_SCHED traces using the new generic facility. Obtained from: attilio Discussed with: jhb Sponsored by: Nokia
Diffstat (limited to 'sys/sys/sched.h')
-rw-r--r--sys/sys/sched.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/sys/sched.h b/sys/sys/sched.h
index bbd2199..198d96e 100644
--- a/sys/sys/sched.h
+++ b/sys/sys/sched.h
@@ -134,6 +134,12 @@ void sched_affinity(struct thread *td);
int sched_sizeof_proc(void);
int sched_sizeof_thread(void);
+/*
+ * This routine provides a consistent thread name for use with KTR graphing
+ * functions.
+ */
+char *sched_tdname(struct thread *td);
+
static __inline void
sched_pin(void)
{
OpenPOWER on IntegriCloud