cvs commit: src/sys/amd64/amd64 prof_machdep.c src/sys/i386/isa
prof_machdep.c
Bruce Evans
bde at FreeBSD.org
Wed May 26 02:43:45 PDT 2004
bde 2004/05/26 02:43:38 PDT
FreeBSD src repository
Modified files:
sys/amd64/amd64 prof_machdep.c
sys/i386/isa prof_machdep.c
Log:
Quick fix for overflow when tsc_freq >= 2^31. "int profrate" in struct
gmon and struct gmonhdr was originally just to represent the kernel
(profiling) clock frequency and it remains poorly suited to representing
the frequencies of fast counters like the TSC. It broke a year or two
ago. This quick fix keeps it working for another year or month or two
until TSC frequencies can exceed 2^32, by dividing the frequency by 2.
Dividing the frequency by 4 would work for a little longer but would
lose a little too much precision.
Revision Changes Path
1.21 +10 -3 src/sys/amd64/amd64/prof_machdep.c
1.20 +10 -3 src/sys/i386/isa/prof_machdep.c
More information about the cvs-src
mailing list