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 0874B6F869; Tue, 1 Feb 2022 00:36:57 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 0874B6F869 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1643665017; bh=4uIjgZAukR701U6+z2RnPj2s/rJ+0Wio5VeDpGaWIq0=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=BowIPlakqzC0PE0veW9U8P3MJfFxQyk73GEQXCMX79D5ckK7hoY6/DR1iXK/Q5eeZ NiEq60SLcWgki99+Uya4CqAt2cHfviL2ChQf/ukxuNt8FZ5ky0qgLZY6l+0w/JOZdm a9/O8LzfDIIOXCd455FWhXCbK3k1T5i2Bpv/NO/U= Received: from smtpng3.i.mail.ru (smtpng3.i.mail.ru [94.100.177.149]) (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 456E36F867 for ; Tue, 1 Feb 2022 00:36:55 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 456E36F867 Received: by smtpng3.m.smailru.net with esmtpa (envelope-from ) id 1nEeM2-0002SX-3N; Tue, 01 Feb 2022 00:36:54 +0300 To: Sergey Kaplun , Maxim Kokryashkin Date: Tue, 1 Feb 2022 00:33:53 +0300 Message-Id: X-Mailer: git-send-email 2.34.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD99F281FB7F96F126D60D1AA10CBFBF518CE4DA1FD0E9094A000894C459B0CD1B97008CECF249400811B25CD2866E7489687F19ABF61EF05D60A6114B6EA4A0CCE X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7978947DCA0D4215FEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006371B0187663A04449C8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D85580469DD76170E97B092046792B0970117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC2EE5AD8F952D28FBA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F446042972877693876707352033AC447995A7AD18C26CFBAC0749D213D2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269A417C69337E82CC2E827F84554CEF50127C277FBC8AE2E8BA83251EDC214901ED5E8D9A59859A8B658CDF7FFE3EBBCC0089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-8FC586DF: 6EFBBC1D9D64D975 X-C1DE0DAB: C20DE7B7AB408E4181F030C43753B8186998911F362727C4C7A0BC55FA0FE5FC4AB1E0ADA1F5C92EF464716A74415E6F09E396D9C671DC98B1881A6453793CE9C32612AADDFBE0615B6A00009961F2D0C581CE5390BD6510078749EA292E75700EA540613ABC294F04EBA3D8E7E5B87ABF8C51168CD8EBDB081CF0AE924DC023DC48ACC2A39D04F89CDFB48F4795C241BDAD6C7F3747799A X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D346B222596F62B8FA969902BE7063CA0E3C163F973BF712C07BD312CFFFAD539C868D1331159F286CA1D7E09C32AA3244C26E89B2BA8173FCBDB21499927C7032E69B6CAE0477E908D927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojbL9S8ysBdXiKA6tK+sFPTWm14TXMsYz/ X-Mailru-Sender: 689FA8AB762F739339CABD9B3CA9A7D6BA799DDD537B01B150029E2801929E07A7C8D0F45F857DBFE9F1EFEE2F478337FB559BB5D741EB964C8C2C849690F8E70A04DAD6CC59E3365FEEDEB644C299C0ED14614B50AE0675 X-Mras: Ok Subject: [Tarantool-patches] [PATCH 0/2] Minor enhancements in luajit-gdb.py 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" This series provides several minor but vital enhancements for and commands. For more info please proceed to the particular commit message. Branch: https://github.com/tarantool/luajit/tree/imun/luajit-gdb-minor-enhancements CI is red[1], but... em... I didn't dig the particular reasons for its failure, since all of them looks to be related to our infra. Since we have no CI for luajit-gdb.py, one can try the following test scenario: | $ ./tarantool -v | Tarantool 2.10.0-beta2-73-g10acda7b5 | Target: Linux-x86_64-Debug | Build options: cmake . -DCMAKE_INSTALL_PREFIX=/usr/local -DENABLE_BACKTRACE=ON | Compiler: /usr/bin/cc /usr/bin/c++ | C_FLAGS: -fexceptions -funwind-tables -fno-omit-frame-pointer -fno-stack-protector -fno-common -fopenmp -msse2 -std=c11 -Wall -Wextra -Wno-strict-aliasing -Wno-char-subscripts -Wno-format-truncation -Wno-gnu-alignof-expression -fno-gnu89-inline -Wno-cast-function-type -Werror | CXX_FLAGS: -fexceptions -funwind-tables -fno-omit-frame-pointer -fno-stack-protector -fno-common -fopenmp -msse2 -std=c++11 -Wall -Wextra -Wno-strict-aliasing -Wno-char-subscripts -Wno-format-truncation -Wno-invalid-offsetof -Wno-gnu-alignof-expression -Wno-cast-function-type -Werror | $ gdb ./tarantool | GNU gdb (Gentoo 11.1 vanilla) 11.1 | | | | Reading symbols from ./tarantool... | (gdb) r | Starting program: /tarantool/src/tarantool | [Thread debugging using libthread_db enabled] | Using host libthread_db library "/lib64/libthread_db.so.1". | Tarantool 2.10.0-beta2-73-g10acda7b5 | type 'help' for interactive help | tarantool> ffi = require 'ffi' | --- | ... | | tarantool> ffi.cdef('struct x { int i; };') | --- | ... | | tarantool> a = ffi.gc(ffi.new('struct x', { i = 1 }), function(self) self.i = 0 end) | --- | ... | | tarantool> b = ffi.gc(ffi.new('struct x', { i = 2 }), function(self) self.i = 0 end) | --- | ... | | tarantool> a = nil | --- | ... | | tarantool> b = nil | --- | ... | | tarantool> | Program received signal SIGINT, Interrupt. | 0x00007ffff5684536 in epoll_wait () from /lib64/libc.so.6 | (gdb) b lj_cf_collectgarbage | Breakpoint 1 at 0x55555583468f: file /tarantool/third_party/luajit/src/lib_base.c, line 437. | (gdb) c | Continuing. | collectgarbage() | | Breakpoint 1, lj_cf_collectgarbage (L=0x400004a0) at /tarantool/third_party/luajit/src/lib_base.c:437 | 437 { | (gdb) s | 438 int opt = lj_lib_checkopt(L, 1, LUA_GCCOLLECT, /* ORDER LUA_GC* */ | (gdb) source ../third_party/luajit/src/luajit-gdb.py | lj-arch command initialized | lj-tv command initialized | lj-str command initialized | lj-tab command initialized | lj-stack command initialized | lj-state command initialized | lj-gc command initialized | luajit-gdb.py is successfully loaded | (gdb) lj-stack L | ----------- Red zone: 5 slots ----------- | 0x40047fc0 [ ] VALUE: nil | 0x40047fb8 [ ] VALUE: nil | 0x40047fb0 [ ] VALUE: nil | 0x40047fa8 [ ] VALUE: nil | 0x40047fa0 [ ] VALUE: nil | ----------- Stack: 168 slots ----------- | 0x40047f98 [ M] VALUE: nil | 0x40047ae0:0x40047f90 [ ] 151 slots: Free stack slots | 0x40047ad8 [ BT ] VALUE: number 2.3873090119523254e-313 | 0x40047ad0 [ ] FRAME: [PP] delta=1, fast function #27 | 0x40047ac8 [ ] FRAME: [L] delta=7, fast function #20 | 0x40047ac0 [ ] VALUE: Lua function @ 0x400c00b0, 2 upvalues, "@builtin/box/console.lua":243 | 0x40047ab8 [ ] VALUE: nil | 0x40047ab0 [ ] VALUE: Lua function @ 0x4013b010, 0 upvalues, "return collectgarbage()":0 | 0x40047aa8 [ ] VALUE: nil | 0x40047aa0 [ ] VALUE: string "collectgarbage()" @ 0x40149538 | 0x40047a98 [ ] VALUE: table @ 0x400c0f88 (asize: 0, hmask: 0x1) | 0x40047a90 [ ] FRAME: [LP] delta=3, Lua function @ 0x4014fe30, 3 upvalues, "@builtin/box/console.lua":379 | 0x40047a88 [ ] VALUE: string "collectgarbage()" @ 0x40149538 | 0x40047a80 [ ] VALUE: table @ 0x400c0f88 (asize: 0, hmask: 0x1) | 0x40047a78 [ ] FRAME: [L] delta=3, Lua function @ 0x40075aa8, 1 upvalues, "@builtin/box/console.lua":701 | 0x40047a70 [ ] VALUE: string "/home/imun" @ 0x400ff388 | 0x40047a68 [ ] VALUE: table @ 0x400c0f88 (asize: 0, hmask: 0x1) | 0x40047a60 [ ] FRAME: [CP] delta=1, Lua function @ 0x4014d0c8, 5 upvalues, "@builtin/box/console.lua":746 | 0x40047a58 [S ] FRAME: dummy L | (gdb) lj-gc | GC stats: PAUSE | total: 1211508 | threshold: 1977000 | debt: 0 | estimate: 988555 | stepmul: 200 | pause: 200 | sweepstr: 8192/8192 | root: 6774 objects | gray: 0 objects | grayagain: 21 objects | weak: 20 objects | mmudata: 0 objects | (gdb) b gc_finalize | Breakpoint 2 at 0x55555581d67b: file /tarantool/third_party/luajit/src/lj_gc.c, line 511. | (gdb) c | Continuing. | | Breakpoint 2, gc_finalize (L=0x4019a6b8) at /tarantool/third_party/luajit/src/lj_gc.c:511 | 511 { | (gdb) lj-gc | GC stats: FINALIZE | total: 1055138 | threshold: 1977000 | debt: 0 | estimate: 1055138 | stepmul: 200 | pause: 200 | sweepstr: 8192/8192 | root: 6468 objects | gray: 0 objects | grayagain: 1120 objects | weak: 20 objects | mmudata: 2 objects Igor Munkin (2): gdb: unwind Lua stack top part gdb: add mmudata value to lj-gc output src/luajit-gdb.py | 67 +++++++++++++++++++++++++++++++---------------- 1 file changed, 44 insertions(+), 23 deletions(-) [1]: https://github.com/tarantool/tarantool/tree/imun/luajit-gdb-minor-enhancements-full-ci -- 2.34.0