From: Maxim Kokryashkin via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: "Igor Munkin" <imun@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH luajit v2 2/5] build: fix build with JIT disabled
Date: Wed, 01 Mar 2023 22:27:46 +0300 [thread overview]
Message-ID: <1677698866.793685835@f426.i.mail.ru> (raw)
In-Reply-To: <f28def11f8ba0687a8ace72c85a8f239d11ef3df.1677607479.git.imun@tarantool.org>
[-- Attachment #1: Type: text/plain, Size: 2993 bytes --]
Hi, Igor!
Thanks for the patch!
LGTM, except for a few nits reagrding the commit message.
>
>>struct GCtrace is defined only if LJ_HASJIT is set. Hence, all spots
>Typo: s/struct GCtrace/`struct GCtrace`
>>where GCtrace is used should be also moved under LJ_HASJIT define.
>Typo: s/should be also/should also be
>>
>>Relates to tarantool/tarantool#8252
>>
>>Signed-off-by: Igor Munkin < imun@tarantool.org >
>>---
>> src/lj_memprof.c | 9 ++++-----
>> src/lj_symtab.c | 13 +++----------
>> src/lj_symtab.h | 2 ++
>> 3 files changed, 9 insertions(+), 15 deletions(-)
>>
>>diff --git a/src/lj_memprof.c b/src/lj_memprof.c
>>index d4a639fd..8cab8204 100644
>>--- a/src/lj_memprof.c
>>+++ b/src/lj_memprof.c
>>@@ -369,6 +369,8 @@ void lj_memprof_add_proto(const struct GCproto *pt)
>> lj_symtab_dump_proto(&mp->out, pt);
>> }
>>
>>+#if LJ_HASJIT
>>+
>> void lj_memprof_add_trace(const struct GCtrace *tr)
>> {
>> struct memprof *mp = &memprof;
>>@@ -380,6 +382,8 @@ void lj_memprof_add_trace(const struct GCtrace *tr)
>> lj_symtab_dump_trace(&mp->out, tr);
>> }
>>
>>+#endif /* LJ_HASJIT */
>>+
>> #else /* LJ_HASMEMPROF */
>>
>> int lj_memprof_start(struct lua_State *L, const struct lj_memprof_options *opt)
>>@@ -401,9 +405,4 @@ void lj_memprof_add_proto(const struct GCproto *pt)
>> UNUSED(pt);
>> }
>>
>>-void lj_memprof_add_trace(const struct GCtrace *tr)
>>-{
>>- UNUSED(tr);
>>-}
>>-
>> #endif /* LJ_HASMEMPROF */
>>diff --git a/src/lj_symtab.c b/src/lj_symtab.c
>>index 91ee9a72..54984c05 100644
>>--- a/src/lj_symtab.c
>>+++ b/src/lj_symtab.c
>>@@ -53,16 +53,7 @@ void lj_symtab_dump_trace(struct lj_wbuf *out, const GCtrace *trace)
>> lj_wbuf_addu64(out, (uint64_t)lineno);
>> }
>>
>>-#else
>>-
>>-static void lj_symtab_dump_trace(struct lj_wbuf *out, const GCtrace *trace)
>>-{
>>- UNUSED(out);
>>- UNUSED(trace);
>>- lua_assert(0);
>>-}
>>-
>>-#endif
>>+#endif /* LJ_HASJIT */
>>
>> void lj_symtab_dump_proto(struct lj_wbuf *out, const GCproto *pt)
>> {
>>@@ -491,11 +482,13 @@ void lj_symtab_dump(struct lj_wbuf *out, const struct global_State *g,
>> lj_symtab_dump_proto(out, pt);
>> break;
>> }
>>+#if LJ_HASJIT
>> case (~LJ_TTRACE): {
>> lj_wbuf_addbyte(out, SYMTAB_TRACE);
>> lj_symtab_dump_trace(out, gco2trace(o));
>> break;
>> }
>>+#endif /* LJ_HASJIT */
>> default:
>> break;
>> }
>>diff --git a/src/lj_symtab.h b/src/lj_symtab.h
>>index 6faa5cb1..6ec0cd7c 100644
>>--- a/src/lj_symtab.h
>>+++ b/src/lj_symtab.h
>>@@ -60,10 +60,12 @@
>> #define SYMTAB_TRACE ((uint8_t)2)
>> #define SYMTAB_FINAL ((uint8_t)0x80)
>>
>>+#if LJ_HASJIT
>> /*
>> ** Dumps traceinfo into the symbol table.
>> */
>> void lj_symtab_dump_trace(struct lj_wbuf *out, const GCtrace *trace);
>>+#endif /* LJ_HASJIT */
>>
>> /*
>> ** Dumps function prototype.
>>--
>>2.30.2
>--
>Best regards,
>Maxim Kokryashkin
>
[-- Attachment #2: Type: text/html, Size: 4408 bytes --]
next prev parent reply other threads:[~2023-03-01 19:27 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-28 19:00 [Tarantool-patches] [PATCH luajit v2 0/5] Adjust tests to be run when JIT is disabled Igor Munkin via Tarantool-patches
2023-02-28 19:00 ` [Tarantool-patches] [PATCH luajit v2 1/5] Minor fixes Igor Munkin via Tarantool-patches
2023-03-01 19:25 ` Maxim Kokryashkin via Tarantool-patches
2023-02-28 19:00 ` [Tarantool-patches] [PATCH luajit v2 2/5] build: fix build with JIT disabled Igor Munkin via Tarantool-patches
2023-03-01 19:27 ` Maxim Kokryashkin via Tarantool-patches [this message]
2023-03-02 15:52 ` Igor Munkin via Tarantool-patches
2023-02-28 19:00 ` [Tarantool-patches] [PATCH luajit v2 3/5] test: add skipcond for all JIT-related tests Igor Munkin via Tarantool-patches
2023-03-01 10:04 ` Sergey Kaplun via Tarantool-patches
2023-03-02 16:42 ` Igor Munkin via Tarantool-patches
2023-03-01 19:28 ` Maxim Kokryashkin via Tarantool-patches
2023-02-28 19:00 ` [Tarantool-patches] [PATCH luajit v2 4/5] test: fix lua-Harness " Igor Munkin via Tarantool-patches
2023-03-01 10:08 ` Sergey Kaplun via Tarantool-patches
2023-03-01 19:30 ` Maxim Kokryashkin via Tarantool-patches
2023-02-28 19:00 ` [Tarantool-patches] [PATCH luajit v2 5/5] ci: add nojit flavor for exotic builds Igor Munkin via Tarantool-patches
2023-03-01 19:30 ` Maxim Kokryashkin via Tarantool-patches
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=1677698866.793685835@f426.i.mail.ru \
--to=tarantool-patches@dev.tarantool.org \
--cc=imun@tarantool.org \
--cc=m.kokryashkin@tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH luajit v2 2/5] build: fix build with JIT disabled' \
/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