[Tarantool-patches] [PATCH luajit] core: fix cdata decrementing

Sergey Kaplun skaplun at tarantool.org
Thu Mar 4 16:35:12 MSK 2021


Hi, Sergos!

Thanks for the review!
Added your tag:
| Reviewed-by: Sergey Ostanevich <sergos at tarantool.org>

On 02.03.21, Sergey Ostanevich wrote:
> Hi!
> 
> Thanks for the patch!
> LGTM on the changes, still I can see a number of places you do not 
> collect information about GC objects being created, although
> they all about function parsing/creating. 
> 
> Are we intentionally not looking into these?

I've checked these chunks again:

| $ grep lj_mem_newgco -R ../src | grep GC | grep -v -e ircall -e FASTCALL
| ../src/lj_parse.c:  pt = (GCproto *)lj_mem_newgco(L, (MSize)sizept);
| ../src/lj_bcread.c:  pt = (GCproto *)lj_mem_newgco(ls->L, (MSize)sizept);
| ../src/lj_tab.c:    t = (GCtab *)lj_mem_newgco(L, sizetabcolo(asize));
| ../src/lj_func.c:  GCupval *uv = (GCupval *)lj_mem_newgco(L, sizeof(GCupval));
| ../src/lj_func.c:  GCfunc *fn = (GCfunc *)lj_mem_newgco(L, sizeCfunc(nelems));
| ../src/lj_func.c:  GCfunc *fn = (GCfunc *)lj_mem_newgco(L, sizeLfunc((MSize)pt->sizeuv));
| ../src/lj_cdata.h:  cd = (GCcdata *)lj_mem_newgco(cts->L, sizeof(GCcdata) + sz);
| ../src/lj_cdata.h:  GCcdata *cd = (GCcdata *)lj_mem_newgco(L, sizeof(GCcdata) + sz);

We count tabs and cdata correctly.
As for prototypes, upvalues and functions counters -- they are not
reported by design for now.

> 
> regards,
> Sergos
> 

<snipped>

-- 
Best regards,
Sergey Kaplun


More information about the Tarantool-patches mailing list