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 A8DB512849BB; Fri, 7 Mar 2025 10:21:46 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org A8DB512849BB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1741332106; bh=mURC+IqgJCgd/DUbWlpP2vLa76WrsPCeOQ1lrxZ7XxM=; 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=WV8jRUFu4fjRr+14+aK09nHXMsA0FujSan8Q1GVmUgwIctwTOP07R394D8b+VWstx KoosRfByKRZK0V2sjHc64xCJMWooUDHNqS/JIsXUH0igC/4ONKFEA2vIJk3um+F0VY B/DiZZV242kfJlRQEuUPx0ijkOgMnoROlVi38nQk= Received: from send173.i.mail.ru (send173.i.mail.ru [95.163.59.12]) (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 7256712849BB for ; Fri, 7 Mar 2025 10:21:45 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 7256712849BB Received: by exim-smtp-8cb569c79-glwmd with esmtpa (envelope-from ) id 1tqS1g-00000000Cm5-1OWi; Fri, 07 Mar 2025 10:21:44 +0300 Date: Fri, 7 Mar 2025 10:21:44 +0300 To: Sergey Bronnikov Cc: tarantool-patches@dev.tarantool.org Message-ID: References: <99f54bbebab5e38184294664a944b3cc314cb140.1741277815.git.sergeyb@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <99f54bbebab5e38184294664a944b3cc314cb140.1741277815.git.sergeyb@tarantool.org> X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9C8AED3E6A44DB6ABDD9CEB5AA6031299DC2A0753C2BEEB50182A05F53808504051280C640AD04E353DE06ABAFEAF6705C1CB67C52594B554D35F141BC662E2194787F701E01BBF3D X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7F65C230EDDCD559EEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637AC83A81C8FD4AD23D82A6BABE6F325AC2E85FA5F3EDFCBAA7353EFBB553375666B3C118DAE8E6700CCA5480908075C214F4CCCA64800AF11831D07CAC825F2B4389733CBF5DBD5E913377AFFFEAFD269176DF2183F8FC7C0A3E989B1926288338941B15DA834481FCF19DD082D7633A0EF3E4896CB9E6436389733CBF5DBD5E9D5E8D9A59859A8B65FF0BFC5AEE34BE6CC7F00164DA146DA6F5DAA56C3B73B237318B6A418E8EAB86D1867E19FE14079C09775C1D3CA48CF3D321E7403792E342EB15956EA79C166A417C69337E82CC275ECD9A6C639B01B78DA827A17800CE72F88032165008D51731C566533BA786AA5CC5B56E945C8DA X-C1DE0DAB: 0D63561A33F958A54D01D812727992985002B1117B3ED696BF3FE5FD06EDC66DB2920F75BA9A967F823CB91A9FED034534781492E4B8EEAD69BF13FED57427F1BDAD6C7F3747799A X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CFE73DA3A288AFD0E3A67A5DF5B5BCBAB1D784410EA0727C5E1CAAF41BC7172898B469278E65BD125AEDA8A7084F1AF318128ADCE3BC0051BE83992310878B88C47F76962A9DBFAD5C111DC66A97D0BFE2913E6812662D5F2A5EAB5682573093F7837F15F2B5E4A70B33F2C28C22F508233FCF178C6DD14203 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu53w8ahmwBjZKM/YPHZyZHvz5uv+WouB9+ObcCpyrx6l7KImUglyhkEat/+ysWwi0gdhEs0JGjl6ggRWTy1haxBpVdbIX1nthFXMZebaIdHP2ghjoIc/363UZI6Kf1ptIMVQiWK+2I7Y2sFWiKExBnudE= X-DA7885C5: 90EDE83E6985686CF255D290C0D534F901344A249FD38A7CCE0B63F984C9B16CF239D64F912CF2925B1A4C17EAA7BC4BEF2421ABFA55128DAF83EF9164C44C7E X-Mailru-Sender: 689FA8AB762F739381B31377CF4CA219483EB0B0EF274C4F53E7CE4DEA90762271A02C0753EED0C8E49D44BB4BD9522A059A1ED8796F048DB274557F927329BE89D5A3BC2B10C37545BD1C3CC395C826B4A721A3011E896F 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 fixes! LGTM, with 2 minor comments below. On 06.03.25, Sergey Bronnikov wrote: > When sysprof is not started the function `misc.sysprof.stop()` Typo: s/started/started,/ > reports that the profiler is already running: > > | $ ./src/luajit -e 'print(misc.sysprof.stop())' > | nil profiler is running already 22 > > The patch fixes that: > > | $ ./src/luajit -e 'print(misc.sysprof.stop())' > | nil profiler is not running 22 > > Follows up tarantool/tarantool#781 > --- > + 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 91ea461b..f316c390 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