From owner-freebsd-arch@FreeBSD.ORG Tue Jun 5 15:06:36 2012 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C3FCE1065670 for ; Tue, 5 Jun 2012 15:06:36 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 84CC38FC12 for ; Tue, 5 Jun 2012 15:06:36 +0000 (UTC) Received: from ds4.des.no (smtp.des.no [194.63.250.102]) by smtp.des.no (Postfix) with ESMTP id 7032A600C; Tue, 5 Jun 2012 15:06:35 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 3CB259616; Tue, 5 Jun 2012 17:06:35 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Konstantin Belousov References: <86bokyvtc2.fsf@ds4.des.no> <20120605143215.GL85127@deviant.kiev.zoral.com.ua> <86pq9dvn33.fsf@ds4.des.no> <20120605144938.GN85127@deviant.kiev.zoral.com.ua> Date: Tue, 05 Jun 2012 17:06:34 +0200 In-Reply-To: <20120605144938.GN85127@deviant.kiev.zoral.com.ua> (Konstantin Belousov's message of "Tue, 5 Jun 2012 17:49:38 +0300") Message-ID: <86lik1vlvp.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: arch@freebsd.org Subject: Re: KTR_SPAREx X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jun 2012 15:06:36 -0000 Konstantin Belousov writes: > Dag-Erling Sm=C3=B8rgrav writes: >> We only have a limited number of KTR types - 32, to be precise. We >> can't spare one for each driver, and there's no reason why *your* driver >> (for any value of "you") should get its own while everybody else shares >> KTR_DEV. > I want to have only *my* driver trace points in the ring, by whatever > means. Breaking it right now would mean that I cannot do any GEM > debugging. Well, so does everybody else. Here is a list of files that use the same KTR that you use for GEM (KTR_SPARE2): sys/kern/kern_clocksource.c sys/amd64/amd64/machdep.c sys/dev/cxgb/cxgb_osdep.h sys/dev/cxgb/ulp/tom/cxgb_defs.h sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c sys/dev/gem/if_gem.c sys/dev/hme/if_hme.c sys/dev/cas/if_cas.c sys/i386/xen/xen_machdep.c sys/i386/i386/machdep.c sys/powerpc/powerpc/cpu.c sys/pc98/pc98/machdep.c sys/sparc64/sparc64/pmap.c sys/sparc64/sparc64/tsb.c sys/sparc64/include/bus.h Note that sys/*/*/machdep.c issue a KTR_SPARE2 event every time the CPU enters or exits the idle thread. > > If you think KTR_DEV is too noisy, add sysctls to enable or disable > > tracing on a per-device basis. It should be quite easy to generalize. > So you are planning to break some useful, but possibly randomly-achieved > functionality, and delegate the work to repair it to somebody else ? It's already broken, and you're one of the people responsible for breaking it. I'm trying to fix it. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no