From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 9C3872C114 for ; Thu, 4 Oct 2018 18:27:41 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UoTgg5g8CeLC for ; Thu, 4 Oct 2018 18:27:41 -0400 (EDT) Received: from smtp49.i.mail.ru (smtp49.i.mail.ru [94.100.177.109]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 45B362C10C for ; Thu, 4 Oct 2018 18:27:41 -0400 (EDT) Date: Fri, 5 Oct 2018 01:27:37 +0300 From: Konstantin Osipov Subject: [tarantool-patches] Re: [PATCH 2/3] Proper unwind for currently executing fiber Message-ID: <20181004222737.GN22855@chai> References: <7b844650e2e0799813e82b32ea2d637982bc3395.1537535602.git.georgy@tarantool.org> <20180925233402.GJ3137@chai> <14423179.bJO8PXla9P@home.lan> <20180926173625.GO30528@chai> <3bf7292e6ae0c5b7b892c204457c630c73bd8108.1538638419.git.georgy@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3bf7292e6ae0c5b7b892c204457c630c73bd8108.1538638419.git.georgy@tarantool.org> Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-subscribe: List-owner: List-post: List-archive: To: tarantool-patches@freelists.org Cc: Georgy Kirichenko * Georgy Kirichenko [18/10/04 13:34]: > Each yielded fiber has a preserved coro state stored in a corresponding > variable however an executing fiber has a volatile state placed in CPU > registers (stack pointer, instruction pointer and non-volatile registers) > and corresponding context-storing variable value is invalid. > For already yielded fiber we have to use a special asm-written handler to make > a temporary switch to the preserved state and capture executing context what > is not needed for executing fiber. > After the patch for the executing fiber NULL is passed to the backtrace > function as coro context and then backtrace function could decide should > it use special context-switching handler or might just use unw_getcontext > from the unwind library. OK to push. -- Konstantin Osipov, Moscow, Russia, +7 903 626 22 32 http://tarantool.io - www.twitter.com/kostja_osipov