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 v2 2/5] build: fix build with JIT disabled Date: Tue, 28 Feb 2023 19:00:45 +0000 [thread overview] Message-ID: <f28def11f8ba0687a8ace72c85a8f239d11ef3df.1677607479.git.imun@tarantool.org> (raw) In-Reply-To: <cover.1677607479.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-28 19:04 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 ` Igor Munkin via Tarantool-patches [this message] 2023-03-01 19:27 ` [Tarantool-patches] [PATCH luajit v2 2/5] build: fix build with JIT disabled Maxim Kokryashkin via Tarantool-patches 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=f28def11f8ba0687a8ace72c85a8f239d11ef3df.1677607479.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 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