From owner-freebsd-hackers@freebsd.org Thu Aug 4 07:58:23 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D6DDBAE8EB for ; Thu, 4 Aug 2016 07:58:23 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-wm0-x242.google.com (mail-wm0-x242.google.com [IPv6:2a00:1450:400c:c09::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A3E9F12F3 for ; Thu, 4 Aug 2016 07:58:22 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by mail-wm0-x242.google.com with SMTP id x83so41236937wma.3 for ; Thu, 04 Aug 2016 00:58:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=gCclOr0TXCDR/xa34Zwr1rXqHurHammam7Un7lGZPAI=; b=HorjLItFNVM+O4NubsuzO1WIDRtjFGslj3BgwUeAclCxLH2FdrM1jNgSLSE//uiDAO 5x7POPJaIz9ggDOtZVIEOfV0waFrtcooHbIxVo+qBvjfkvedVq2J+cKnV8jHUQPXRdQA 9aGUM74DdiGf2koR6c5iYlgkYKO/l4mwYYW1c8XDyO8KcQFSR5Uz/WVIsBdnJg5uZ4ez QST0A/m3AmO5VnDS48Igid+9H1LCVG651jryfo5FguxemxfJt628JPhFyCIlZPiUz4Sn aN+AJK3F7ZwY6wO0Vjv78O4CRJ8+0EQpeil0eYZAdRcMr+yASEf8eD8ZB9K3nw6VZc+O L+sQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=gCclOr0TXCDR/xa34Zwr1rXqHurHammam7Un7lGZPAI=; b=hmMLdH6XoRimT086SJZqCHVFKFnt9+8gkvHGmymD1O//RbMCddMKqqfLAwQqF9+0VG g2ganjZzPayseCjL7+MQk72aonXg56azAeotqy6Qg3Rk3tk0FuS7j60x2iwPUMEYe2HO sXMZllBOoHsaeL3HbT3GLb/fT11ih46+FpgHPagMaM9grtSmBlFxnB7osVQ+Dtw9Od3x YF9UzCAxq+9ZTTXA/v1O8G/rGNiuBBVl941Y9peo9VnqMbKpFBsJbB5C0Qxz6KOabp4x z+B0NJC4eb1Y2/cFLrqeO+JzYb66TUsnkviRMLv3ZXENyDdAZWL0ku+CQHaOsFVgu0CR UQSQ== X-Gm-Message-State: AEkoouut2cQEc+T1EsAw7tLNLSYYr0xhZxhHDqq+Z/sIJ1ArmgJJID0D9BzaKXb7ldAgpQ== X-Received: by 10.28.229.1 with SMTP id c1mr75429429wmh.0.1470297501095; Thu, 04 Aug 2016 00:58:21 -0700 (PDT) Received: from brick (aib181.neoplus.adsl.tpnet.pl. [83.25.209.181]) by smtp.gmail.com with ESMTPSA id q187sm2276182wma.17.2016.08.04.00.58.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 Aug 2016 00:58:20 -0700 (PDT) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Date: Thu, 4 Aug 2016 05:11:32 +0200 From: Edward Tomasz =?utf-8?Q?Napiera=C5=82a?= To: Zaphod Beeblebrox Cc: FreeBSD Hackers Subject: Re: How to get better debugging for the kernel. Message-ID: <20160804031132.GA4832@brick> Mail-Followup-To: Zaphod Beeblebrox , FreeBSD Hackers References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.1 (2016-04-27) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Aug 2016 07:58:23 -0000 On 0802T1735, Zaphod Beeblebrox wrote: > I have just filed bug 211535. I'd like to be more helpful, but I'm having > some trouble with the level of optimization in the kernel. Much of kgdb's > output tells me that the value I'm looking for has been optimized away. > > So... how do I compile a kernel or a module without optimization _and_ how > badly will that affect the runtime of a lightly loaded server? > > My kernel is already compiled with -g. That tells me that I'm looking in > zap_leaf.c (part of ZFS). Can I simply compile zap_leaf.c without > optimization? You can try putting "#pragma clang optimize off" at the top of the file.