From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 88CC3385B835 for ; Fri, 17 Apr 2020 14:06:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 88CC3385B835 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark@simark.ca Received: from [10.0.0.11] (unknown [192.222.164.54]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 109A51E827; Fri, 17 Apr 2020 10:06:39 -0400 (EDT) Subject: Re: [PATCH 28/28] Decouple inferior_ptid/inferior_thread(); dup ptids in thread list (PR/25412) To: Pedro Alves , gdb-patches@sourceware.org References: <20200414175434.8047-1-palves@redhat.com> <20200414175434.8047-29-palves@redhat.com> <4f6c2c52-2fbb-809f-693c-8ae87d2b8549@simark.ca> From: Simon Marchi Message-ID: <91101152-59ee-4f6c-07d7-20bec5c76b7a@simark.ca> Date: Fri, 17 Apr 2020 10:06:39 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: fr Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-11.0 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Apr 2020 14:06:43 -0000 On 2020-04-17 6:29 a.m., Pedro Alves wrote: > On 4/16/20 9:38 PM, Simon Marchi wrote: >> On 2020-04-16 4:12 p.m., Pedro Alves via Gdb-patches wrote: > >>> How are you making sure that iterating the threads walks them in >>> creation/insertion order instead of ptid_t order? >> >> The only spot that I found the order mattered was precisely for "info threads". >> There, I gather the list of threads to display, sort them by per_inf_num, and >> print them. >> >> https://github.com/simark/binutils-gdb/commit/25c67729996dc83912d34a5901016404b3638bc1#diff-5479a5443dca2232f8552dfb5b30ac3dR1104 >> > > Hmm, OK. I'm not 100% sure that's a good idea; it makes me a bit nervous > because I'm not sure if this has an impact on run control. Something to > think about. We could instead have the new ptid_t map for ptid_t look ups, but > still also maintain the linked list in order to walk the thread list. (That > would also be a much simpler patch, I think.) I also thought about that as a backup solution. However, the testsuite didn't show any more regressions, so I stayed with just the map. Simon