Date: Mon, 22 Oct 2018 16:50:29 -0400 From: Ryan Stone <rysto32@gmail.com> To: lev@freebsd.org Cc: Alan Somers <asomers@freebsd.org>, freebsd-hackers@freebsd.org, cse.cem@gmail.com Subject: Re: What is wrong with dtrace's stack()? Message-ID: <CAFMmRNz35Ay82NcMnUkSAvpyU5p2m9ykiji1xXcbEanH9A2H%2Bw@mail.gmail.com> In-Reply-To: <b30f2080-1037-1752-60fb-6d22e28ce90d@FreeBSD.org> References: <170994671.20181021201021@serebryakov.spb.ru> <CAG6CVpVCe-8OVU%2BKEyAh8swFSAjRshNcNLN0tjAS3W8bZxyrTA@mail.gmail.com> <475670271.20181022003734@serebryakov.spb.ru> <CAOtMX2goztCYJXM72WNR711DEBEKAGk1zFHF=NpE4UiVAF2bAQ@mail.gmail.com> <234d745d-37a9-9610-15b9-0f5cd5af21bf@FreeBSD.org> <b30f2080-1037-1752-60fb-6d22e28ce90d@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Adding -fno-optimize-sibling-calls to the compiler flags will eliminate the TCO. On Mon, Oct 22, 2018 at 9:44 AM Lev Serebryakov <lev@freebsd.org> 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 >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFMmRNz35Ay82NcMnUkSAvpyU5p2m9ykiji1xXcbEanH9A2H%2Bw>