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 234316EC55; Fri, 9 Jul 2021 14:04:14 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 234316EC55 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1625828654; bh=F7WBR7WlDbcH+EkkcaadPw9nUDZ8nssBpVZ+6/6yDsw=; h=To:Cc:Date:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=j985V5I9v1nVzfZgDcCP4b8G+/B2eJSVCiONvlL+MVR7nnf79KFvfhTP3+GkMvjuf b5vsOW7QWg/E/DDRomUNLF3jgz0k+K8NCQ1P+0jhmjFQ7Ow0P0QVjMKnbXWUNoQzha B1TDW7auqgcybTgnVOzyxHDh/ypBi82KM97FcgMk= Received: from smtp33.i.mail.ru (smtp33.i.mail.ru [94.100.177.93]) (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 718AB6EC55 for ; Fri, 9 Jul 2021 14:04:13 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 718AB6EC55 Received: by smtp33.i.mail.ru with esmtpa (envelope-from ) id 1m1oIm-0008Ob-Jx; Fri, 09 Jul 2021 14:04:13 +0300 To: gorcunov@tarantool.org, alyapunov@tarantool.org Cc: tarantool-patches@dev.tarantool.org, Egor Elchinov Date: Fri, 9 Jul 2021 14:03:49 +0300 Message-Id: X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD954DFF1DC42D673FB64496B12B6C6FB87FF3732CFA8D8C028182A05F538085040222589F8D49619765A7750709114FC1376E944E5CABD139D5133FAF9374D14EA X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7AEA4A6B3AFC9B957C2099A533E45F2D0395957E7521B51C2CFCAF695D4D8E9FCEA1F7E6F0F101C6778DA827A17800CE70F1463317FA92A598F08D7030A58E5AD1A62830130A00468AEEEE3FBA3A834EE7353EFBB5533756644FE9905A23AFB600B73FD909FB8F4172578C9845923D1B5A471835C12D1D9774AD6D5ED66289B5278DA827A17800CE7328B01A8D746D8839FA2833FD35BB23D2EF20D2F80756B5F868A13BD56FB6657A471835C12D1D977725E5C173C3A84C3E478A468B35FE767117882F4460429728AD0CFFFB425014E868A13BD56FB6657D81D268191BDAD3DC09775C1D3CA48CFFCD0ED5114EBE179BA3038C0950A5D36C8A9BA7A39EFB766EC990983EF5C0329BA3038C0950A5D36D5E8D9A59859A8B6947DD20D8EE2708776E601842F6C81A1F004C906525384307823802FF610243DF43C7A68FF6260569E8FC8737B5C2249EC8D19AE6D49635B68655334FD4449CB9ECD01F8117BC8BEAAAE862A0553A39223F8577A6DFFEA7CA5583D5FF21A78E543847C11F186F3C59DAA53EE0834AAEE X-C1DE0DAB: C20DE7B7AB408E4181F030C43753B8186998911F362727C414F749A5E30D975C44FE9905A23AFB600B73FD909FB8F4172578C9845923D1B59C2B6934AE262D3EE7EAB7254005DCED5177E3BD826A77771E0A4E2319210D9B64D260DF9561598F01A9E91200F654B0AEA200A0D3D80EA68E8E86DC7131B365E7726E8460B7C23C X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34980A6B448CFD1B8A9A2A7381158A12888D352E4644DB3EAABF4E4E1BE730A6B4CD631585194C42BC1D7E09C32AA3244C33C8BFA6F9C2F259352916915EB0F681F26BFA4C8A6946B8927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojbL9S8ysBdXhfGtq77ANurfx5Rmo1XS1d X-Mailru-Sender: 11C2EC085EDE56FAC07928AF2646A76956AEED8A7B5CBC2A5A7750709114FC13BA0848438379BFCE58570E9BDA2331C06F53C80213D1719C2C26F88BABE1618CA23003C376F5F1387402F9BA4338D657ED14614B50AE0675 X-Mras: Ok Subject: [Tarantool-patches] [PATCH v2 0/4] fiber: introduce creation backtrace 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: Egor Elchinov via Tarantool-patches Reply-To: eelchinov@tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" From: Egor Elchinov This patchset adds the subtable `backtrace_parent()` to `fiber.info()` holding backtraces of fiber creation and introduces `fiber.parent_bt_enable()` and `fiber.parent_bt_disable()` procedures managing the runtime ability to collect parent backtraces for newly created fibers. Changes in v2: - first 3 patches merged together - unnecessary changes in `ENABLE_BACKTRACE` usages reverted https://github.com/tarantool/tarantool/issues/4002 https://github.com/tarantool/tarantool/tree/Egor2001/gh-4002-fiber-creation-backtrace Egor Elchinov (4): fiber: add PoC for fiber creation backtrace fiber: add option and PoC for Lua parent backtrace fiber: refactor lua backtrace routines fiber: refactor C backtrace and add changelog .../gh-4002-fiber-creation-backtrace.md | 8 + src/lib/core/backtrace.cc | 247 +++++++++++++++--- src/lib/core/backtrace.h | 10 +- src/lib/core/crash.c | 2 +- src/lib/core/fiber.c | 35 +++ src/lib/core/fiber.h | 34 +++ src/lua/fiber.c | 223 ++++++++++++++-- src/lua/fiber.h | 19 ++ .../gh-4002-fiber-creation-backtrace.result | 78 ++++++ .../gh-4002-fiber-creation-backtrace.test.lua | 34 +++ 10 files changed, 620 insertions(+), 70 deletions(-) create mode 100644 changelogs/unreleased/gh-4002-fiber-creation-backtrace.md create mode 100644 test/app/gh-4002-fiber-creation-backtrace.result create mode 100644 test/app/gh-4002-fiber-creation-backtrace.test.lua -- 2.31.1