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 8F3CD6ECC0; Tue, 12 Apr 2022 17:33:22 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 8F3CD6ECC0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1649774002; bh=SKmiHR9DwONOD7EyxP30VVeUNQY9TUGIwyD8zE2vrd4=; 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=X3K1t51SvzpK+Nq9ZmGyowfjRyalBNIkfXCXggA6mUKXHCKmpDnjyjRJVBtBjQ6K8 VcNmDzemrvnQhqRcOGIjTUebI+2q7/S3oc1gQFRXcARDz2FKYaobAaRBrXZjep5c4c CSOw0vBRiWFexk3KT8Lq7w5z/+beYTXVIlXt8vm4= Received: from smtpng1.i.mail.ru (smtpng1.i.mail.ru [94.100.181.251]) (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 9DFAA6ECC0 for ; Tue, 12 Apr 2022 17:33:20 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 9DFAA6ECC0 Received: by smtpng1.m.smailru.net with esmtpa (envelope-from ) id 1neHa3-00061I-KR; Tue, 12 Apr 2022 17:33:20 +0300 Date: Tue, 12 Apr 2022 17:29:52 +0300 To: Mikhail Shishatskiy Message-ID: References: <20211208172207.80148-1-m.shishatskiy@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20211208172207.80148-1-m.shishatskiy@tarantool.org> X-Clacks-Overhead: GNU Terry Pratchett X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD916C41472748AFA04013005C0D8F583A6476F10B4B0E16F7500894C459B0CD1B97B3D731BC691C99C91BECE95959BFF8C0A1242F98822031C6CDF01CFFFA87C39 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7A3DED2DACB82E709C2099A533E45F2D0395957E7521B51C2CFCAF695D4D8E9FCEA1F7E6F0F101C6778DA827A17800CE759251087BE69EEF7EA1F7E6F0F101C6723150C8DA25C47586E58E00D9D99D84E1BDDB23E98D2D38BEBC5CAB6D411FFA6C3D345D7DF05702F3CE38F7D94E34078CC7F00164DA146DAFE8445B8C89999728AA50765F790063783E00425F71A4181389733CBF5DBD5E9C8A9BA7A39EFB766F5D81C698A659EA7CC7F00164DA146DA9985D098DBDEAEC81D471462564A2E19F6B57BC7E6449061A352F6E88A58FB86F5D81C698A659EA7E827F84554CEF5019E625A9149C048EE9ECD01F8117BC8BEE2021AF6380DFAD18AA50765F790063735872C767BF85DA227C277FBC8AE2E8B8D940F9BB5DEEEE475ECD9A6C639B01B4E70A05D1297E1BBCB5012B2E24CD356 X-8FC586DF: 6EFBBC1D9D64D975 X-C1DE0DAB: 0D63561A33F958A59C37BA5BA0FBDE48071D2EB08D8B76591DE92F13ECC1767AD59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA75F0DFBB38B116E9C7410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D343DCFC3BEDFB0242DF985C3AAFF416AE997FE80466E20C350E2FDA883F7851A949FD9777ED7D956361D7E09C32AA3244CC25F09C06EFAC9FC28B4505ED902A3C3A95CA90A1D8AC565927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojGJUQSLYIeTJNM5ZEYNNwbA== X-Mailru-Sender: 689FA8AB762F739339CABD9B3CA9A7D65E9C29920586AA6A308CD0A12B4FC6C8A7C8D0F45F857DBFE9F1EFEE2F478337FB559BB5D741EB964C8C2C849690F8E70A04DAD6CC59E3365FEEDEB644C299C0ED14614B50AE0675 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit v2] memprof: enrich symtab when new trace is allocated 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" Misha, Thanks for the patch! I've fixed few issues I've found by myself, LGTM otherwise. CI is green[1], so I've I've checked the patch into tarantool branch in tarantool/luajit and bumped a new version in master. On 08.12.21, Mikhail Shishatskiy wrote: > Since symtab can be enriched with new prototypes, it > can be enriched with new traces as well. This feature > can help to investigate trace-generation-heavy apps > with memprof. > > This patch introduces the functionality described above by > adding a `prof_epoch` counter to the `GCtrace` structure. > If the profiler meets allocation from a trace, it checks if > the trace was already streamed to the symtab. If not, > a symtab entry is dumped inside an : > > | event-symtab := event-header sym? > | sym := sym-lua | sym-trace > | sym-trace := trace-no sym-addr line-no > > Since this patch, traces are no longer identified by address, > as all the name collisions are resolved with symbols epochs. > > Also, the API of changed: function `parse_sym_trace` > is now public in order to use it from the module. > > Follows up tarantool/tarantool#5815 > --- > > CI: https://github.com/tarantool/tarantool/tree/shishqa/enrich-symtab-when-trace-is-allocated-v2 > branch: https://github.com/tarantool/luajit/tree/shishqa/enrich-symtab-when-trace-is-allocated-v2 > > src/lj_jit.h | 8 +++++++ > src/lj_memprof.c | 22 +++++++++++++------ > src/lj_memprof.h | 5 +++-- > src/lj_trace.c | 3 +++ > .../misclib-memprof-lapi.test.lua | 13 +++++------ > tools/memprof/parse.lua | 3 ++- > tools/utils/symtab.lua | 14 ++++-------- > 7 files changed, 41 insertions(+), 27 deletions(-) > > -- > 2.33.1 > [1]: https://github.com/tarantool/luajit/commit/11ab4c4 -- Best regards, IM