From owner-freebsd-hackers@freebsd.org Mon Oct 22 20:50:43 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 32101106DEC2 for ; Mon, 22 Oct 2018 20:50:43 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9ABBD72F47; Mon, 22 Oct 2018 20:50:42 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: by mail-lj1-x229.google.com with SMTP id j4-v6so38293230ljc.12; Mon, 22 Oct 2018 13:50:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=oxTM1Kx5qKua6KqkCMXu4tVLo9SYPWhwSOmRWFuEQ3Y=; b=gpYV6/Z+hh7W66Zp8Y9hAf/mDAAujdOZHcBtFSEkBL/bQGsDbz6ocOzaO8bZVe8zuD uLhaPilDMkb+ip4cGP8dFAS1q0vDFTZmHtHEDngJGwTgwkfojYZdJL5SMFQKLDXyJtAX FYMwXziogXme+hpmJv1GqOAAQCZuUAEtR62JxBk4bPkVOuYcO923tvAu7GNkcZcmaAe8 9qTaDgguaeFrkKXd7vrs4ITRb+zsqHb2zua6O8GvU3+UtpR/j3wcF2ZTlS6edNZIB4Dz bNv6KcQMjLgjxdCexuNha4R7aFcdiZXFiSc2BkovYY5WqKXyTDv/sGiJO/hvNMnOp2ZS 8CdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=oxTM1Kx5qKua6KqkCMXu4tVLo9SYPWhwSOmRWFuEQ3Y=; b=C6BHA9hmOMCcQ91bDhDfISqkojCH7ffReStIy0bVLybPT97MZP2LTwVLq1qRN2J0iB MPYxdxHjZtQCRjzsAe9PDQ6aTdXeKFcWBQ4Rjb+AgNE/G+Sz8sDuLpLrge7ydTiryred Fut7fFtt0YnNtW1RJdlcnnUq2HjFYXhCMvdWL/mPxdJ66KnjJ027aW0kmLLvqyfnoSJT V1BQbuc/BaUCuGaMhHMeeahvPd1n7NDJ1xQQ8GhYOtCDO7NBJ7Wtb/FlnzRCBI5PNYl/ U3tFU2CAjvCJgQlibCJtWEL4i7y3/fPZra5LBnVCtt+WiIeq6gKMuLs5Usan/OLq5Dtt Mltw== X-Gm-Message-State: AGRZ1gKcO8TwB2XMhik2O/qAhTfWzmP8QiJ4ReJLuOl7VNl+w+uElmsb 9TIpacXO09ZmiaW0JB/BR1AQ7bKibjBoxZ+aMFnIhg== X-Google-Smtp-Source: AJdET5fKpqnTudxbJdSiB1/jww/EXrd06r9exoNFqH/ZFrz46Xjne9bWL96FsqkDpwJT3Ct2owNzNjJM8VxWtTjOvp8= X-Received: by 2002:a2e:85da:: with SMTP id h26-v6mr42028ljj.122.1540241440997; Mon, 22 Oct 2018 13:50:40 -0700 (PDT) MIME-Version: 1.0 References: <170994671.20181021201021@serebryakov.spb.ru> <475670271.20181022003734@serebryakov.spb.ru> <234d745d-37a9-9610-15b9-0f5cd5af21bf@FreeBSD.org> In-Reply-To: From: Ryan Stone Date: Mon, 22 Oct 2018 16:50:29 -0400 Message-ID: Subject: Re: What is wrong with dtrace's stack()? To: lev@freebsd.org Cc: Alan Somers , freebsd-hackers@freebsd.org, cse.cem@gmail.com Content-Type: text/plain; charset="UTF-8" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Oct 2018 20:50:43 -0000 Adding -fno-optimize-sibling-calls to the compiler flags will eliminate the TCO. On Mon, Oct 22, 2018 at 9:44 AM Lev Serebryakov wrote: > > On 22.10.2018 14:45, Lev Serebryakov wrote: > > > CURVNET_SET(so->so_vnet); > > if (!SOLISTENING(so)) > > error = so->so_proto->pr_usrreqs->pru_sosend(so, addr, uio, > > top, control, flags, td); > > else { > > m_freem(top); > > m_freem(control); > > error = ENOTCONN; > > } > > CURVNET_RESTORE(); > Oh, I'm idiot, it is eligible for TCO, if VNET is not compiled-in. > > > -- > // Lev Serebryakov >