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 86DC13048D3; Tue, 28 Feb 2023 22:04:43 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 86DC13048D3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1677611083; bh=huxhwoRYbk1Piv8l7bv140RsvGyaAsHuDWpJYyi4pAk=; 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=gLuYo7DLYyFjA1l3QA+mVZ8WbumEPaFDx0BLxKzbVyZZlYs+HG3J0JooVGLVBceKb NGFNizEhlnUVKAXHNW8MX2POUkNXHJSPAKgIiVtoXSDW83VUxi/9GX9tOsuv5CQOIL LvxIo7z215KNKfNmlI/zFeXFkBuxLYT01D9ioi8Q= Received: from smtp32.i.mail.ru (smtp32.i.mail.ru [95.163.41.73]) (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 87AC824B901 for ; Tue, 28 Feb 2023 22:03:41 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 87AC824B901 Received: by smtp32.i.mail.ru with esmtpa (envelope-from ) id 1pX5GG-000qWR-KK; Tue, 28 Feb 2023 22:03:41 +0300 To: Sergey Kaplun , Maxim Kokryashkin Date: Tue, 28 Feb 2023 19:00:45 +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: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD9CCAB0EF48C080D70AFC106C0FFBC86DF1C928D65D1B6CDD4182A05F53808504098DCB17F0933372A83796F9D307B043EDF0863757CA56396EABA0AD694DE85D2 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE775E4C393EFDC22A2EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637AE50F465217C6D208638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8423F65E1DB9D0715048CDB82CA8B5F95117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC3D810FF210572CA4A471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F44604297287769387670735207B96B19DC4093321C26CFBAC0749D213D2E47CDBA5A96583BA9C0B312567BB2376E601842F6C81A19E625A9149C048EE41BF15D38FB6CB3A3DBBCB839D0549ACD8FC6C240DEA7642DBF02ECDB25306B2B78CF848AE20165D0A6AB1C7CE11FEE3ABB3490C75E89280BA3038C0950A5D36B5C8C57E37DE458B330BD67F2E7D9AF16D1867E19FE14079C09775C1D3CA48CF3D321E7403792E342EB15956EA79C166A417C69337E82CC275ECD9A6C639B01B78DA827A17800CE7D151390FFDBF6399731C566533BA786AA5CC5B56E945C8DA X-C1DE0DAB: 0D63561A33F958A51DC391A4A5A8BEE47E9A1CA50CC155C8D78A7449DCED390A4EAF44D9B582CE87C8A4C02DF684249CC203C45FEA855C8F X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34980A6B448CFD1B8A3290066C4105984B858B11D57505F4A9F84F8045152E5C7AE2E477DF66ED3B7D1D7E09C32AA3244C7C801BD44B4041F7C00BE21D76FFE76755E75C8D0ED9F6EE927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojMN6DA1mNzI+fAatWRj56Cw== X-Mailru-Sender: 2FEBA92C8E508479FE7B9A1DF348D531D395CDE6305F6E735511EC3E07B9E50CD34B31F94090839A2326FE6F2A341ACE0FB9F97486540B4CD9E8847AB8CFED4D9ABF8A61C016C2CFB0DAF586E7D11B3E67EA787935ED9F1B X-Mras: Ok Subject: [Tarantool-patches] [PATCH luajit v2 2/5] 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