From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp51.i.mail.ru (smtp51.i.mail.ru [94.100.177.111]) (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 4A7C8469719 for ; Fri, 9 Oct 2020 09:07:22 +0300 (MSK) Date: Fri, 9 Oct 2020 09:06:56 +0300 From: Sergey Kaplun Message-ID: <20201009060656.GA11255@root> References: <20201005063029.31737-1-skaplun@tarantool.org> <20201008172512.GU18920@tarantool.org> <20201008192954.GA8864@root> <20201008202613.GW18920@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201008202613.GW18920@tarantool.org> Subject: Re: [Tarantool-patches] [RFC v4] rfc: luajit metrics List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Munkin Cc: tarantool-patches@dev.tarantool.org Igor, On 08.10.20, Igor Munkin wrote: > Sergey, > > Thanks, the RFC LGTM in general now, but please consider the last minor > comments below. > > On 08.10.20, Sergey Kaplun wrote: > > Hi, Igor! Thanks for the review! > > > > On 08.10.20, Igor Munkin wrote: > > > Sergey, > > > > > > > > > > > > Minor: ChangeLog is misordered (the latest changes are the first entry). > > > > Thanks! > > > > Forgot to add ChangeLog to patch: > > @ChangeLog: > > * Add Lua and C API for LuaJIT platform metrics about: > > - overall amount of allocated tables, cdata and udata objects > > - number of incremental GC steps grouped by GC state > > - number of string hashes hits and misses > > - amount of allocated and freed memory > > - number of trace aborts, number of traces and restored snapshots > > The related issue should be also mentioned here. Removed bullets as we had discussed offline. @ChangeLog: * Introduced LuaJIT platform metrics (gh-5187). > > > > > > > > > > > > > > doc/rfc/5187-luajit-metrics.md | 299 +++++++++++++++++++++++++++++++++ > > > > 1 file changed, 299 insertions(+) > > > > create mode 100644 doc/rfc/5187-luajit-metrics.md > > > > > > > > diff --git a/doc/rfc/5187-luajit-metrics.md b/doc/rfc/5187-luajit-metrics.md > > > > new file mode 100644 > > > > index 000000000..02f5b559f > > > > --- /dev/null > > > > +++ b/doc/rfc/5187-luajit-metrics.md > > > > @@ -0,0 +1,299 @@ > > > > > > > > > > > > > > > +- `jit_mcode_size` -- whenever new MCode area is allocated `jit_mcode_size` is > > > > + increased at corresponding size in bytes. Sets to 0 when all mcode area is > > > > + freed. > > > > > > How does it change, when a trace is collected as a result of its flush? > > > > It doesn't. IINM, this area will be reused later for other traces. > > MCode area is linked with jit_State not with trace by itself. Trace just > > reserve MCode area that needed. > > I guess this should be explicitly mentioned here then. OK, added. See iterative patch in the bottom. Branch force-pushed. > > > > > > > > > > -- > > Best regards, > > Sergey Kaplun > > -- > Best regards, > IM =================================================================== diff --git a/doc/rfc/5187-luajit-metrics.md b/doc/rfc/5187-luajit-metrics.md index 0c1df6901..db9ec7ee7 100644 --- a/doc/rfc/5187-luajit-metrics.md +++ b/doc/rfc/5187-luajit-metrics.md @@ -108,7 +108,9 @@ Couple of words about how metrics are collected: BC or builtins this counter is incremented. - `jit_mcode_size` -- whenever new MCode area is allocated `jit_mcode_size` is increased at corresponding size in bytes. Sets to 0 when all mcode area is - freed. + freed. When a trace is collected by GC this value doesn't change. This area + will be reused later for other traces. MCode area is linked with `jit_State` + not with trace by itself. Traces just reserve MCode area that needed. All metrics are collected throughout the platform uptime. These metrics increase monotonically and can overflow: =================================================================== -- Best regards, Sergey Kaplun