From owner-cvs-src@FreeBSD.ORG Wed May 26 02:43:44 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E4C3616A4CE; Wed, 26 May 2004 02:43:44 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id DE6D043D53; Wed, 26 May 2004 02:43:44 -0700 (PDT) (envelope-from bde@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i4Q9hctb091535; Wed, 26 May 2004 02:43:38 -0700 (PDT) (envelope-from bde@repoman.freebsd.org) Received: (from bde@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i4Q9hc0c091534; Wed, 26 May 2004 02:43:38 -0700 (PDT) (envelope-from bde) Message-Id: <200405260943.i4Q9hc0c091534@repoman.freebsd.org> From: Bruce Evans Date: Wed, 26 May 2004 02:43:38 -0700 (PDT) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/amd64/amd64 prof_machdep.c src/sys/i386/isa prof_machdep.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 May 2004 09:43:45 -0000 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