diff options
author | mjg <mjg@FreeBSD.org> | 2017-12-31 03:35:34 +0000 |
---|---|---|
committer | mjg <mjg@FreeBSD.org> | 2017-12-31 03:35:34 +0000 |
commit | 7a9ec347a0491d03665e237ad4653b79aae25d03 (patch) | |
tree | 426ade898fcd6a0f356348f52082362839fb8477 /sys/kern/kern_dtrace.c | |
parent | 046f82c455b766a4a1d1a23203499211a06badcb (diff) | |
download | FreeBSD-src-7a9ec347a0491d03665e237ad4653b79aae25d03.zip FreeBSD-src-7a9ec347a0491d03665e237ad4653b79aae25d03.tar.gz |
MFC r323235,r323236,r324789,r324863:
Introduce __read_frequently
While __read_mostly groups variables together, their placement is not
specified. In particular 2 frequently used variables can end up in
different lines.
This annotation is only expected to be used for variables read all the time,
e.g. on each syscall entry.
=============
Sprinkle __read_frequently on few obvious places.
Note that some of annotated variables should probably change their types
to something smaller, preferably bit-sized.
=============
Mark kdb_active as __read_frequently and switch to bool to eat less space.
=============
Change kdb_active type to u_char.
Fixes warnings from gcc and keeps the small size. Perhaps nesting should be moved
to another variablle.
Diffstat (limited to 'sys/kern/kern_dtrace.c')
-rw-r--r-- | sys/kern/kern_dtrace.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/kern_dtrace.c b/sys/kern/kern_dtrace.c index f5f14b7..adc36a8 100644 --- a/sys/kern/kern_dtrace.c +++ b/sys/kern/kern_dtrace.c @@ -54,7 +54,7 @@ dtrace_doubletrap_func_t dtrace_doubletrap_func; dtrace_pid_probe_ptr_t dtrace_pid_probe_ptr; dtrace_return_probe_ptr_t dtrace_return_probe_ptr; -systrace_probe_func_t systrace_probe_func; +systrace_probe_func_t __read_frequently systrace_probe_func; /* Return the DTrace process data size compiled in the kernel hooks. */ size_t |