summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_prof.c
Commit message (Collapse)AuthorAgeFilesLines
* Unremove used includes.bde1999-10-121-0/+2
| | | | | Bugs in test coverage should be fixed before removing any includes. LINT should be configured for full profiling support.
* Trim unused options (or #ifdef for undoc options).peter1999-10-111-2/+0
| | | | Submitted by: phk
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Fixed profiling of elf kernels. Made high resolution profiling compilebde1999-05-061-2/+5
| | | | | | | | | | | | for elf kernels (it is broken for all kernels due to lack of egcs support). Renaming of many assembler labels is avoided by declaring by declaring the labels that need to be visible to gprof as having type "function" and depending on the elf version of gprof being zealous about discarding the others. A few type declarations are still missing, mainly for SMP. PR: 9413 Submitted by: Assar Westerlund <assar@sics.se> (initial parts)
* Fixed bogotification of pseudocode for syscall args by rev.1.53 ofbde1998-09-051-3/+3
| | | | syscalls.master.
* Changed to the C9x draft spelling of the (unsigned) integral typebde1998-07-141-4/+4
| | | | | | | | suitable for holding object pointers (ptrint_t -> uintptr_t). Added corresponding signed type (intptr_t). Changed/added corresponding non-C9x types for function pointers to match. Don't use nonstandard types to implement these types, and don't comment on them in <machine/types.h>.
* Oops, the previous commit should have changed `i386' to `__i386__',bde1998-05-011-3/+3
| | | | not `__i386'.
* Support compiling with `gcc -ansi'.bde1998-04-151-10/+10
|
* Move the "retval" (3rd) parameter from all syscall functions and putphk1997-11-061-3/+2
| | | | | | | | | | | | it in struct proc instead. This fixes a boatload of compiler warning, and removes a lot of cruft from the sources. I have not removed the /*ARGSUSED*/, they will require some looking at. libkvm, ps and other userland struct proc frobbing programs will need recompiled.
* Moved declaration of etext from <machine/md_var.h> to <machine/cpu.h>bde1997-10-271-4/+1
| | | | | | | | and fixed everything that dependended on it being declared in the old place. It is used in "machine-independent" code in subr_prof.c. Moved declaration of btext from subr_prof.c to <machine/cpu.h>. It is machine-dependent.
* Last major round (Unless Bruce thinks of somthing :-) of malloc changes.phk1997-10-121-2/+2
| | | | | | | | Distribute all but the most fundamental malloc types. This time I also remembered the trick to making things static: Put "static" in front of them. A couple of finer points by: bde
* Distribute and statizice a lot of the malloc M_* types.phk1997-10-111-1/+3
| | | | Substantial input from: bde
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notpeter1997-02-221-1/+1
| | | | ready for it yet.
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-1/+1
| | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
* Fixed magic and wrong numbers in calibration of nullfunc_loop_profiled()bde1996-12-131-13/+10
| | | | | and removed related debugging code. Now this part of the calibration is almost as machine-independent as gprof generally.
* Improved non-statistical (GUPROF) profiling:bde1996-10-171-37/+149
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - use a more accurate and more efficient method of compensating for overheads. The old method counted too much time against leaf functions. - normally use the Pentium timestamp counter if available. On Pentiums, the times are now accurate to within a couple of cpu clock cycles per function call in the (unlikely) event that there are no cache misses in or caused by the profiling code. - optionally use an arbitrary Pentium event counter if available. - optionally regress to using the i8254 counter. - scaled the i8254 counter by a factor of 128. Now the i8254 counters overflow slightly faster than the TSC counters for a 150MHz Pentium :-) (after about 16 seconds). This is to avoid fractional overheads. files.i386: permon.c temporarily has to be classified as a profiling-routine because a couple of functions in it may be called from profiling code. options.i386: - I586_CTR_GUPROF is currently unused (oops). - I586_PMC_GUPROF should be something like 0x70000 to enable (but not use unless prof_machdep.c is changed) support for Pentium event counters. 7 is a control mode and the counter number 0 is somewhere in the 0000 bits (see perfmon.h for the encoding). profile.h: - added declarations. - cleaned up separation of user mode declarations. prof_machdep.c: Mostly clock-select changes. The default clock can be changed by editing kmem. There should be a sysctl for this. subr_prof.c: - added copyright. - calibrate overheads for the new method. - documented new method. - fixed races and and machine dependencies in start/stop code. mcount.c: Use the new overhead compensation method. gmon.h: - changed GPROF4 counter type from unsigned to int. Oops, this should be machine-dependent and/or int32_t. - reorganized overhead counters. Submitted by: Pentium event counter changes mostly by wollman
* Implemented non-statistical kernel profiling. This is based onbde1995-12-291-5/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | looking at a high resolution clock for each of the following events: function call, function return, interrupt entry, interrupt exit, and interesting branches. The differences between the times of these events are added at appropriate places in a ordinary histogram (as if very fast statistical profiling sampled the pc at those places) so that ordinary gprof can be used to analyze the times. gmon.h: Histogram counters need to be 4 bytes for microsecond resolutions. They will need to be larger for the 586 clock. The comments were vax-centric and wrong even on vaxes. Does anyone disagree? gprof4.c: The standard gprof should support counters of all integral sizes and the size of the counter should be in the gmon header. This hack will do until then. (Use gprof4 -u to examine the results of non-statistical profiling.) config/*: Non-statistical profiling is configured with `config -pp'. `config -p' still gives ordinary profiling. kgmon/*: Non-statistical profiling is enabled with `kgmon -B'. `kgmon -b' still enables ordinary profiling (and distables non-statistical profiling) if non-statistical profiling is configured.
* Unstaticized addupc_task(). It is supposed to be called from trap().bde1995-12-261-2/+2
| | | | | | | | | | See the comments for addupc_intr() and the NetBSD implementation. We use dummy versions of fuswintr() and susiwintr(), so addupc_intr() always pushes the work to trap() (this is inefficient), and trap() calls the special i386 function addupc() instead of addupc_task(). addupc() is more efficient than addupc_intr(), so some of the lost efficiency is recovered. However, addupc() may be broken on plain i386's since it doesn't check for write permission like copyout().
* A Major staticize sweep. Generates a couple of warnings that I'll dealphk1995-12-141-2/+2
| | | | | | with later. A number of unused vars removed. A number of unused procs removed or #ifdefed.
* Removed unnecessary #includes of vm stuff. Most of them were oncebde1995-12-061-3/+2
| | | | | | | prerequisites for <sys/sysctl.h>. subr_prof.c: Also replaced #include of <sys/user.h> by #include of <sys/resourcevar.h>.
* Finished (?) cleaning up sysinit stuff.bde1995-12-021-3/+3
|
* Mega commit for sysctl.phk1995-11-201-17/+15
| | | | | | Convert the remaining sysctl stuff to the new way of doing things. the devconf stuff is the reason for the large number of files. Cleaned up some compiler warnings while I were there.
* Included <sys/sysproto.h> to get central declarations for syscall argsbde1995-11-121-1/+4
| | | | | | | | | | structs and prototypes for syscalls. Ifdefed duplicated decentralized declarations of args structs. It's convenient to have this visible but they are hard to maintain. Some are already different from the central declarations. 4.4lite2 puts them in comments in the function headers but I wanted to avoid the large changes for that.
* Fixed init functions argument type - caddr_t -> void *. Fixed a couple ofdg1995-09-091-3/+3
| | | | compiler warnings.
* kmstartup had the wrong type and unnecessarily external linkage for abde1995-08-291-9/+5
| | | | | | | sysinit function. subr_prof.c: Remove useless comment.
* Reviewed by: julian with quick glances by bruce and othersjulian1995-08-281-1/+9
| | | | | | | | | | | | | | | | | | | | | | Submitted by: terry (terry lambert) This is a composite of 3 patch sets submitted by terry. they are: New low-level init code that supports loadbal modules better some cleanups in the namei code to help terry in 16-bit character support some changes to the mount-root code to make it a little more modular.. NOTE: mounting root off cdrom or NFS MIGHT be broken as I haven't been able to test those cases.. certainly mounting root of disk still works just fine.. mfs should work but is untested. (tomorrows task) The low level init stuff includes a total rewrite of init_main.c to make it possible for new modules to have an init phase by simply adding an entry to a TEXT_SET (or is it DATA_SET) list. thus a new module can be added to the kernel without editing any other files other than the 'files' file.
* Add and move declarations to fix all of the warnings from `gcc -Wimplicit'bde1995-03-161-1/+4
| | | | | | (except in netccitt, netiso and netns) and most of the warnings from `gcc -Wnested-externs'. Fix all the bugs found. There were no serious ones.
* Don't waste 1264K for each MB of unused text.bde1995-01-291-5/+3
| | | | Remove misplaced comment.
* Fix compiler warnings.bde1994-09-211-2/+4
|
* Added $Id$dg1994-08-021-0/+1
|
* The big 4.4BSD Lite to FreeBSD 2.0.0 (Development) patch.rgrimes1994-05-251-0/+1
| | | | | Reviewed by: Rodney W. Grimes Submitted by: John Dyson and David Greenman
* BSD 4.4 Lite Kernel Sourcesrgrimes1994-05-241-0/+256
OpenPOWER on IntegriCloud