From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) by sourceware.org (Postfix) with ESMTPS id 65AA33850430 for ; Thu, 2 Jun 2022 11:30:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 65AA33850430 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-f52.google.com with SMTP id p19so2435680wmg.2 for ; Thu, 02 Jun 2022 04:30:32 -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=kE2eByWbaO/dEm+diagoVVqKT0Y0pMMPagtI5COGM3g=; b=Xgz/gZZr1BXG2+63/grpgwwfMfGJz2Vwg2bLwj4T6yzNVIhZZ5+Zn+0B39UVCcL8mD 3Y9s4XcKMEUXJKpfexJ0FgGpmYMvktsdGOUHN6LZUqeKlKTrKVKjotb12b2+yq/CK7YV n+6mxnTs401ZsZinr77UmToPTWqKCQMvE+8Hqf2xP+DBMb/uJ+fCgxupES9mYcxoxkIo rj645Rfud8fNS/JhT7TqDUzsMl62DqCCfm7yuUkcjP0FVXnn4+hK/0/1F+pYifF4JmP3 /ov+V/lWP4SP+oC5WJobjlsnswhl4Wju7IMoLKSWE3LyxP23M9Gcic60BR+8j7Pexp3K Y/cg== X-Gm-Message-State: AOAM530Mb1rzK+xkUMTUvGuV0GVcN+RhjUTcjXulbzyWdJTJL1Cpaww7 y8LQ411rUT3AL9q7E357fJI= X-Google-Smtp-Source: ABdhPJyRlExyEbJSugbGD1h+yqR7hE763NGBzAcH6iEoJHnUZEJYj/cJSJXc667ItyeRU3Ba/bP68w== X-Received: by 2002:a05:600c:3b15:b0:397:6403:7091 with SMTP id m21-20020a05600c3b1500b0039764037091mr3584926wms.193.1654169431367; Thu, 02 Jun 2022 04:30:31 -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 12-20020a05600c020c00b003942a244f49sm8086066wmi.34.2022.06.02.04.30.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 02 Jun 2022 04:30:30 -0700 (PDT) Message-ID: <9c12eb66-db3b-1d76-cb89-fe9e9e8c3517@palves.net> Date: Thu, 2 Jun 2022 12:30:29 +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 v4] gdb: Do not add empty sections to the section map Content-Language: en-US To: Ilya Leoshkevich , Tom Tromey , Andrew Burgess Cc: Ulrich Weigand , Andreas Arnez , gdb-patches@sourceware.org References: <20220601170744.2884144-1-iii@linux.ibm.com> From: Pedro Alves In-Reply-To: <20220601170744.2884144-1-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 11:30:34 -0000 On 2022-06-01 18:07, Ilya Leoshkevich wrote: > From: Ulrich Weigand > > build_objfile_section_table () creates four synthetic sections per > objfile, which are collected by update_section_map () and passed to > std::sort (). When there are a lot of objfiles, for example, when > debugging JITs, the presence of these sections slows down the sorting > significantly. > > The output of update_section_map () is used by find_pc_section (), > which can never return any of these sections: their size is 0, so they > cannot be accepted by bsearch_cmp (). > > Filter them (and all the other empty sections) out in > insert_section_p (), which is used only by update_section_map (). > --- > > v3: https://sourceware.org/pipermail/gdb-patches/2022-June/189692.html > v3 -> v4: Use whether a section is empty or not as the filtering > criteria (Pedro). Thanks. This LGTM.