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 E08C9131B0B7; Wed, 5 Mar 2025 17:52:57 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org E08C9131B0B7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1741186378; bh=U08syWOWWk8GhMm4K9g+5HAnGpktHkPpYT1coUaQ8bs=; h=Date:To:Cc:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=pg7WjI/FB5HyOu8ZaXUEf7nye9Op4TFcFHBNf2vWmKxhpBjbRHUXAz3wGwyQCkFAX eRcb2olkbw/mgAS+0DpAOXEghX+tvoBdHp+nHtSF9e+sm5+f/+e8+YXDPsFJzcCY5w VC815x2NMG19AlIodVZiwwdY6yb1QgZrf4i+i/l4= Received: from send83.i.mail.ru (send83.i.mail.ru [89.221.237.178]) (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 531B6131B0BA for ; Wed, 5 Mar 2025 17:52:57 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 531B6131B0BA Received: by exim-smtp-8cb569c79-mwc5w with esmtpa (envelope-from ) id 1tpq7D-00000000BPr-0i0j; Wed, 05 Mar 2025 17:52:56 +0300 Date: Wed, 5 Mar 2025 17:52:53 +0300 To: Sergey Bronnikov Cc: tarantool-patches@dev.tarantool.org 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: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD9C8AED3E6A44DB6ABFDCD53BBF41048049C796A527F736CF3182A05F538085040F11C059C4532AFC03DE06ABAFEAF6705DC1AEC31223397778754E696E3EE2A96E41C5801A3FD0B27 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE789066434B85BF7C7EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637AC83A81C8FD4AD23D82A6BABE6F325AC2E85FA5F3EDFCBAA7353EFBB55337566AE3F01DD33DDBDC89D680CD1E820A68E91AAE73EDFE21724C0641864C92C8A6E389733CBF5DBD5E913377AFFFEAFD269A417C69337E82CC2CC7F00164DA146DAFE8445B8C89999729449624AB7ADAF37F6B57BC7E64490611E7FA7ABCAF51C92176DF2183F8FC7C0DEC8C2C8BCD2534D8941B15DA834481F9449624AB7ADAF37BA3038C0950A5D3613377AFFFEAFD269176DF2183F8FC7C0259A6D7820E4F02E7B076A6E789B0E97A8DF7F3B2552694AD5FFEEA1DED7F25D49FD398EE364050F0AC5B80A05675ACD4D0DA9BD313A0613B3661434B16C20ACC84D3B47A649675FE827F84554CEF5019E625A9149C048EE9ECD01F8117BC8BEE2021AF6380DFAD18AA50765F790063735872C767BF85DA227C277FBC8AE2E8BB07C9E286C61B7F975ECD9A6C639B01B4E70A05D1297E1BBCB5012B2E24CD356 X-C1DE0DAB: 0D63561A33F958A5A22DBBADAD9C50115002B1117B3ED6964AA476B4B117F9AD108A05421C070DB8823CB91A9FED034534781492E4B8EEADAE4FDBF11360AC9BBDAD6C7F3747799A X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CF4A7084FA18655C8249ECAB1AA64621460ADA168904EF027777F3AA69F627611F80A302719471681B2C10F42E4F22A8B61C0EF9260420CF56C10773373262ED1A7BC9810192C0C6A7111DC66A97D0BFE2913E6812662D5F2A5EAB5682573093F7837F15F2B5E4A70B33F2C28C22F508233FCF178C6DD14203 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu53w8ahmwBjZKM/YPHZyZHvz5uv+WouB9+ObcCpyrx6l7KImUglyhkEat/+ysWwi0gdhEs0JGjl6ggRWTy1haxBpVdbIX1nthFXMZebaIdHP2ghjoIc/363UZI6Kf1ptIMVQiWK+2I7Y2sr2zIb5/ssbI= X-Mailru-Sender: 520A125C2F17F0B1A9638AD358559B59511869D1CB7FBEC43DE06ABAFEAF6705DC1AEC3122339777B7CBEF92542CD7C88B0A2698F12F5C9EC77752E0C033A69E86920BD37369036789A8C6A0E60D2BB63A5DB60FBEB33A8A0DA7A0AF5A3A8387 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit 3/3] sysprof: fix a message with stop without run 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 Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Hi, Sergey! Thanks for the patch! LGTM, with a few nits regarding the commit message and 1 ignorable comment to the code style. On 25.02.25, Sergey Bronnikov wrote: > The function `misc.sysprof.stop()` reports that profiler is Typo: s/profiler/the profiler/ > already running: > > | $ ./src/luajit -e 'print(misc.sysprof.stop())' > | nil profiler is running already 22 > > both in `sysprof_error()` and fixes aforementioned problem. Don't get this sentence. Typo: s/aforementioned/the aforementioned/ > > Follows up tarantool/tarantool#781 > --- > src/lib_misc.c | 6 ++++++ > .../tarantool-tests/profilers/misclib-sysprof-lapi.test.lua | 5 +++-- > 2 files changed, 9 insertions(+), 2 deletions(-) > > diff --git a/src/lib_misc.c b/src/lib_misc.c > index c4b40996..74888d20 100644 > --- a/src/lib_misc.c > +++ b/src/lib_misc.c > @@ -335,6 +335,12 @@ LJLIB_CF(misc_sysprof_stop) > return prof_error(L, PROFILE_ERRUSE, err_details); > #else > int status = luaM_sysprof_stop(L); > + if (LJ_UNLIKELY(status == PROFILE_ERRRUN)) { > + lua_pushnil(L); > + lua_pushstring(L, err2msg(LJ_ERR_PROF_NOTRUNNING)); > + lua_pushinteger(L, EINVAL); > + return 3; > + } > if (LJ_UNLIKELY(status != PROFILE_SUCCESS)) It looks like more natural now to use else if here now. > return prof_error(L, status, NULL); > > diff --git a/test/tarantool-tests/profilers/misclib-sysprof-lapi.test.lua b/test/tarantool-tests/profilers/misclib-sysprof-lapi.test.lua > index ebd80cf6..770b5736 100644 > --- a/test/tarantool-tests/profilers/misclib-sysprof-lapi.test.lua > +++ b/test/tarantool-tests/profilers/misclib-sysprof-lapi.test.lua > -- > 2.43.0 > -- Best regards, Sergey Kaplun