From owner-freebsd-fs@freebsd.org Wed Feb 22 20:52:15 2017 Return-Path: Delivered-To: freebsd-fs@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 C33D1CE9EAB; Wed, 22 Feb 2017 20:52:15 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-yw0-x22c.google.com (mail-yw0-x22c.google.com [IPv6:2607:f8b0:4002:c05::22c]) (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 8298B995; Wed, 22 Feb 2017 20:52:15 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-yw0-x22c.google.com with SMTP id p77so7573825ywg.1; Wed, 22 Feb 2017 12:52:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=cPktHW3sIWytEwQbcd5QsAeR8dJQlSWi99ee3bFg/lk=; b=lqn1Azs3Gj3LCU5DTi4vb7AzTgV/azU+p02lFUe2oSZyH4MFZrhFcmyx61p6pN7DOH 4pYCcWNZjP7M73BeZCESaq9bUqRREscwxJMK6nYcNPD2J4bSFg3k0quOKiPLqMX8JKdc 8hrDl0xITmAnxukzXV0Tk673euRKxiOh2EP16pRvm05EvI8nbb/9hOoMzJiTZy8VJkVR 2hAQaAFHhAM/AnDAXC7VOf1GuP7xrmn62H3PrS9gOS8ylQvKAOhNZSRjpnDhwHDBs1Nr XIk7lv/2L7cg6xQZ8Y2ovr0CmyHGwJOHXtkZ1XLFOA9D7b003nnGEVhucF7zUzoxRj9t YSng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=cPktHW3sIWytEwQbcd5QsAeR8dJQlSWi99ee3bFg/lk=; b=KibRTXzryc+Pn71ZfQmn3tNstLuPZwtBvhAtpmfEHUNrCs8D4wbWcr7PtuBmyhWApF AX2aMVJy2vs4T39ouqtW6COBIrgDmIX5tdpUgNLMFlykmX8CNFj7Y1y7OtgWOMAJzVYo aZKYj/ClfldaZrKHLBfIExacq6lXEkIELn0doMRlzMSyudWD1g6rUbFxm/ycme3qZdSK QKRYFG07It/qThtTjPLXUlzc0ykdmTDGymWKBB+HfwUmD+HlduMYo7jQHntNw0vip9UD NCbahOVJS4w7IxckMWnwb6jVwbVw6PevPFmhFS5+tLkxFQelpcEp+xNh11JaV+We6uQe vdKg== X-Gm-Message-State: AMke39mAwaKmUKj91+8c468RBrC5pEMC1TkygBab3+rRrChfcXxmorTvD+Ajn9EVUs/n4UWYbkVDh/u5O8KSWQ== X-Received: by 10.129.68.31 with SMTP id r31mr56684ywa.307.1487796734453; Wed, 22 Feb 2017 12:52:14 -0800 (PST) MIME-Version: 1.0 Sender: asomers@gmail.com Received: by 10.129.38.133 with HTTP; Wed, 22 Feb 2017 12:52:14 -0800 (PST) In-Reply-To: <492944119.20170222234742@serebryakov.spb.ru> References: <492944119.20170222234742@serebryakov.spb.ru> From: Alan Somers Date: Wed, 22 Feb 2017 13:52:14 -0700 X-Google-Sender-Auth: r8JtiaJY8EEMpz9eiBG9Ei-2eNU Message-ID: Subject: Re: Is it known problem, that zfs.ko could not be built with system compiler (clang 3.9.1) without optimization? To: Lev Serebryakov Cc: FreeBSD , freebsd-fs Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Feb 2017 20:52:15 -0000 The panic is definitely a bug. You should create a bug on bugzilla for that one, if it isn't there already. It's to be expected that a lot of FBT probes won't be present in the default build. But there are two ways to ameliorate that: 1) Add a "__noinline" attribute to any function you want to trace 2) Add "#pragma clang optimize off" and "#pragma clang optimize on" around the code you want to debug. Note that even with optimization disabled, clang may still choose to inline static functions. But it does make stack traces easier to debug. -Alan On Wed, Feb 22, 2017 at 1:47 PM, Lev Serebryakov wrote: > Hello Freebsd-stable, > > Now if you build zfs.ko with -O0 it panics on boot. > > If you use default optimization level, a lot of fbt DTreace probes are > missing. > > -- > Best regards, > Lev mailto:lev@FreeBSD.org > > _______________________________________________ > freebsd-stable@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org"