From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by sourceware.org (Postfix) with ESMTP id BF6AF385B835 for ; Fri, 17 Apr 2020 10:29:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org BF6AF385B835 Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-447-SZL-_JFvOeGr7xWF6HtA5Q-1; Fri, 17 Apr 2020 06:29:22 -0400 X-MC-Unique: SZL-_JFvOeGr7xWF6HtA5Q-1 Received: by mail-wm1-f72.google.com with SMTP id h184so773836wmf.5 for ; Fri, 17 Apr 2020 03:29:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=WM8mf6LrerQZtTMGMj6GAuC0IOvvlk16F4O8vLFtvZY=; b=JR0KIeFRTREZZRdMYg5QxDjxS1tBCMciHbjCwM+kTAx/84SewAg5JvbACR9cCGGXBb GgEg/yYdUjEm6Ng3gmrp0UYNU/yYmakDOcs7vyASlhJrofe5LTD9uXJ9lr87D9hBYan2 DBA6lBZQqY9m/odaY1ZVLq8TEjqkGC0F7C6yKX1A4NhMI0iRbPScNYyTTA/u8GVXCWpu RsG8mL3Xqvq8tvAbWU5iaG2uMyxElqf7Vg3gwnd5VoKpXc/NaUhLmnwqxvpO760bW5Ho hRtvYE5eQENlWhu4X6qa4vDFfnZYykQSh/vUhaQ+NTyxLFikDPWAjMiYI1U5jJOyX+Zv a0bA== X-Gm-Message-State: AGi0PuYzhDiAQXOQm+NgX1Yr+jqQ/l/FI9WOAGsFaaP3Y3ZBxw+bAG/n dHgsPNx575ZmLhz3de0aNNRL1Td9+8DT/yp0l9KgeH+biVJgzRhHmzNuCB2NgVHBfHOaX9YS3LK fp5WIfJ3fUQyZOGmi3xA/lQ== X-Received: by 2002:a1c:4b0a:: with SMTP id y10mr2614490wma.24.1587119361299; Fri, 17 Apr 2020 03:29:21 -0700 (PDT) X-Google-Smtp-Source: APiQypLAfYfV1ts75EAfARauWLaBuyzp79roV4RDWxBNFlfOO9ayjGPDE5HqEyjsnWegspe6FRKiWA== X-Received: by 2002:a1c:4b0a:: with SMTP id y10mr2614478wma.24.1587119361015; Fri, 17 Apr 2020 03:29:21 -0700 (PDT) Received: from ?IPv6:2001:8a0:f909:7b00:56ee:75ff:fe8d:232b? ([2001:8a0:f909:7b00:56ee:75ff:fe8d:232b]) by smtp.gmail.com with ESMTPSA id v10sm19417482wrq.45.2020.04.17.03.29.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 17 Apr 2020 03:29:20 -0700 (PDT) Subject: Re: [PATCH 28/28] Decouple inferior_ptid/inferior_thread(); dup ptids in thread list (PR/25412) To: Simon Marchi , 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: Pedro Alves Message-ID: Date: Fri, 17 Apr 2020 11:29:19 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <4f6c2c52-2fbb-809f-693c-8ae87d2b8549@simark.ca> Content-Language: en-US X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-10.3 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, 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 10:29:40 -0000 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.) Thanks, Pedro Alves