Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp1080095ybm; Wed, 22 May 2019 17:06:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqyplgdJqQQ0fYJsPtLmzakY3k4XXQd7nrd68+1o+dr+1E0JA89BfMtDFYmzfKYxZEK0P0M+ X-Received: by 2002:aa7:9aa5:: with SMTP id x5mr8133235pfi.135.1558570004312; Wed, 22 May 2019 17:06:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558570004; cv=none; d=google.com; s=arc-20160816; b=t+ULeiIJaMqZFw2DWj7s62Heio/5IsUy6RjZSWve0/lNgDGPt0mQkQT64Ny/SlmtXu MJ3CXtR9w8owsSicvyecUUs7qiwA+mT3wqT93KLVmbDT0Psa7QBy+VOY2YoyoVKH32Op X66zUH+wt3Yf8CjsB5fJH4lDl0Bh6f8GplkMPkCPuiAEU3qMzLsJ8nAhGyZHOGT7T35C cQRtFhwLfrah7JffJJ5vzUcqWpeNxguDX6LV9F3ZnVyfj5/ZA8jb4f449r6RvHBjp/m2 Muj8zb45PUPdDFWqiC4Q8sfIVuCi+haDIteu+Tl86IWKn96qEv0gKx8N42JhkHRPVXfD 50OA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=mGbJp01zji+LrcqTiw8afTadm3Otn5Vg6S8fnE39XtI=; b=ClYa19+CShNJJI/8BMlnwzV/6rocvxEplEVIX+cyjWgYFK+06WLJGHOl9FYARS447z DzTPP1QxhY/6QTSuiyXWEk9ow3/EEGNmnRanJxZ02GsBQbq8EfmD7gyKP1bmZg+3iNjU SMRPcxN1lKmqpiV17mlykl0+B1nRQl8L0jzxXAKxiJldZ/QP6zmu9wPhmoVN/XSfxFAr H+M64mnLJloIEkAa81ytzvfsYG2nMHhB8xtGFLLNRAfNaNouUTLmO2bjAt+A4s4yvfX6 nuVj7AUi8yY+PM4yJhSHqa3GlmsKXFtAnYIYnVuAC91MOLiGBS78ipZGPyuGjI01vsac HN8Q== 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=QUARANTINE sp=NONE dis=NONE) header.from=vmware.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 64si26303385ple.157.2019.05.22.17.06.28; Wed, 22 May 2019 17:06:44 -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=QUARANTINE sp=NONE dis=NONE) header.from=vmware.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727809AbfEWADy (ORCPT + 99 others); Wed, 22 May 2019 20:03:54 -0400 Received: from ex13-edg-ou-001.vmware.com ([208.91.0.189]:13601 "EHLO EX13-EDG-OU-001.vmware.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726890AbfEWADx (ORCPT ); Wed, 22 May 2019 20:03:53 -0400 Received: from sc9-mailhost2.vmware.com (10.113.161.72) by EX13-EDG-OU-001.vmware.com (10.113.208.155) with Microsoft SMTP Server id 15.0.1156.6; Wed, 22 May 2019 17:03:38 -0700 Received: from rlwimi.localdomain (unknown [10.129.221.32]) by sc9-mailhost2.vmware.com (Postfix) with ESMTP id F1DAEB2031; Wed, 22 May 2019 20:03:51 -0400 (EDT) From: Matt Helsley To: LKML CC: Ingo Molnar , Josh Poimboeuf , Peter Zijlstra , Steven Rostedt , Matt Helsley Subject: [RFC][PATCH 00/13] Cleanup recordmcount and begin objtool conversion Date: Wed, 22 May 2019 17:03:23 -0700 Message-ID: X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII Received-SPF: None (EX13-EDG-OU-001.vmware.com: mhelsley@vmware.com does not designate permitted sender hosts) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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