Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5113276ybi; Tue, 28 May 2019 07:46:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqydKL3L21hzkWxF1tcs3hnE+o0qH//W/FsrAovHRFJj9e6+Z87umiIILsEVUcj4et88u9k3 X-Received: by 2002:a17:90a:3442:: with SMTP id o60mr6526955pjb.5.1559054761426; Tue, 28 May 2019 07:46:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559054761; cv=none; d=google.com; s=arc-20160816; b=W+PC7/kCtHWZIoTk1H83FmUdPx/f4D5rxvU0qIdzxv0tHwEY2PjF6g4L3RFbAwV9yo h7cdsNze/j6kIP14UJUUKgIpSOodafNC3zb0TGUqIci5xO2K7FFvmN7u/YJxI8XKGsg0 Xv/PpSquPgMnz2M9lX/Op5Amx2a47Z3MraMk1KnZD6TvLgZk2+Sxi4AsdRHqEkX+Wjym NsAQ+oZMKPdRjPdrRPw1gMv6EFsa9gXL10rfxmpu+pkGAqZSw1WcLF4iH33INrsOnB/x K/Qv7EHs/YYhDEW9hrTnp+OfBPHEpOj7j6v8FraIXuHntBW0BLJ3Jb32rJO/fRNR4sh2 E5sA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=CPUhKReHwDSMxqlGbZweuX9Cs0fwPdhix4+YoFfm18g=; b=whRUUZCpbmML7tVip1nl6Fv+J0x2IpgxzGRXShgbZejTEPmjvV5KLUkcHAgcxF+iK/ Z+wevc1aSVaIZCEFiNDHn8MLvlGAOG9NBnmajUEPGJLd37EwPhrLVSCgUCppmDKqbXYS +wfaaJv/IwAdNzq56tWHrmelfw6GyGwTJ3NkMtGr/UQPetQWa229KFDU69NoLhZALiTq pxvlSEFY4MS5yQ4/qN7eemrsdkiTRn5Qk9SgFDEHnOB/xVjw9czGfgRv7PGfZ1v6E+fd 4aCQdzvqVdt4IRZNl54L8PA/fPW+/sXfFIrpEq0Wl3NzFD6mpsAROr41bA/8/QLVwXG0 erqw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c6si25659355pfc.235.2019.05.28.07.45.45; Tue, 28 May 2019 07:46:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726688AbfE1Oni (ORCPT + 99 others); Tue, 28 May 2019 10:43:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57674 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726504AbfE1Onh (ORCPT ); Tue, 28 May 2019 10:43:37 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6432130833AF; Tue, 28 May 2019 14:43:37 +0000 (UTC) Received: from treble (ovpn-122-72.rdu2.redhat.com [10.10.122.72]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 488B37C550; Tue, 28 May 2019 14:43:34 +0000 (UTC) Date: Tue, 28 May 2019 09:43:28 -0500 From: Josh Poimboeuf To: Matt Helsley Cc: LKML , Ingo Molnar , Peter Zijlstra , Steven Rostedt Subject: Re: [RFC][PATCH 00/13] Cleanup recordmcount and begin objtool conversion Message-ID: <20190528144328.6wygc2ofk5oaggaf@treble> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Tue, 28 May 2019 14:43:37 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 22, 2019 at 05:03:23PM -0700, Matt Helsley wrote: > This series cleans up recordmcount and then makes it into > an objtool subcommand. > > The series starts with 8 cleanup patches which make recordmcount > easier to review and integrate with objtool. The final 5 patches > show the beginning steps of converting recordmcount to use objtool's > ELF code rather than its own open-coded methods of accessing ELF > files. Hi Matt, Thanks for the patches. This looks like a good step in the right direction. What's the performance difference between the old recordmcount and the new version which relies on elf_open()? It would be useful to compare kernel build times, before and after. Would it be feasible to eventually combine subcommands so that objtool could do both ORC and mcount generation in a single invocation? I wonder what what the interface would look like. > Matt Helsley (13): > recordmcount: Remove redundant strcmp > recordmcount: Remove uread() > recordmcount: Remove unused fd from uwrite() and ulseek() > recordmcount: Rewrite error/success handling > recordmcount: Kernel style function signature formatting > recordmcount: Kernel style formatting > recordmcount: Remove redundant cleanup() calls > recordmcount: Clarify what cleanup() does > objtool: Prepare to merge recordmcount > objtool: Make recordmcount into an objtool subcmd > objtool: recordmcount: Start using objtool's elf wrapper > objtool: recordmcount: Search for __mcount_loc before walking the > sections > objtool: recordmcount: Convert do_func() relhdrs > > scripts/.gitignore | 1 - > scripts/Makefile | 1 - > scripts/Makefile.build | 22 +- > tools/objtool/.gitignore | 1 + > tools/objtool/Build | 1 + > tools/objtool/Makefile | 7 +- > tools/objtool/builtin-mcount.c | 72 +++++ > tools/objtool/builtin-mcount.h | 23 ++ > tools/objtool/builtin.h | 6 + > tools/objtool/objtool.c | 6 + > {scripts => tools/objtool}/recordmcount.c | 350 ++++++++++----------- > {scripts => tools/objtool}/recordmcount.h | 197 +++++++----- > {scripts => tools/objtool}/recordmcount.pl | 0 > 13 files changed, 420 insertions(+), 267 deletions(-) > create mode 100644 tools/objtool/builtin-mcount.c > create mode 100644 tools/objtool/builtin-mcount.h > rename {scripts => tools/objtool}/recordmcount.c (78%) > rename {scripts => tools/objtool}/recordmcount.h (78%) > rename {scripts => tools/objtool}/recordmcount.pl (100%) > > -- > 2.20.1 > -- Josh