From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 4386B257FFB; Mon, 13 Feb 2023 20:04:29 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 4386B257FFB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1676307869; bh=qFz937fOS78Ni+O59fWnlHyHzbLiP8w5QNFlXzCfZyc=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=zNWXS++wwVZuEtXcTW1w8hBu7KwJD0eUza3njvU06VpjIkJm/OvtIA1uQwjZBHA8d kXdpG/6wapvBnSSgGjNVa3UCwUJDN6eQ/CwMX0zIQypiNpJaa11XpapdFXgTbTiBgd JlYf6i46RrWn9tvjNM7t0gwzjk4eqkkuuELiTkmk= Received: from smtp46.i.mail.ru (smtp46.i.mail.ru [95.163.41.84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 9DC8B257FF0 for ; Mon, 13 Feb 2023 20:03:29 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 9DC8B257FF0 Received: by smtp46.i.mail.ru with esmtpa (envelope-from ) id 1pRcEi-00Ft6R-OR; Mon, 13 Feb 2023 20:03:29 +0300 To: Sergey Kaplun , Maxim Kokryashkin Date: Mon, 13 Feb 2023 17:02:44 +0000 Message-Id: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9D95CB639AA8C08F888AB4C615D234DB91B2DF822ED67D5DA182A05F5380850407E44C8C83A4CD91A6DC71861DB057165FC1A756107E1C4ADE8095E77C1DC277C X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE774A7370C81A54524EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637C8CB211537E021E78638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8B29A367544E02A8CD6FE483F1F61C337117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC1D8F55CB9E08B94CA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F4460429728776938767073520D76C6ED7039589DEE5D25F19253116ADD2E47CDBA5A96583BA9C0B312567BB2376E601842F6C81A19E625A9149C048EE41BF15D38FB6CB3AFCE65BE3358055BDD8FC6C240DEA7642DBF02ECDB25306B2B78CF848AE20165D0A6AB1C7CE11FEE3E6BDB36F057AC83C040F9FF01DFDA4A8C4224003CC836476E2F48590F00D11D6E2021AF6380DFAD1A18204E546F3947CB11811A4A51E3B096D1867E19FE1407959CC434672EE6371089D37D7C0E48F6C8AA50765F7900637FB177F6A8366F17BEFF80C71ABB335746BA297DBC24807EABDAD6C7F3747799A X-C1DE0DAB: 0D63561A33F958A5F12EA8E93A131311A59A189A3A238BDCB3410FE688F410954EAF44D9B582CE87C8A4C02DF684249CC203C45FEA855C8F X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D3474B2583E513159840A935E2D2A3CC04001C0DE84BB02E53034BA4DF09A257BB6C532663170FBDF9A1D7E09C32AA3244CC983EFDC9022809ADE11FFF3D157E2E4A95CA90A1D8AC565927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojgB/I+mAIlFFFbeexFosdww== X-Mailru-Sender: 2FEBA92C8E508479FE7B9A1DF348D531626392C2CE6982C6E3392DCB9CABCA94713B82D3B60704E92326FE6F2A341ACE0FB9F97486540B4CD9E8847AB8CFED4D9ABF8A61C016C2CFB0DAF586E7D11B3E67EA787935ED9F1B X-Mras: Ok Subject: [Tarantool-patches] [PATCH luajit 2/7] build: fix build with JIT disabled X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Igor Munkin via Tarantool-patches Reply-To: Igor Munkin Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" 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 --- 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