From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by sourceware.org (Postfix) with ESMTPS id 4C44F383F874 for ; Mon, 4 May 2020 18:03:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 4C44F383F874 Received: by mail-wm1-x343.google.com with SMTP id e26so487310wmk.5 for ; Mon, 04 May 2020 11:03:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=fqgTgrnL7donz+21mEDTLTTg23C6mUnxPl7kr/wymqw=; b=c5rRcZQxkuAFsG1e5VB50Bdb9Het/mUjfLUIPRZ8W2LUcMVMPapdif7/Kemga0GqMO aSkjupMk8gC5qcT+TqNRCggrrizZdjClgmH1Jp5p7SCQXz2ORF6C6ZkxQFK9BiGombC8 9JqZ7GMPc3Lgx11wcsqH80Riw4pvd2xVb4Cqxut3mVD+NfzNHSgI2BBAWb719VoOQYj6 nVYBHfO3CaK3/oc+TlEV6/B0nJJIZDl0GPZk9vcxAOt0ZkvlHzGQeGjGslRGJayLKyFx MnNQr3t5o/mbj+c70/wPrKIKtVyexmnApbtAzhUQt8/ZO6kqiV7OV2XcAjVK1OVEJ3Hx S9xw== X-Gm-Message-State: AGi0PuaXCwv/6qowc9loSGCyHAd36MrQ+gNCotOUdTg+jQSizqB3bxtL ce5jSD8ggXJRxfxQrTuIzIU4Bg== X-Google-Smtp-Source: APiQypJQaFsnKur+SUKGAN6czYHh1YKPhdNZvMfyfP1SH+4dUkW6WILQa7PnbdBKdsPyN2oC6ED9Iw== X-Received: by 2002:a1c:5f56:: with SMTP id t83mr15207560wmb.61.1588615432872; Mon, 04 May 2020 11:03:52 -0700 (PDT) Received: from google.com ([2a00:79e0:d:210:e8f7:125b:61e9:733d]) by smtp.gmail.com with ESMTPSA id x6sm438221wrv.57.2020.05.04.11.03.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 May 2020 11:03:52 -0700 (PDT) Date: Mon, 4 May 2020 20:03:52 +0200 From: Matthias Maennich To: Dodji Seketeli Cc: libabigail@sourceware.org, gprocida@google.com, kernel-team@android.com Subject: Re: [RESEND PATCH] reader context: do not reuse current corpus and corpus_group Message-ID: <20200504180352.GD80772@google.com> References: <20200430215256.19135-1-maennich@google.com> <87o8r392yt.fsf@seketeli.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87o8r392yt.fsf@seketeli.org> X-Spam-Status: No, score=-28.7 required=5.0 tests=BAYES_00, DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, USER_IN_DEF_DKIM_WL, USER_IN_DEF_SPF_WL 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: libabigail@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libabigail mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 May 2020 18:03:55 -0000 Hi Dodji, On Mon, May 04, 2020 at 04:42:02PM +0200, Dodji Seketeli wrote: >Hello Matthias, Giuliano, > >Matthias Maennich a écrit: > >> libabigail's readers (abg-reader and abg-dwarf-reader) currently spare >> some allocations by reusing the reader context's existing current corpus >> and current corpus group. When building a corpus_group's vector of >> corpora, reusing the shared_ptr referring to a corpus means we are >> modifying the corpus data of a previously read corpus. As a user of the >> read*corpus functions, that isn't entirely transparent and when storing >> corpare like in the vector above, we might introduce subtle bugs. > >[...] > >Giuliano Procida a écrit: > >> Does this change have any impact on incomplete (forward-declared) type >> differences? >> Does it significantly impact performance on large inputs? > >Right. That is my concern as well. The reason why we avoid >instantiating a new dwarf reader context all the time is for performance >reasons, especially when analysing a kernel with lots of kernel >modules. Example of kernels would be any of the known enterprise >kernels, I guess. > > >That being said, a lot of things have happened on the front of >performance for kernels with lots of modules, so maybe this particular >optimization is not useful anymore, I am not sure. > >In any case, we should measure this first before we know if this can get >in. > >I hope this makes sense. I agree. It makes sense to measure this in a more diverse context. The Android Kernels were running with this patch for a while, but they were not at all representative. Since this was a prerequisite patch for a now obsolete patch, I am also ok to just drop it. I will also drop it from mm-next then. Cheers, Matthias > >Cheers, > >-- > Dodji