Tarantool development patches archive
 help / color / mirror / Atom feed
From: Igor Munkin <imun@tarantool.org>
To: Sergey Kaplun <skaplun@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH v4 1/2] core: introduce various platform metrics
Date: Thu, 8 Oct 2020 12:28:38 +0300	[thread overview]
Message-ID: <20201008092838.GS18920@tarantool.org> (raw)
In-Reply-To: <20201007201601.GR18920@tarantool.org>

Sergey,

On 07.10.20, Igor Munkin wrote:
> Sergey,
> 
> Thanks for your fixes! There is still a comment regarding CNEW
> assembling and a couple minors below.
> 

<snipped>

> 
> > diff --git a/src/lj_asm_mips.h b/src/lj_asm_mips.h
> > index f4b4b5d..0341701 100644
> > --- a/src/lj_asm_mips.h
> > +++ b/src/lj_asm_mips.h
> > @@ -1430,7 +1430,9 @@ static void asm_cnew(ASMState *as, IRIns *ir)
> >    CTInfo info = lj_ctype_info(cts, id, &sz);
> >    const CCallInfo *ci = &lj_ir_callinfo[IRCALL_lj_mem_newgco];
> >    IRRef args[4];
> > +  RegSet allow = (RSET_GPR & ~RSET_SCRATCH);
> >    RegSet drop = RSET_SCRATCH;
> > +  Reg tmp;
> >    lua_assert(sz != CTSIZE_INVALID || (ir->o == IR_CNEW && ir->op2 != REF_NIL));
> >  
> >    as->gcsteps++;
> > @@ -1442,7 +1444,6 @@ static void asm_cnew(ASMState *as, IRIns *ir)
> >  
> >    /* Initialize immutable cdata object. */ >    if (ir->o == IR_CNEWI) {
> > -    RegSet allow = (RSET_GPR & ~RSET_SCRATCH);
> >  #if LJ_32
> >      int32_t ofs = sizeof(GCcdata);
> >      if (sz == 8) {
> > @@ -1473,15 +1474,16 @@ static void asm_cnew(ASMState *as, IRIns *ir)
> >      return;
> >    }
> >  
> > +  tmp = ra_scratch(as, allow);
> 
> Since there are registers allocated in scope of IR_CNEWI assembling
> above, you need to exclude those registers from <allow> set prior to
> scratching a new one.

I glanced <ra_scratch> once more: the register to be yielded is picked
from the intersection between the not used set and allowed set (which is
quite obvious), so there is no problem. Disregard the comment above.

> 
> >    /* Code incrementing cdatanum is sparse to avoid mips data hazards. */

<snipped>

-- 
Best regards,
IM

  reply	other threads:[~2020-10-08  9:39 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-05  6:30 [Tarantool-patches] [PATCH v4 0/2] Implement LuaJIT " Sergey Kaplun
2020-10-05  6:30 ` [Tarantool-patches] [PATCH v4 1/2] core: introduce various " Sergey Kaplun
2020-10-07 14:11   ` Igor Munkin
2020-10-07 19:55     ` Sergey Kaplun
2020-10-07 20:16       ` Igor Munkin
2020-10-08  9:28         ` Igor Munkin [this message]
2020-10-08 10:11         ` Sergey Kaplun
2020-10-08 12:44           ` Igor Munkin
2020-10-09 14:39             ` Sergey Ostanevich
2020-10-05  6:30 ` [Tarantool-patches] [PATCH v4 2/2] misc: add C and Lua API for " Sergey Kaplun
2020-10-06 22:17   ` Igor Munkin
2020-10-07  5:57     ` Igor Munkin
2020-10-07 14:35     ` Sergey Kaplun
2020-10-07 18:23       ` Igor Munkin
2020-10-07 20:09         ` Sergey Kaplun
2020-10-09 14:45   ` Sergey Ostanevich
2020-10-13  6:01     ` Sergey Kaplun
2020-10-05  6:30 ` [Tarantool-patches] [RFC v4] rfc: luajit metrics Sergey Kaplun
2020-10-07 14:46   ` Sergey Kaplun
2020-10-08 17:25   ` Igor Munkin
2020-10-08 19:29     ` Sergey Kaplun
2020-10-08 20:26       ` Igor Munkin
2020-10-09  6:06         ` Sergey Kaplun
2020-12-22  9:07   ` Kirill Yukhin
2020-10-08 17:33 ` [Tarantool-patches] [PATCH v4 0/2] Implement LuaJIT platform metrics Igor Munkin
2020-10-13 13:17 ` Kirill Yukhin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201008092838.GS18920@tarantool.org \
    --to=imun@tarantool.org \
    --cc=skaplun@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH v4 1/2] core: introduce various platform metrics' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox