From: Igor Munkin via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Sergey Kaplun <skaplun@tarantool.org>,
Maxim Kokryashkin <m.kokryashkin@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: [Tarantool-patches] [PATCH luajit 2/7] build: fix build with JIT disabled
Date: Mon, 13 Feb 2023 17:02:44 +0000 [thread overview]
Message-ID: <be776a962cfcaae3f91d08c74d626e0bb4a37087.1676304797.git.imun@tarantool.org> (raw)
In-Reply-To: <cover.1676304797.git.imun@tarantool.org>
struct GCtrace is defined only if LJ_HASJIT is set. Hence all spots
where GCtrace is used should be also moved under LJ_HASJIT define.
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
next prev parent reply other threads:[~2023-02-13 17:04 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-13 17:02 [Tarantool-patches] [PATCH luajit 0/7] Adjust tests to be run when JIT is disabled Igor Munkin via Tarantool-patches
2023-02-13 17:02 ` [Tarantool-patches] [PATCH luajit 1/7] Minor fixes Igor Munkin via Tarantool-patches
2023-02-13 18:47 ` Sergey Kaplun via Tarantool-patches
2023-02-14 13:51 ` Maxim Kokryashkin via Tarantool-patches
2023-02-13 17:02 ` Igor Munkin via Tarantool-patches [this message]
2023-02-13 18:53 ` [Tarantool-patches] [PATCH luajit 2/7] build: fix build with JIT disabled Sergey Kaplun via Tarantool-patches
2023-02-27 9:15 ` Igor Munkin via Tarantool-patches
2023-02-28 8:16 ` Maxim Kokryashkin via Tarantool-patches
2023-02-14 13:53 ` Maxim Kokryashkin via Tarantool-patches
2023-02-13 17:02 ` [Tarantool-patches] [PATCH luajit 3/7] test: stop using utils.selfrun in tests Igor Munkin via Tarantool-patches
2023-02-15 8:08 ` Sergey Kaplun via Tarantool-patches
2023-02-27 9:16 ` Igor Munkin via Tarantool-patches
2023-02-27 9:28 ` Sergey Kaplun via Tarantool-patches
2023-02-15 21:43 ` Maxim Kokryashkin via Tarantool-patches
2023-02-27 9:16 ` Igor Munkin via Tarantool-patches
2023-02-28 8:18 ` Maxim Kokryashkin via Tarantool-patches
2023-02-13 17:02 ` [Tarantool-patches] [PATCH luajit 4/7] test: make skipcond helper more convenient Igor Munkin via Tarantool-patches
2023-02-15 8:46 ` Sergey Kaplun via Tarantool-patches
2023-02-27 9:18 ` Igor Munkin via Tarantool-patches
2023-02-27 10:09 ` Sergey Kaplun via Tarantool-patches
2023-02-28 8:27 ` Maxim Kokryashkin via Tarantool-patches
2023-02-15 22:08 ` Maxim Kokryashkin via Tarantool-patches
2023-02-13 17:02 ` [Tarantool-patches] [PATCH luajit 5/7] test: add skipcond for all JIT-related tests Igor Munkin via Tarantool-patches
2023-02-14 13:50 ` Sergey Kaplun via Tarantool-patches
2023-02-15 22:31 ` Maxim Kokryashkin via Tarantool-patches
2023-02-28 19:02 ` Igor Munkin via Tarantool-patches
2023-03-01 19:31 ` Maxim Kokryashkin via Tarantool-patches
2023-02-13 17:02 ` [Tarantool-patches] [PATCH luajit 6/7] test: fix lua-Harness " Igor Munkin via Tarantool-patches
2023-02-14 12:42 ` Sergey Kaplun via Tarantool-patches
2023-02-28 19:01 ` Igor Munkin via Tarantool-patches
2023-02-15 22:35 ` Maxim Kokryashkin via Tarantool-patches
2023-02-28 19:02 ` Igor Munkin via Tarantool-patches
2023-03-01 19:31 ` Maxim Kokryashkin via Tarantool-patches
2023-02-13 17:02 ` [Tarantool-patches] [PATCH luajit 7/7] ci: add nojit flavor for exotic builds Igor Munkin via Tarantool-patches
2023-02-13 19:14 ` Sergey Kaplun via Tarantool-patches
2023-02-15 21:18 ` Maxim Kokryashkin via Tarantool-patches
2023-02-27 9:36 ` [Tarantool-patches] [PATCH luajit 0/7] Adjust tests to be run when JIT is disabled Igor Munkin via Tarantool-patches
2023-02-28 19:05 ` Igor Munkin 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=be776a962cfcaae3f91d08c74d626e0bb4a37087.1676304797.git.imun@tarantool.org \
--to=tarantool-patches@dev.tarantool.org \
--cc=imun@tarantool.org \
--cc=m.kokryashkin@tarantool.org \
--cc=skaplun@tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH luajit 2/7] 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