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 A481A1320044; Wed, 5 Mar 2025 17:58:39 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org A481A1320044 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1741186719; bh=N6JDF3TX4yRdmtuu/K0QluSNjzpKGBMsszBRWKMMTBs=; 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=MUtpNn5cLUjk/7fvxxaGFYNTPdohwjLWJqNWQK/7hOJK9okDRAKd7PXWZZJCjEX40 6o0119LbBVqiCdKeA+SNopaIF6y5nRgKnibBAM3BTr+RPHpxClGnIhDOgESDlaWGBt FOczhYh63LAt1ZdxnSwAiq/xx1b0BKCVcVyclizg= Received: from send277.i.mail.ru (send277.i.mail.ru [95.163.59.116]) (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 0AE621320044 for ; Wed, 5 Mar 2025 17:58:38 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 0AE621320044 Received: by exim-smtp-8cb569c79-vmk5k with esmtpa (envelope-from ) id 1tpqCi-00000000Wh1-4B1V; Wed, 05 Mar 2025 17:58:37 +0300 Date: Wed, 5 Mar 2025 17:58:36 +0300 To: Sergey Bronnikov Cc: Sergey Bronnikov , tarantool-patches@dev.tarantool.org Message-ID: References: <80360fb2e570ce8d54ff59ccf0bcd5dfb6b98527.1739362814.git.sergeyb@tarantool.org> <93178b00-f3e0-4145-932f-bd273935a477@tarantool.org> <96d32e1d-eed2-4c64-b6fd-7743ab03051a@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <96d32e1d-eed2-4c64-b6fd-7743ab03051a@tarantool.org> X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9C8AED3E6A44DB6ABFDCD53BBF4104804EBBEFEA958EEC4E3182A05F538085040EA67CBF007C6643E3DE06ABAFEAF67055DE030E88F89AF748754E696E3EE2A96276EAACF4BA1B9AB X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7B8498AC83B273C12EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637AC83A81C8FD4AD23D82A6BABE6F325AC2E85FA5F3EDFCBAA7353EFBB55337566AE3F01DD33DDBDC885650282F1AE2E21784E4D2AD084B3F3B2AA8A0A3743773C389733CBF5DBD5E913377AFFFEAFD269176DF2183F8FC7C0A3E989B1926288338941B15DA834481FCF19DD082D7633A0EF3E4896CB9E6436389733CBF5DBD5E9D5E8D9A59859A8B6D52CD31C43BF465FCC7F00164DA146DA6F5DAA56C3B73B237318B6A418E8EAB8D32BA5DBAC0009BE9E8FC8737B5C2249EDF998CB16CCEE6976E601842F6C81A12EF20D2F80756B5FB606B96278B59C4276E601842F6C81A127C277FBC8AE2E8B7FE970921847EE7F3AA81AA40904B5D99C9F4D5AE37F343AD1F44FA8B9022EA23BBE47FD9DD3FB595F5C1EE8F4F765FC72CEEB2601E22B093A03B725D353964B0B7D0EA88DDEDAC722CA9DD8327EE4930A3850AC1BE2E7356C9A9530EBF72002C4224003CC83647689D4C264860C145E X-C1DE0DAB: 0D63561A33F958A5E02ADE7EBA66E82B5002B1117B3ED6962AE81F01E0B39BD05B6221DB6D7A72AD823CB91A9FED034534781492E4B8EEAD14747542773C033FBDAD6C7F3747799A X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CF5FE970E03AB3E44807A7F5B880240924CC05BED876C847EEBC230B95C0442357141C0AB2DA7D0DDA2C10F42E4F22A8B6D95D8BBBF65330FF6BCF32CDE5EFE26B78A73B8C862E7AEC5F4332CA8FE04980913E6812662D5F2A5EAB5682573093F7837F15F2B5E4A70B33F2C28C22F508233FCF178C6DD14203 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu53w8ahmwBjZKM/YPHZyZHvz5uv+WouB9+ObcCpyrx6l7KImUglyhkEat/+ysWwi0gdhEs0JGjl6ggRWTy1haxBpVdbIX1nthFXMZebaIdHP2ghjoIc/363UZI6Kf1ptIMVQiWK+2I7Y2sVxEh2umbO10= X-Mailru-Sender: 520A125C2F17F0B1A9638AD358559B5982027BB79A0BAC213DE06ABAFEAF67055DE030E88F89AF74B7CBEF92542CD7C88B0A2698F12F5C9EC77752E0C033A69E86920BD37369036789A8C6A0E60D2BB63A5DB60FBEB33A8A0DA7A0AF5A3A8387 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit][v2] Always close profiler output file. 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 adding the testcases! LGTM with a last comment below. > + > +local function close_profile_dump_with_0_samples_with_unload(subtest) > + local jit_p = require('jit.p') > + > + subtest:plan(1) > + > + collectgarbage('stop') > + jit_p.start(jit_p_options, filename) > + jit_p.stop() > + > + -- Unload the module and clean the local. > + package.loaded['jit.p'] = nil > + jit_p = nil -- luacheck: no unused > + collectgarbage('collect') > + > + local f = io.open(filename, 'r') > + local p_content = f:read('a*') > + subtest:is(p_content, '[No samples collected]\n', > + 'profile dump has no samples') > + f.close() Typo: s/f./f:/ -- Best regards, Sergey Kaplun