From owner-freebsd-bugs@FreeBSD.ORG Fri Oct 18 08:00:00 2013 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id AC2E0991 for ; Fri, 18 Oct 2013 08:00:00 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8CAF12878 for ; Fri, 18 Oct 2013 08:00:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r9I800eJ062696 for ; Fri, 18 Oct 2013 08:00:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r9I800QU062695; Fri, 18 Oct 2013 08:00:00 GMT (envelope-from gnats) Resent-Date: Fri, 18 Oct 2013 08:00:00 GMT Resent-Message-Id: <201310180800.r9I800QU062695@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Ruben van Staveren Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 990863BD for ; Fri, 18 Oct 2013 07:50:44 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6D17427EB for ; Fri, 18 Oct 2013 07:50:44 +0000 (UTC) Received: from oldred.freebsd.org ([127.0.1.6]) by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r9I7oh6a093949 for ; Fri, 18 Oct 2013 07:50:43 GMT (envelope-from nobody@oldred.freebsd.org) Received: (from nobody@localhost) by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r9I7ohSS093756; Fri, 18 Oct 2013 07:50:43 GMT (envelope-from nobody) Message-Id: <201310180750.r9I7ohSS093756@oldred.freebsd.org> Date: Fri, 18 Oct 2013 07:50:43 GMT From: Ruben van Staveren To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: kern/183077: don't have the compiler inline txg_quiesce so that zilstat works X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Oct 2013 08:00:00 -0000 >Number: 183077 >Category: kern >Synopsis: don't have the compiler inline txg_quiesce so that zilstat works >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri Oct 18 08:00:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Ruben van Staveren >Release: FreeBSD 9.2-STABLE r256452M >Organization: >Environment: FreeBSD helium.niet.verweg.com 9.2-STABLE FreeBSD 9.2-STABLE #1 r256452M: Thu Oct 17 14:01:31 CEST 2013 root@helium.niet.verweg.com:/usr/obj/usr/svn/9-stable/src/sys/GENERIC amd64 >Description: On unpatched systems, txg_quiesce gets inlined and is hidden from dtrace. The zilstat script (http://www.richardelling.com/Home/scripts-and-programs-1/zilstat) will report that no probes could be found for fbt::txg_quiesce:entry After patching zilstat will report lines like these: N-Bytes N-Bytes/s N-Max-Rate B-Bytes B-Bytes/s B-Max-Rate ops <=4kB 4-32kB >=32kB 0 0 0 0 0 0 0 0 0 0 504 504 504 131072 131072 131072 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 >How-To-Repeat: run zilstat on an unpatched system, it will report the missing probe for fbt::txg_quiesce:entry and exits >Fix: In sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c, prefix the txg_quiesce function with __attribute__ ((noinline)) Patch attached with submission follows: Index: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c =================================================================== --- sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c (revision 256452) +++ sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c (working copy) @@ -354,7 +354,7 @@ * On return, the transaction group has reached a stable state in which it can * then be passed off to the syncing context. */ -static void +static __attribute__ ((noinline)) void txg_quiesce(dsl_pool_t *dp, uint64_t txg) { tx_state_t *tx = &dp->dp_tx; >Release-Note: >Audit-Trail: >Unformatted: