From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) by sourceware.org (Postfix) with ESMTPS id DFCB7396E053 for ; Thu, 2 Jun 2022 14:12:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DFCB7396E053 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-f46.google.com with SMTP id v4-20020a1cac04000000b00397001398c0so4842141wme.5 for ; Thu, 02 Jun 2022 07:12:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=x+Vu8noHF7iJFkHwLbVrS+JbhpNcQnaN/+nz1Fh/IIo=; b=1B3RisUGMAnlHKzREzMewOT6hsxud4+DeEVQY4XBVBgDVpmxF1qDpqXEcWITc7dGUh /cprDWWHllH+9JwRzaJfoqJrltspjme3z5u9+KVjsZ8yrffwkvaE/TS/Zm4kbS9YAxRk cOvaO1qUpzgLak/TMZaNC5vWnI95UdaK3cDJZi4wTyVfeKCOseoeihon3lXgNemUV1d9 Y/loSmD3zTq5QPd5vtlzZMdTzFGToHFwffc80upk3PykPy3mLx0Y0H28a0kkKdh4AMww siDSrjy5qlbxF28tjJ81hqbLeuhrYO7HFGPPsReNWd+Y60K7CzVhSZuoQN3a1NYwul99 ilqg== X-Gm-Message-State: AOAM530ju1S/tz6urLfHytnKUuedhiypeszYDo/7MQJ2sefVSLt+l0rb 0xZmbDsCApErSgAZEMvtR3PKgBPlbUs= X-Google-Smtp-Source: ABdhPJznPsDTSz1xo9r9YApgF8xW8eO42Ne5qaGqPo5LbdU9iShhRppo9V01FSgZPXbSMKJCkUBfZA== X-Received: by 2002:a05:600c:acb:b0:397:bdb:ffea with SMTP id c11-20020a05600c0acb00b003970bdbffeamr4251307wmr.56.1654179170782; Thu, 02 Jun 2022 07:12:50 -0700 (PDT) Received: from ?IPV6:2001:8a0:f924:2600:209d:85e2:409e:8726? ([2001:8a0:f924:2600:209d:85e2:409e:8726]) by smtp.gmail.com with ESMTPSA id p68-20020a1c2947000000b003976525c38bsm8728951wmp.3.2022.06.02.07.12.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 02 Jun 2022 07:12:50 -0700 (PDT) Message-ID: <94eef992-ff81-b994-b30f-daf26b6c5915@palves.net> Date: Thu, 2 Jun 2022 15:12:49 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH 2/5] gdbsupport: Introduce interval_tree Content-Language: en-US To: Ilya Leoshkevich , Tom Tromey , Andrew Burgess Cc: Andreas Arnez , gdb-patches@sourceware.org References: <20220602133546.2948282-1-iii@linux.ibm.com> <20220602133546.2948282-3-iii@linux.ibm.com> From: Pedro Alves In-Reply-To: <20220602133546.2948282-3-iii@linux.ibm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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: Thu, 02 Jun 2022 14:12:53 -0000 On 2022-06-02 14:35, Ilya Leoshkevich wrote: > > Adding N JITed sections has the complexity O((N**2)*log(N)), because > adding each section involves breakpoint handling, which needs to > resolve PCs and thus calls update_section_map(). When N is around 10k, > this renders GDB unusable. Does this adding of N JITed sections happen in batch? Like, is this from jit_inferior_init, where we loop over JIT objects? Or is it so that we get notified about JIT objects, one at a time? In places where we add symbols in batch, we defer breakpoint re_setting exactly to avoid problems like this, via SYMFILE_DEFER_BP_RESET or something similar. Looks like jit.c doesn't try to do that. Or is it not possible in the scenario in question? Like, doesn't the JIT API let you register more than one object file at once?