Date: Wed, 26 May 2004 02:43:38 -0700 (PDT) From: Bruce Evans <bde@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/amd64/amd64 prof_machdep.c src/sys/i386/isa prof_machdep.c Message-ID: <200405260943.i4Q9hc0c091534@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200405260943.i4Q9hc0c091534>