From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 44A5671727B; Tue, 5 Dec 2023 15:29:35 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 44A5671727B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1701779375; bh=AHY9H8f/LktBZAvTjjILJUDp72vm8/6d/gtujXhr8ss=; h=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=CAGJhYLxuXE7jJxs77a4xdO9+arw0cpH+r6URo/b+/XlliP/o2UJCbtGokuEzR13B wQTCKO1cfo1fPrm991oWAg9Kz0HtHl1s5jaNgTG012ou+gW39slA0HHwHfUKtikjnK +TERNPwEudeJYGGZSIF8977NYgqcSCPl5JB7HJSw= Received: from smtp51.i.mail.ru (smtp51.i.mail.ru [95.163.41.87]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 37F8D716A53 for ; Tue, 5 Dec 2023 15:29:34 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 37F8D716A53 Received: by smtp51.i.mail.ru with esmtpa (envelope-from ) id 1rAUYO-0092sD-3A; Tue, 05 Dec 2023 15:29:33 +0300 Date: Tue, 5 Dec 2023 15:25:01 +0300 To: Igor Munkin Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 78E4E2B564C1792B X-77F55803: 4F1203BC0FB41BD91486559A3ABF84E7CBAF789B6B32821FF6551DECFE8B152A182A05F53808504059E8D03B82F6A9033AEBD99239F1BE6C5C2217D48BD81CECAA8B699AC6CF8CEC X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7F9D05773942AAE9CEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F790063781E06E36B00F36668638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8C0F64003C2DB21301B1E6D037F0C6B61117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC8C7ADC89C2F0B2A5A471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F446042972877693876707352033AC447995A7AD186FD1C55BDD38FC3FD2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269176DF2183F8FC7C0C70DDB8F70474A6A68655334FD4449CB9ECD01F8117BC8BEAAAE862A0553A39223F8577A6DFFEA7C0BF7CEC3D2FC0D9C43847C11F186F3C59DAA53EE0834AAEE X-C1DE0DAB: 0D63561A33F958A5FEA7722A57EA68590B149D9FC9714407935D602F1671D047F87CCE6106E1FC07E67D4AC08A07B9B065B78C30F681404DCB5012B2E24CD356 X-C8649E89: 1C3962B70DF3F0ADBF74143AD284FC7177DD89D51EBB7742424CF958EAFF5D571004E42C50DC4CA955A7F0CF078B5EC49A30900B95165D34A533D6DF7731C6643AA2D8020415ED7F285A4083A69BAD8D12FB9C1B949B5F16ABC500CC67AAED3D1D7E09C32AA3244C2C59E0713558993265F172677FBA395EA90944CA99CF22E385A42E4C463514DC5DA084F8E80FEBD3202CD0F03380D9577A83BD0C44CE203720ABEDE4BBDD9CDD X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojJEmydpeiNq90MniriQ7pcA== X-DA7885C5: 87A5723B78BEE4FE46523D225B0EA10B58C091F97A0BDB50050A45C866AF6C54262E2D401490A4A0DB037EFA58388B346E8BC1A9835FDE71 X-Mailru-Sender: 689FA8AB762F7393590D8C940224AE3395557BB23050A2279EED187728B045270FBE9A32752B8C9C2AA642CC12EC09F1FB559BB5D741EB962F61BD320559CF1EFD657A8799238ED55FEEDEB644C299C0ED14614B50AE0675 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit 2/2] test: rewrite sysprof test using managed execution X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Sergey Kaplun via Tarantool-patches Reply-To: Sergey Kaplun Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Hi, Igor! Thanks for the fixes! Please, consider my comments below. On 05.12.23, Igor Munkin wrote: > Sergey, > > Thanks for your review! > > On 05.12.23, Sergey Kaplun wrote: > > Hi, Igor! > > Thanks for the patch! > > Really awesome improvement for our sysprof testing! > > Please consider my comments below. > > > > On 03.12.23, Maxim Kokryashkin wrote: > > > > +/* Sysprof "/dev/null" stream helpers. {{{ */ > > > > + > > > > +/* > > > > + * Yep, 8Mb. Tuned in order not to bother the platform with too > > > > + * often flushes. > > > > + */ > > > > This comment is misleading since there is no any flushes in the writer > > function. > > Well, it's not about I/O flushes, but rather about sysprof write-buffer > pressure, isn't it? Hence, 8Mb is needed to make the test omit almost > all buffer-flush related callbacks. Ok, got your point. So mention this in the comment instead. And remove "/dev/null" mentioning. > > > Also, do we need such big buffer? Maybe `PATH_MAX` * 2 (or something > > like that) should be enough? > > Could you elaborate the reason for such a strange constant, please? Considering your comment above this isn't relevant no more. Ignore please. > > > > > > > +#define STREAM_BUFFER_SIZE (8 * 1024 * 1024) > > > > +#define DEVNULL -1 > > > > `DEVNULL` name is misleading (like we've actually opened `/dev/null`). > > Maybe `DUMMY_FD` is better? Also, I suppose we can drop the `fd` field > > at all. We can just use static structure in this translation unit and > > compare pointer against it, so there is no need for an additional field > > fd in the structure itself. > > I see little reasoning in this suggestion: the approach with the > structure is quite straight-forward and copied from another sysprof test > implemented in C. Re naming: I prefer to leave it as is. I don't get why it is straight-forward. This approach with unused fields is just misleading. In the `fd` field is used since the "/dev/null" is opened and data written to it. Also, since we can use custom writer, that test may be updated wo using `fd` too. But this should be done as a separate refactoring patch. > > In general, your nit is nice, but I believe it should be applied > for the patch moving tricks to utils library. I don't see any relations with ptrace here. It's just the usage of sysprof's C API. > > > > > > > + > > > > Typo: s//the / > > > > > > + * FIXME: Make this part test agnostic. > > > > Typo: s/test agnostic/test-agnostic/ > > > > Nit: TODO looks more valid for me (since it's working). > > Feel free to ignore. > > Fixed. > > ================================================================================ > > diff --git a/test/tarantool-c-tests/gh-8594-sysprof-ffunc-crash.test.c b/test/tarantool-c-tests/gh-8594-sysprof-ffunc-crash.test.c > index 44421812..036f8141 100644 > --- a/test/tarantool-c-tests/gh-8594-sysprof-ffunc-crash.test.c > +++ b/test/tarantool-c-tests/gh-8594-sysprof-ffunc-crash.test.c > @@ -153,8 +153,8 @@ static int tracee(const char *luacode) > > /* > * XXX: The only event to be streamed must be FFUNC at > - * instruction. > - * FIXME: Make this part test agnostic. > + * the instruction. > + * TODO: Make this part test agnostic. Typo: s/test agnostic/test-agnostic/ > > > > > -- > > Best regards, > > Sergey Kaplun > > -- > Best regards, > IM -- Best regards, Sergey Kaplun