summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_prof.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Introduce Dynamic Profiling, a ddb(4) based & gprof compatible kernelmpi2016-09-041-10/+51
| | | | | | | | | | | | | | | | profiling framework. Code patching is used to enable probes when entering functions. The probes will call a mcount()-like function to match the behavior of a GPROF kernel. Currently only available on amd64 and guarded under DDBPROF. Support for other archs will follow soon. A new sysctl knob, ddb.console, need to be set to 1 in securelevel 0 to be able to use this feature. Inputs and ok guenther@
* remove stale lint annotationstedu2015-12-051-2/+1
|
* Remove some includes include-what-you-use claims don'tjsg2015-03-141-2/+1
| | | | | | | have any direct symbols used. Tested for indirect use by compiling amd64/i386/sparc64 kernels. ok tedu@ deraadt@
* Fix profiling (GPROF) build.mpi2014-08-301-1/+3
|
* decouple struct uvmexp into a new file, so that uvm_extern.h and sysctl.hderaadt2014-07-081-2/+1
| | | | | don't need to be married. ok guenther miod beck jsing kettenis
* do not include machine/cpu.h from a .c file; it is the responsibility ofderaadt2013-03-281-2/+1
| | | | | .h files to pull it in, if needed ok tedu
* Fix kernel profiling on MP systems by using per-CPU buffers and teachmpi2013-03-121-33/+74
| | | | | | | | | | | kgmon(8) to deal with them, this time without public header changes. Previously various CPUs were iterating over the same global buffer at the same time to modify it and never ended. This diff includes some ideas submited by Thor Simon to NetBSD via miod@. ok deraadt@, mikeb@, haesbaert@
* Back out per-CPU kernel profiling, it shouldn't modify a public headermpi2013-02-121-76/+32
| | | | at this moment.
* Fix kernel profiling on MP systems by using per-CPU buffer. Previouslympi2013-02-111-32/+76
| | | | | | | | | various CPUs were iterating over the same global buffer at the same time to modify it and never ended. This diff includes some ideas submited by Thor Simon to NetBSD via miod@. ok mikeb@, haesbaert@
* Apply profiling to all threads instead of just the thread that calledguenther2012-08-021-10/+12
| | | | | | | profil() by moving P_PROFIL from proc->p_flag to process->ps_flags with matching adjustment in fork1() and exit1() ok matthew@
* Make rusage totals, itimers, and profile settings per-process insteadguenther2012-03-231-6/+6
| | | | | | | of per-rthread. Handling of per-thread tick and runtime counters inspired by how FreeBSD does it. ok kettenis@
* need sysctl.h to compile with GPROF; Luis Henriquesderaadt2010-07-091-1/+2
|
* Don't #include <sys/user.h> into files that don't need the stuffguenther2010-06-261-2/+2
| | | | | | | | it defines. In some cases, this means pulling in uvm.h or pcb.h instead, but most of the inclusions were just noise. Tested on alpha, amd64, armish, hppa, i386, macpcc, sgi, sparc64, and vax, mostly by krw and naddy. ok krw@
* Since p_flag is often manipulated in interrupts and without biglockart2007-03-151-1/+2
| | | | | | | | | | | | it's a good idea to use atomic.h operations on it. This mechanic change updates all bit operations on p_flag to atomic_{set,clear}bits_int. Only exception is that P_OWEUPC is set by MI code before calling need_proftick and it's automatically cleared by ADDUPC. There's no reason for MD handling of that flag since everyone handles it the same way. kettenis@ ok
* Keep a counter for addupc_intr() invocations, and pass its value, instead of 1,miod2006-12-241-1/+2
| | | | to addupc_task() in ADDUPROF(). From NetBSD via art@.
* ansi and deregister. No binary change.jsg2005-12-091-15/+7
|
* match syscallargs comments with realityhenning2003-09-011-4/+4
| | | | | from Patrick Latifi <patrick.l@hermes.usherb.ca> ok jason@ tedu@
* Remove the advertising clause in the UCB license which Berkeleymillert2003-06-021-6/+2
| | | | rescinded 22 July 1999. Proofed by myself and Theo.
* rename ticks to nticks to avoid global. ok deraadt@ krw@tedu2003-04-141-4/+4
|
* Grammar.nordin2002-06-101-2/+2
|
* Change addupc_intr to not use fuswintr and suswintr to update the profilingart2002-06-071-35/+14
| | | | | | | | | info. Since we only use it to profile processes in user mode and there is no way to get back user mode without going past the AST that will write out the profiling info in a context where copyout works. Sitting in my tree for ages. Reviewed and with some suggestions from nordin@
* Replace inclusion of <vm/foo.h> with the correct <uvm/bar.h> when necessary.miod2001-11-061-2/+1
| | | | (Look ma, I might have broken the tree)
* merge vm/vm_kern.h into uvm/uvm_extern.h; art@ okmickey2001-09-191-2/+1
|
* Allocate the profiling buffer from kernel_map, not with malloc.art2001-09-171-4/+8
|
* sync syscalls, no sys/cpu.hderaadt1996-05-021-3/+2
|
* First argument to profil(2) should be `char *', not `caddr_t'.tholo1996-04-281-3/+3
|
* partial sync with netbsd 960418, more to comederaadt1996-04-211-4/+5
|
* From NetBSD: 960217 mergeniklas1996-03-031-4/+8
|
* profil() args have changed type..deraadt1995-12-141-3/+3
|
* initial import of NetBSD treederaadt1995-10-181-0/+262