path: root/sys/sys/counter.h
Commit message (Collapse)AuthorAgeFilesLines
* Add COUNTER_U64_SYSINIT() and COUNTER_U64_DEFINE_EARLY().Mark Johnston2020-03-061-0/+13
| | | | | | | | | | | | | | The aim is to reduce the boilerplate needed today to define and initialize global counters. Also add SI_SUB_COUNTER to the sysinit ordering. Reviewed by: kib MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D23977 Notes: svn path=/head/; revision=358715
* Use underscores for internal variable name to avoid conflicts.Andrey V. Elsukov2019-06-071-8/+8
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=348774
* sys/sys: further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-271-0/+2
| | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. 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. Notes: svn path=/head/; revision=326256
* Provide counter_ratecheck(), a MP-friendly substitution to ppsratecheck().Gleb Smirnoff2016-12-091-0/+13
| | | | | | | | | | When rated event happens at a very quick rate, the ppsratecheck() is not only racy, but also becomes a performance bottleneck. Together with: rrs, jtl Notes: svn path=/head/; revision=309745
* - While we are spreading the counter(9) across network stack, more userlandGleb Smirnoff2013-10-151-0/+2
| | | | | | | | | | | | tools would need to know about the counter_u64_t type. Allow to include sys/counter.h from userspace. - Utilize now defined type in kvm_counter_u64_fetch(). Sponsored by: Netflix Sponsored by: Nginx, Inc. Notes: svn path=/head/; revision=256514
* Add several macros to help migrate statistics structures to PCPU counters.Andrey V. Elsukov2013-07-091-0/+19
| | | | Notes: svn path=/head/; revision=253082
* Merge from projects/counters: counter(9).Gleb Smirnoff2013-04-081-0/+42
Introduce counter(9) API, that implements fast and raceless counters, provided (but not limited to) for gathering of statistical data. See http://lists.freebsd.org/pipermail/freebsd-arch/2013-April/014204.html for more details. In collaboration with: kib Reviewed by: luigi Tested by: ae, ray Sponsored by: Nginx, Inc. Notes: svn path=/head/; revision=249268