summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa/prof_machdep.c
Commit message (Collapse)AuthorAgeFilesLines
* Previous commit changing SYSCTL_HANDLER_ARGS violated KNF.phk2000-07-041-1/+1
| | | | Pointed out by: bde
* Style police catches up with rev 1.26 of src/sys/sys/sysctl.h:phk2000-07-031-1/+1
| | | | | | | | Sanitize SYSCTL_HANDLER_ARGS so that simplistic tools can grog our sources: -sysctl_vm_zone SYSCTL_HANDLER_ARGS +sysctl_vm_zone (SYSCTL_HANDLER_ARGS)
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Use .p2align to ensure consistant a.out/elf alignment. I'd have usedpeter1999-08-251-6/+6
| | | | | SUPERALIGN_TEXT, but this is inline assembler and after cpp has run. Inspired by bde's comments on linux_locore.s.
* Fixed profiling of elf kernels. Made high resolution profiling compilebde1999-05-061-23/+28
| | | | | | | | | | | | 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)
* Ifdefed the declarations of conditionally used variables.bde1998-12-141-3/+6
|
* Support compiling with `gcc -pedantic' (don't use hard newlines inbde1998-04-191-84/+85
| | | | (asm) string constants).
* Support compiling with `gcc -ansi'.bde1998-04-151-4/+4
|
* Rename "i586_ctr" to "tsc" (both upper and lower case instances).phk1997-12-261-7/+7
| | | | | | Fix a couple of printfs too. Warning: This changes the names of a couple of kernel options!
* Added a sysctl (machdep.cputime_clock) to select the clock used bybde1997-11-241-11/+55
| | | | | | | | | | | | | | "high resolution" profiling. The available clocks are: - the i8254 clock - on non-SMP i586's and i686's: the TSC - on systems with I586_PMC_GUPROF configured, and PERFMON configured and available: all the performance counters. This is unfinshed (there are problems with locking out the PERFMON device driver, and with losing calibration after switching the clock), but better than static configuration or writing to kmem. Changed ifdefs to avoid generating code for non-working option combinations.
* 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.
* More merge and update.asami1996-10-301-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | (1) deleted #if 0 pc98/pc98/mse.c (2) hold per-unit I/O ports in ed_softc pc98/pc98/if_ed.c pc98/pc98/if_ed98.h (3) merge more files by segregating changes into headers. new file (moved from pc98/pc98): i386/isa/aic_98.h deleted: well, it's already in the commit message so I won't repeat the long list here ;) Submitted by: The FreeBSD(98) Development Team
* Improved non-statistical (GUPROF) profiling:bde1996-10-171-14/+154
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
* Added a $Id$ keyword. Bruce still needs to put a copyright noticewollman1996-04-081-0/+5
| | | | on this file.
* Implemented non-statistical kernel profiling. This is based onbde1995-12-291-0/+153
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.
OpenPOWER on IntegriCloud