From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23023 invoked by alias); 18 Jul 2011 23:20:11 -0000 Received: (qmail 23013 invoked by uid 22791); 18 Jul 2011 23:20:11 -0000 X-SWARE-Spam-Status: No, hits=-6.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 18 Jul 2011 23:19:51 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p6INJpLe025767 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 18 Jul 2011 19:19:51 -0400 Received: from [10.36.5.199] (vpn1-5-199.ams2.redhat.com [10.36.5.199]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p6INJn7C024698; Mon, 18 Jul 2011 19:19:50 -0400 Subject: Re: [trans-mem] Beginning of refactoring From: Torvald Riegel To: GCC Patches Cc: Richard Henderson In-Reply-To: <1310221819.5106.1054.camel@triegel.csb> References: <1306357828.13348.423.camel@triegel.csb> <1310221819.5106.1054.camel@triegel.csb> Content-Type: text/plain; charset="UTF-8" Date: Mon, 18 Jul 2011 23:38:00 -0000 Message-ID: <1311031188.19033.1045.camel@triegel.csb> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-07/txt/msg01460.txt.bz2 On Sat, 2011-07-09 at 16:30 +0200, Torvald Riegel wrote: > The attached patch makes flat nesting the default, while still > supporting closed nesting on demand (for user-controlled aborts via > __transaction_cancel). > Previously, a new transaction object was created for each nested > transaction. The patch changes this to using one transaction object > during the whole lifetime of a thread and keeping checkpoints of the > transaction state when starting closed nested transactions. This allows > us to easily use flat nesting and decreases the transaction start/commit > overheads to some extent. > > OK for branch? I split the patch, as requested. First three parts are smaller changes: patch1: New erase method and placement new for aatree. patch2: Change pr_hasElse to the value specified in the ABI. patch3: Add information to dispatch about closed nesting and uninstrumented code. Then, in preparation for the following flat-transaction object design: patch4: Use vector instead of list to store user actions. patch5: Add closed nesting as restart reason. And the actual core change: patch6: Make flat nesting the default, use closed nesting on demand. This last patch is still rather large, but it is one logical piece. beginend.cc has most changes, but splitting this one up would rather create incomplete intermediate steps than make the direction of this whole patch clear. As discussed offline, reducing the one extra copying of jmpbuf for actual closed-nested transactions can be addressed in a future patch by modifying _ITM_beginTransaction, which could additionally remove the extra copying from stack to jmpbuf for all transactions as it existed before this patch here. Ok for branch, or is further splitting required?