From owner-svn-src-head@FreeBSD.ORG Sun May 3 06:25:37 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 852D6106564A; Sun, 3 May 2009 06:25:37 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 73A118FC08; Sun, 3 May 2009 06:25:37 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n436Pbsj006491; Sun, 3 May 2009 06:25:37 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n436PbA3006490; Sun, 3 May 2009 06:25:37 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200905030625.n436PbA3006490@svn.freebsd.org> From: Alexander Motin Date: Sun, 3 May 2009 06:25:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191764 - head/sys/dev/acpica X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 May 2009 06:25:38 -0000 Author: mav Date: Sun May 3 06:25:37 2009 New Revision: 191764 URL: http://svn.freebsd.org/changeset/base/191764 Log: Make dev.cpu.X.cx_usage sysctl also report current average of sleep time. Modified: head/sys/dev/acpica/acpi_cpu.c Modified: head/sys/dev/acpica/acpi_cpu.c ============================================================================== --- head/sys/dev/acpica/acpi_cpu.c Sun May 3 04:58:44 2009 (r191763) +++ head/sys/dev/acpica/acpi_cpu.c Sun May 3 06:25:37 2009 (r191764) @@ -1105,8 +1105,9 @@ acpi_cpu_usage_sysctl(SYSCTL_HANDLER_ARG sbuf_printf(&sb, "%u.%02u%% ", (u_int)(whole / sum), (u_int)(fract / sum)); } else - sbuf_printf(&sb, "0%% "); + sbuf_printf(&sb, "0.00%% "); } + sbuf_printf(&sb, "last %dus", sc->cpu_prev_sleep); sbuf_trim(&sb); sbuf_finish(&sb); sysctl_handle_string(oidp, sbuf_data(&sb), sbuf_len(&sb), req);