aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/kern_clock.c
Commit message (Collapse)AuthorAgeFilesLines
* sys: Remove ancient SCCS tags.Warner Losh2023-11-271-2/+0
| | | | | | | | Remove ancient SCCS tags from the tree, automated scripting, with two minor fixup to keep things compiling. All the common forms in the tree were removed with a perl script. Sponsored by: Netflix
* sys: Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-161-2/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* deadlkres: Make parameters settable with tunablesMark Johnston2023-03-031-3/+3
| | | | | | MFC after: 1 week Sponsored by: Klara, Inc. Sponsored by: Juniper Networks, Inc.
* kern/clock: remove interrupt reporting from watchdog_fire()Elliott Mitchell2023-02-161-20/+1
| | | | | | | | | | The interrupt counts may have been valuable in the past, but now DDB can readily provide them via 'show intrcnt'. This is one of the only consumers of these counter arrays outside of the interrupt code itself, and this should be avoided. Reviewed by: mhorne, fuz Differential Revision: https://reviews.freebsd.org/D37870
* Retire broken GPROF support from the kernelMateusz Guzik2022-11-151-22/+0
| | | | | | | | The option is not even recognized and with that patched it does not compile. Even if it did work, it would be prohibitively expensive to use. Interested parties can use pmcstat or dtrace instead.
* time(3): Fix spelling.Hans Petter Selasky2022-10-231-2/+2
| | | | | | Noted by: Gary Jennejohn <garyj@gmx.de> MFC after: 1 week Sponsored by: NVIDIA Networking
* time(3): Optimize tvtohz() function.Hans Petter Selasky2022-10-231-46/+67
| | | | | | | | | | | | | List of changes: - Use integer multiplication instead of long multiplication, because the result is an integer. - Remove multiple if-statements and predict new if-statements. - Rename local variable name, "ticks" into "retval" to avoid shadowing the system "ticks" global variable. Reviewed by: kib@ and imp@ MFC after: 1 week Sponsored by: NVIDIA Networking Differential Revision: https://reviews.freebsd.org/D36859
* AST: reworkKonstantin Belousov2022-08-021-9/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | Make most AST handlers dynamically registered. This allows to have subsystem-specific handler source located in the subsystem files, instead of making subr_trap.c aware of it. For instance, signal delivery code on return to userspace is now moved to kern_sig.c. Also, it allows to have some handlers designated as the cleanup (kclear) type, which are called both at AST and on thread/process exit. For instance, ast(), exit1(), and NFS server no longer need to be aware about UFS softdep processing. The dynamic registration also allows third-party modules to register AST handlers if needed. There is one caveat with loadable modules: the code does not make any effort to ensure that the module is not unloaded before all threads processed through AST handler in it. In fact, this is already present behavior for hwpmc.ko and ufs.ko. I do not think it is worth the efforts and the runtime overhead to try to fix it. Reviewed by: markj Tested by: emaste (arm64), pho Discussed with: jhb Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D35888
* clock: Group the "clocks" SYSINIT with the function definitionMark Johnston2021-11-151-5/+2
| | | | | | | | This is how most SYSINITs are defined. Also annotate the dummy parameter with __unused. No functional change intended. MFC after: 1 week Sponsored by: The FreeBSD Foundation
* kern: clean up empty lines in .c and .h filesMateusz Guzik2020-09-011-1/+0
| | | | Notes: svn path=/head/; revision=365222
* Allow swi_sched() to be called from NMI context.Alexander Motin2020-07-251-0/+1
| | | | | | | | | | | | | | | | | | For purposes of handling hardware error reported via NMIs I need a way to escape NMI context, being too restrictive to do something significant. To do it this change introduces new swi_sched() flag SWI_FROMNMI, making it careful about used KPIs. On platforms allowing IPI sending from NMI context (x86 for now) it immediately wakes clk_intr_event via new IPI_SWI, otherwise it works just like SWI_DELAY. To handle the delayed SWIs this patch calls clk_intr_event on every hardclock() tick. MFC after: 2 weeks Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D25754 Notes: svn path=/head/; revision=363527
* deadlkres: include thread name in panic messagesJason A. Harmening2020-04-011-4/+6
| | | | | | | | | Reviewed by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D24235 Notes: svn path=/head/; revision=359501
* Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many)Pawel Biernacki2020-02-261-1/+1
| | | | | | | | | | | | | | | | | | | r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are still not MPSAFE (or already are but aren’t properly marked). Use it in preparation for a general review of all nodes. This is non-functional change that adds annotations to SYSCTL_NODE and SYSCTL_PROC nodes using one of the soon-to-be-required flags. Mark all obvious cases as MPSAFE. All entries that haven't been marked as MPSAFE before are by default marked as NEEDGIANT Approved by: kib (mentor, blanket) Commented by: kib, gallatin, melifaro Differential Revision: https://reviews.freebsd.org/D23718 Notes: svn path=/head/; revision=358333
* sleep(9), sleepqueue(9): const'ify wchan pointersConrad Meyer2019-12-241-1/+1
| | | | | | | | | | | | | | | | | | _sleep(9), wakeup(9), sleepqueue(9), et al do not dereference or modify the channel pointers provided in any way; they are merely used as intptrs into a dictionary structure to match waiters with wakers. Correctly annotate this such that _sleep() and wakeup() may be used on const pointers without invoking ugly patterns like __DECONST(). Plumb const through all of the underlying sleepqueue bits. No functional change. Reviewed by: rlibby Discussed with: kib, markj Differential Revision: https://reviews.freebsd.org/D22914 Notes: svn path=/head/; revision=356057
* schedlock 1/4Jeff Roberson2019-12-151-2/+1
| | | | | | | | | | | | | | | Eliminate recursion from most thread_lock consumers. Return from sched_add() without the thread_lock held. This eliminates unnecessary atomics and lock word loads as well as reducing the hold time for scheduler locks. This will eventually allow for lockless remote adds. Discussed with: kib Reviewed by: jhb Tested by: pho Differential Revision: https://reviews.freebsd.org/D22626 Notes: svn path=/head/; revision=355779
* Handle multiple clock interrupts simultaneously in sched_clock().Jeff Roberson2019-12-081-2/+1
| | | | | | | | Reviewed by: kib, markj, mav Differential Revision: https://reviews.freebsd.org/D22625 Notes: svn path=/head/; revision=355512
* Update td_runtime of running thread on each statclock().Alexander Motin2019-06-141-0/+12
| | | | | | | | | | | | | | Normally td_runtime is updated on context switch, but there are some kernel threads that due to high absolute priority may run for many seconds without context switches (yes, that is bad, but that is true), which means their td_runtime was not updated all that time, that made them invisible for top other then as some general CPU usage. MFC after: 1 week Sponsored by: iXsystems, Inc. Notes: svn path=/head/; revision=349029
* Extract eventfilter declarations to sys/_eventfilter.hConrad Meyer2019-05-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | This allows replacing "sys/eventfilter.h" includes with "sys/_eventfilter.h" in other header files (e.g., sys/{bus,conf,cpu}.h) and reduces header pollution substantially. EVENTHANDLER_DECLARE and EVENTHANDLER_LIST_DECLAREs were moved out of .c files into appropriate headers (e.g., sys/proc.h, powernv/opal.h). As a side effect of reduced header pollution, many .c files and headers no longer contain needed definitions. The remainder of the patch addresses adding appropriate includes to fix those files. LOCK_DEBUG and LOCK_FILE_LINE_ARG are moved to sys/_lock.h, as required by sys/mutex.h since r326106 (but silently protected by header pollution prior to this change). No functional change (intended). Of course, any out of tree modules that relied on header pollution for sys/eventhandler.h, sys/lock.h, or sys/mutex.h inclusion need to be fixed. __FreeBSD_version has been bumped. Notes: svn path=/head/; revision=347984
* Tidy up hardclock.Mateusz Guzik2018-11-291-25/+37
| | | | | | | | | | - use fcmpset for updating ticks - move (rarely used) itimer handling to a dedicated function Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=341178
* Rename hardclock_cnt() to hardclock() and remove the old implementation.Mark Johnston2018-09-061-90/+3
| | | | | | | | | | | | | | | Also remove some related and unused subroutines. They have long been replaced by variants that handle multiple coalesced events with a single call. No functional change intended. Reviewed by: cem, kib Approved by: re (gjb) Differential Revision: https://reviews.freebsd.org/D17029 Notes: svn path=/head/; revision=338487
* Create a new macro for static DPCPU data.Andrew Turner2018-07-051-1/+1
| | | | | | | | | | | | | | | | | On arm64 (and possible other architectures) we are unable to use static DPCPU data in kernel modules. This is because the compiler will generate PC-relative accesses, however the runtime-linker expects to be able to relocate these. In preparation to fix this create two macros depending on if the data is global or static. Reviewed by: bz, emaste, markj Sponsored by: ABT Systems Ltd Differential Revision: https://reviews.freebsd.org/D16140 Notes: svn path=/head/; revision=336007
* Split up deadlkres() to make it more readable in anticipation ofBjoern A. Zeeb2018-07-051-79/+73
| | | | | | | | | | | | | | further changes adding another level of indentation. Some of the logic got simplified with the break out functions. There should be no functional changes. Reviewed by: kib Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D15914 Notes: svn path=/head/; revision=336003
* epoch: skip poll function call in hardclock unless there are callbacks pendingMatt Macy2018-05-171-2/+5
| | | | | | | | Reported by: mjg Approved by: sbruno Notes: svn path=/head/; revision=333769
* epoch(9): schedule pcpu callback task in hardclock if there are callbacks ↵Matt Macy2018-05-171-0/+3
| | | | | | | | | pending Approved by: sbruno Notes: svn path=/head/; revision=333761
* make SW_WATCHDOG dynamicMike Karels2018-01-031-13/+13
| | | | | | | | | | | | | | | | | | | | Enable the hardclock-based watchdog previously conditional on the SW_WATCHDOG option whenever hardware watchdogs are not found, and watchdogd attempts to enable the watchdog. The SW_WATCHDOG option still causes the sofware watchdog to be enabled even if there is a hardware watchdog. This does not change the other software-based watchdog enabled by the --softtimeout option to watchdogd. Note that the code to reprime the watchdog during kernel core dumps is no longer conditional on SW_WATCHDOG. I think this was previously a bug. Reviewed by: imp alfred bjk MFC after: 1 week Relnotes: yes Differential Revision: https://reviews.freebsd.org/D13713 Notes: svn path=/head/; revision=327505
* Remove some, but not all, assumptions that the BSP is CPU 0 and that CPUsNathan Whitehorn2017-11-251-1/+3
| | | | | | | | | are numbered densely from there to n_cpus. MFC after: 1 month Notes: svn path=/head/; revision=326218
* sys: further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-201-0/+2
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 3-Clause license. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point. Notes: svn path=/head/; revision=326023
* Remove register keyword from sys/ and ANSIfy prototypesEd Maste2017-05-171-11/+7
| | | | | | | | | | | | | | | A long long time ago the register keyword told the compiler to store the corresponding variable in a CPU register, but it is not relevant for any compiler used in the FreeBSD world today. ANSIfy related prototypes while here. Reviewed by: cem, jhb Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D10193 Notes: svn path=/head/; revision=318389
* Initialize 'ticks' earlier in boot after 'hz' is set.John Baldwin2016-11-221-38/+0
| | | | | | | | | | | | | | This avoids the time-warp after kthreads have started running and the required fixup to td_slptick and td_blktick in the EARLY_AP_STARTUP case. Now, 'ticks' is initialized before any kthreads are created or any context switches are performed. Tested by: gavin MFC after: 2 weeks Sponsored by: Netflix Notes: svn path=/head/; revision=308948
* Renumber license clauses in sys/kern to avoid skipping #3Ed Maste2016-09-151-1/+1
| | | | Notes: svn path=/head/; revision=305832
* Prevent parallel tc_windup() calls, both parallel top-level calls fromKonstantin Belousov2016-07-271-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | setclock() and from simultaneous top-level and interrupt. For this, tc_windup() is protected with a tc_setclock_mtx spinlock, in the try mode when called from hardclock interrupt. If spinlock cannot be obtained without spinning from the interrupt context, this means that top-level executes tc_windup() on other core and our try may be avoided. The boottimebin and boottime variables should be adjusted from tc_windup(). To be correct, they must be part of the timehands and read using lockless protocol. Remove the globals and reimplement the getboottime(9)/getboottimebin(9) KPI using the timehands read protocol. Tested by: pho (as part of the whole patch) Reviewed by: jhb (same) Discussed wit: bde Sponsored by: The FreeBSD Foundation MFC after: 1 month X-Differential revision: https://reviews.freebsd.org/D7302 Notes: svn path=/head/; revision=303387
* Do not acquire the thread lock in hardclock_cnt() unless needed.Mark Johnston2016-05-181-3/+5
| | | | | | | | | | This function only sets thread flags if a SIGPROF or SIGVTALRM timer has fired, which is almost never the case. MFC after: 2 weeks Notes: svn path=/head/; revision=300110
* Add an EARLY_AP_STARTUP option to start APs earlier during boot.John Baldwin2016-05-141-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, Application Processors (non-boot CPUs) are started by MD code at SI_SUB_CPU, but they are kept waiting in a "pen" until SI_SUB_SMP at which point they are released to run kernel threads. SI_SUB_SMP is one of the last SYSINIT levels, so APs don't enter the scheduler and start running threads until fairly late in the boot. This change moves SI_SUB_SMP up to just before software interrupt threads are created allowing the APs to start executing kernel threads much sooner (before any devices are probed). This allows several initialization routines that need to perform initialization on all CPUs to now perform that initialization in one step rather than having to defer the AP initialization to a second SYSINIT run at SI_SUB_SMP. It also permits all CPUs to be available for handling interrupts before any devices are probed. This last feature fixes a problem on with interrupt vector exhaustion. Specifically, in the old model all device interrupts were routed onto the boot CPU during boot. Later after the APs were released at SI_SUB_SMP, interrupts were redistributed across all CPUs. However, several drivers for multiqueue hardware allocate N interrupts per CPU in the system. In a system with many CPUs, just a few drivers doing this could exhaust the available pool of interrupt vectors on the boot CPU as each driver was allocating N * mp_ncpu vectors on the boot CPU. Now, drivers will allocate interrupts on their desired CPUs during boot meaning that only N interrupts are allocated from the boot CPU instead of N * mp_ncpu. Some other bits of code can also be simplified as smp_started is now true much earlier and will now always be true for these bits of code. This removes the need to treat the single-CPU boot environment as a special case. As a transition aid, the new behavior is available under a new kernel option (EARLY_AP_STARTUP). This will allow the option to be turned off if need be during initial testing. I plan to enable this on x86 by default in a followup commit in the next few days and to have all platforms moved over before 11.0. Once the transition is complete, the option will be removed along with the !EARLY_AP_STARTUP code. These changes have only been tested on x86. Other platform maintainers are encouraged to port their architectures over as well. The main things to check for are any uses of smp_started in MD code that can be simplified and SI_SUB_SMP SYSINITs in MD code that can be removed in the EARLY_AP_STARTUP case (e.g. the interrupt shuffling). PR: kern/199321 Reviewed by: markj, gnn, kib Sponsored by: Netflix Notes: svn path=/head/; revision=299746
* sys: extend use of the howmany() macro when available.Pedro F. Giffuni2016-04-261-3/+2
| | | | | | | | We have a howmany() macro in the <sys/param.h> header that is convenient to re-use as it makes things easier to read. Notes: svn path=/head/; revision=298649
* The struct thread td_estcpu member is only used by the 4BSD scheduler.Konstantin Belousov2016-04-171-2/+0
| | | | | | | | | | | | | | | | | | | | | Move it to the struct td_sched for 4BSD, removing always present field, otherwise unused for ULE. New scheduler method sched_estcpu() returns the estimation for kinfo_proc consumption. As before, it always returns 0 for ULE. Remove sched_tick() scheduler method, unused both by 4BSD and ULE. Update locking comment for the 4BSD struct td_sched, copying it from the same comment for ULE. Spell MAXPRI as PRI_MAX_TIMESHARE in the 4BSD comment. Based on some notes from, and reviewed by: bde Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=298145
* Initialize ticks so that it wraps 10 minutes after boot to increase thePeter Wemm2015-02-051-0/+5
| | | | | | | | | | chances of finding problems related to wraparound sooner. This comes from P4 change 167856 on 2009/08/26 around when we had problems with the TCP stack with ticks after 24 days of uptime. Notes: svn path=/head/; revision=278230
* The process spin lock currently has the following distinct uses:Konstantin Belousov2014-11-261-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Threads lifetime cycle, in particular, counting of the threads in the process, and interlocking with process mutex and thread lock. The main reason of this is that turnstile locks are after thread locks, so you e.g. cannot unlock blockable mutex (think process mutex) while owning thread lock. - Virtual and profiling itimers, since the timers activation is done from the clock interrupt context. Replace the p_slock by p_itimmtx and PROC_ITIMLOCK(). - Profiling code (profil(2)), for similar reason. Replace the p_slock by p_profmtx and PROC_PROFLOCK(). - Resource usage accounting. Need for the spinlock there is subtle, my understanding is that spinlock blocks context switching for the current thread, which prevents td_runtime and similar fields from changing (updates are done at the mi_switch()). Replace the p_slock by p_statmtx and PROC_STATLOCK(). The split is done mostly for code clarity, and should not affect scalability. Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Notes: svn path=/head/; revision=275121
* When sleeping waiting for the profiling stop, always set P_STOPPROFKonstantin Belousov2014-11-101-3/+3
| | | | | | | | | | | | | before dropping process lock. Clear P_STOPPROF when doing wakeup. Both issues caused thread to hang in stopprofclock() "stopprof" sleep. Reported and tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Notes: svn path=/head/; revision=274343
* dtrace sdt: remove the ugly sname parameter of SDT_PROBE_DEFINEAndriy Gapon2013-11-261-1/+1
| | | | | | | | | | | In its stead use the Solaris / illumos approach of emulating '-' (dash) in probe names with '__' (two consecutive underscores). Reviewed by: markj MFC after: 3 weeks Notes: svn path=/head/; revision=258622
* - For kernel compiled only with KDTRACE_HOOKS and not any lock debuggingAttilio Rao2013-11-251-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | option, unbreak the lock tracing release semantic by embedding calls to LOCKSTAT_PROFILE_RELEASE_LOCK() direclty in the inlined version of the releasing functions for mutex, rwlock and sxlock. Failing to do so skips the lockstat_probe_func invokation for unlocking. - As part of the LOCKSTAT support is inlined in mutex operation, for kernel compiled without lock debugging options, potentially every consumer must be compiled including opt_kdtrace.h. Fix this by moving KDTRACE_HOOKS into opt_global.h and remove the dependency by opt_kdtrace.h for all files, as now only KDTRACE_FRAMES is linked there and it is only used as a compile-time stub [0]. [0] immediately shows some new bug as DTRACE-derived support for debug in sfxge is broken and it was never really tested. As it was not including correctly opt_kdtrace.h before it was never enabled so it was kept broken for a while. Fix this by using a protection stub, leaving sfxge driver authors the responsibility for fixing it appropriately [1]. Sponsored by: EMC / Isilon storage division Discussed with: rstone [0] Reported by: rstone [1] Discussed with: philip Notes: svn path=/head/; revision=258541
* Correct a bug that prevented deadlkres from (almost) ever firing.Ryan Stone2013-06-281-8/+2
| | | | | | | | | | | | | | deadlkres was using a reversed test to check whether ticks had rolled over. This meant that deadlkres could only fire after ticks had rolled over. This test was actually unnecessary as deadlkres only ever took the difference of ticks values which is safe even in the presence of ticks rollover. Remove the tests entirely. Now deadlkres will properly fire after a lock has been held after the timeout period. MFC after: 1 month Notes: svn path=/head/; revision=252342
* Add a generic way to call per event allocate / release function.Fabien Thomas2013-03-051-1/+2
| | | | | | | | Reviewed by: mav MFC after: 1 month Notes: svn path=/head/; revision=247836
* - Make callout(9) tickless, relying on eventtimers(4) as backend forDavide Italiano2013-03-041-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | precise time event generation. This greatly improves granularity of callouts which are not anymore constrained to wait next tick to be scheduled. - Extend the callout KPI introducing a set of callout_reset_sbt* functions, which take a sbintime_t as timeout argument. The new KPI also offers a way for consumers to specify precision tolerance they allow, so that callout can coalesce events and reduce number of interrupts as well as potentially avoid scheduling a SWI thread. - Introduce support for dispatching callouts directly from hardware interrupt context, specifying an additional flag. This feature should be used carefully, as long as interrupt context has some limitations (e.g. no sleeping locks can be held). - Enhance mechanisms to gather informations about callwheel, introducing a new sysctl to obtain stats. This change breaks the KBI. struct callout fields has been changed, in particular 'int ticks' (4 bytes) has been replaced with 'sbintime_t' (8 bytes) and another 'sbintime_t' field was added for precision. Together with: mav Reviewed by: attilio, bde, luigi, phk Sponsored by: Google Summer of Code 2012, iXsystems inc. Tested by: flo (amd64, sparc64), marius (sparc64), ian (arm), markj (amd64), mav, Fabian Keil Notes: svn path=/head/; revision=247777
* Add support for good old 8192Hz profiling clock to software PMC.Alexander Motin2013-02-261-0/+5
| | | | | | | Reviewed by: fabient Notes: svn path=/head/; revision=247329
* Mark 'ticks', 'time_second', and 'time_uptime' as volatile to prevent theJohn Baldwin2013-01-281-2/+2
| | | | | | | | | | compiler from caching their values in tight loops. Reviewed by: bde MFC after: 1 week Notes: svn path=/head/; revision=246037
* Implement the DTrace sched provider. This implementation aims to beRyan Stone2012-05-151-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | compatible with the sched provider implemented by Solaris and its open- source derivatives. Full documentation of the sched provider can be found on Oracle's DTrace wiki pages. Note that for compatibility with scripts originally written for Solaris, serveral probes are defined that will never fire. These probes are defined to fire when Solaris-specific features perform certain actions. As these features are not present in FreeBSD, the probes can never fire. Also, I have added a two probes that are not defined in Solaris, lend-pri and load-change. These probes have been added to make it possible to collect schedgraph data with DTrace. Finally, a few probes are defined in Solaris to take a cpuinfo_t * argument. As it was not immediately clear to me how to translate that to FreeBSD, currently those probes are passed NULL in place of a cpuinfo_t *. Sponsored by: Sandvine Incorporated MFC after: 2 weeks Notes: svn path=/head/; revision=235459
* Add software PMC support.Fabien Thomas2012-03-281-1/+11
| | | | | | | | | | | | | | | | New kernel events can be added at various location for sampling or counting. This will for example allow easy system profiling whatever the processor is with known tools like pmcstat(8). Simultaneous usage of software PMC and hardware PMC is possible, for example looking at the lock acquire failure, page fault while sampling on instructions. Sponsored by: NETASQ MFC after: 1 month Notes: svn path=/head/; revision=233628
* Idle ticks optimization:Alexander Motin2012-03-101-16/+31
| | | | | | | | | | | | | | - Pass number of events to the statclock() and profclock() functions same as to hardclock() before to not call them many times in a loop. - Rename them into statclock_cnt() and profclock_cnt(). - Turn statclock() and profclock() into compatibility wrappers, still needed for arm. - Rename hardclock_anycpu() into hardclock_cnt() for unification. MFC after: 1 week Notes: svn path=/head/; revision=232783
* Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs.Ed Schouten2011-11-071-1/+2
| | | | | | | | | The SYSCTL_NODE macro defines a list that stores all child-elements of that node. If there's no SYSCTL_DECL macro anywhere else, there's no reason why it shouldn't be static. Notes: svn path=/head/; revision=227309
* Fix interrupt counters dumping on SW_WATCHDOG fire.Alexander Motin2011-09-271-1/+1
| | | | Notes: svn path=/head/; revision=225788