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 CF0DB482AA0; Tue, 18 Jul 2023 11:44:07 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org CF0DB482AA0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1689669847; bh=CPzBYocsOdO1XMuaH2VwmnUEV9DxDrnOwlDFZXUtRgw=; 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=y1Mw+YiCSrj0Ju6GZU+LqGu6BAWAyfpHA31KnztJH3/3gy4CDuPTPaqUux2VXOGIh gLN6GcVnoAXreTwaSgSWBwehtv2VkxcpfJ6WKDRBkD1f8cELUTw1AOruEnqPSvhPAu g5n5O6vcntY8oeBHIsLiPGQVAq4WNfRsV21dsMME= Received: from smtp36.i.mail.ru (smtp36.i.mail.ru [95.163.41.77]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 2A442482AA0 for ; Tue, 18 Jul 2023 11:44:06 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 2A442482AA0 Received: by smtp36.i.mail.ru with esmtpa (envelope-from ) id 1qLgJR-008ZRg-5n; Tue, 18 Jul 2023 11:44:05 +0300 Date: Tue, 18 Jul 2023 08:33:13 +0000 To: Maxim Kokryashkin Message-ID: References: <20230524203513.246808-1-m.kokryashkin@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20230524203513.246808-1-m.kokryashkin@tarantool.org> X-Clacks-Overhead: GNU Terry Pratchett X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9A075ED6396529197719E315D036F0456EE92739D00BFCE97182A05F538085040AA7FB438A6C91F6490A9688B28FEBCF07124D97208D008AEE785D157E08A4B28 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7AED985C8E545F588EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F790063764FE777F378F21448638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D84A35F692886B257026F69D7C129671CB117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCF1175FABE1C0F9B6A471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F44604297287769387670735200AC5B80A05675ACDBDFBBEFFF4125B51D2E47CDBA5A96583BA9C0B312567BB2376E601842F6C81A19E625A9149C048EEB1593CA6EC85F86DB78CF848AE20165DD8FC6C240DEA76429C9F4D5AE37F343AA9539A8B242431040A6AB1C7CE11FEE3457EE4B4996FC5466E0066C2D8992A16C4224003CC836476E2F48590F00D11D6E2021AF6380DFAD1A18204E546F3947CB11811A4A51E3B096D1867E19FE1407959CC434672EE6371089D37D7C0E48F6C8AA50765F79006371F24DFF1B2961425731C566533BA786AA5CC5B56E945C8DA X-C1DE0DAB: 0D63561A33F958A58EC50F53AC871E1B0F9955E1EFA466D096E50D5A3C14F821F87CCE6106E1FC07E67D4AC08A07B9B04AB4081B6A6C2E07CB5012B2E24CD356 X-C8649E89: 1C3962B70DF3F0ADBF74143AD284FC7177DD89D51EBB7742424CF958EAFF5D571004E42C50DC4CA955A7F0CF078B5EC49A30900B95165D346F44602F3B4946340432B68195FC087047C0722D3C6087530588A7937ED2C59AF9FE6363576C67E71D7E09C32AA3244C1AFB957CA0715C73DA31B455F57CD5B94DBEAD0ED6C55A80BAD658CF5C8AB4025DA084F8E80FEBD376A4ED3E9341DC2FCD72808BE417F3B9E0E7457915DAA85F X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojLxQD/rvAZi4QSejPK/WJrw== X-Mailru-Sender: 2FEBA92C8E508479FE7B9A1DF348D5314CA1E94751F98569C0832564D747E3E88D8C9154A7B92B0F2326FE6F2A341ACE0FB9F97486540B4CD9E8847AB8CFED4D9ABF8A61C016C2CFB0DAF586E7D11B3E67EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit v2] sysprof: improve parser's memory footprint 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: Igor Munkin via Tarantool-patches Reply-To: Igor Munkin Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Max, Thanks for the patch! My general comment relates to integrational testing. I'd rather left the stub for tools/sysprof/collapse.lua and remove it in a separate series. E.g. we update integrational workflows the same way, however hard update is also an option. On 24.05.23, Maxim Kokryashkin via Tarantool-patches wrote: > This patch reduces sysprof's parser memory footprint, > by avoiding reading all callchains before collapsing them. > Instead of it, parser merges stacks immediately after > reading them and stores counts in a lua table. > > Also, it fixes a bug in the AVL-tree implementation, > which produced unnecessary inserts of values into nodes. Minor: I guess it's better to split this patch into two: one fixing the bug in AVL tree, and another one for reducing memory footprint. AFAIU, you stop using tables to store nodes and this decision affects several parts of the sources, making review a bit harder. Hence, it's only partial for now and I'm waiting for v3 series. Side note: Honestly, I'd rather split this into three patches: 1. AVL-related fixes 2. Reducing memory footprint 3. Purging collapse.lua The order doesn't matter (until it follows the common sense and breaks nothing). > --- > > Changes in v2: > - Fixed comments as per review by Sergey. > > Branch: https://github.com/tarantool/luajit/tree/fckxorg/gh-8700-sysprof-parser-refactoring > PR: https://github.com/tarantool/tarantool/pull/8703 > > tools/CMakeLists.txt | 2 - > tools/sysprof.lua | 27 +------- > tools/sysprof/collapse.lua | 124 ------------------------------------ > tools/sysprof/parse.lua | 127 +++++++++++++++++++++++++++---------- > tools/utils/avl.lua | 2 +- > tools/utils/symtab.lua | 2 +- > 6 files changed, 97 insertions(+), 187 deletions(-) > delete mode 100755 tools/sysprof/collapse.lua > diff --git a/tools/sysprof.lua b/tools/sysprof.lua > index 1afab195..be2a0565 100644 > --- a/tools/sysprof.lua > +++ b/tools/sysprof.lua > > + for stack, count in pairs(events) do > + print(stack, count) Minor: Previous implementation was space separated, the current on is tab separated. Dunno, whether this is OK. > + end > os.exit(0) > end > -- > 2.40.1 > -- Best regards, IM