Received: by 10.223.185.116 with SMTP id b49csp5430531wrg; Tue, 27 Feb 2018 13:13:54 -0800 (PST) X-Google-Smtp-Source: AH8x226d7vmkqt27b6BtMuIbfDpYPVCE9BkjUebRV3BUsX9iv+2Hk6B45kc9X7Ok4bxBDeIKg/Ys X-Received: by 10.101.97.79 with SMTP id o15mr12135208pgv.31.1519766034115; Tue, 27 Feb 2018 13:13:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519766034; cv=none; d=google.com; s=arc-20160816; b=EPH7bmVvtnILvXz4B2j6Nc29yIDoz9eNJOJ4gr+hLCzU2BIlRND7+MdAJDctOI+VS0 LNB2veDEGCAT9vYAF/12N9n9hR+e+aDWxloauHcHcp5PE8vdcf8Sqo4USU4R7IfAhMtd OHDMGXjrzC4GK+U7f/d7sJoACtZoBIaSfi03NLwYJCnxiOf063Aoc9X1f+7V6Ypy1L/b tztKeI8c5DLkpl0ebt9dd3xt+8CsfA8s2wTRpDptbh5LK9dUKQy0keGUAqnelWztHOh9 v6leg95lrO8AFjEkzvH+nqRbPyc8NrW5LA4dlmPbwKOHcl3I4cBya3SwMJBqSWfKmB7H GLqg== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dmarc-filter:arc-authentication-results; bh=HXkA36sNE9GooWKELtNEZVyGFhDzn5Mv2iEJ/oJy99Q=; b=am1IXEXRRSiIZeeyNY7Xrpa+rLq8GA60+TMd/O5DrcbUVZrOd8wI85naFziQll+QO9 9J4rdK1estvElu0QvwuzwUKy5TFl4oXo+69laqGzlf6bo4ksoR4n+W+XBiHUJ9FmVbMH s4K51Xk8mCUgi2JY2leed0hwoxZcEsU/ktbvlMA2jt+dflFmQugzGcmA3E9OVJ74Tl6D Tl7cZTlaTx26GmUvYsxt070SmQzyMZvEX8++ftku9uv1UFowAkmv0NzWforl+cq/q5i3 hR35PdwWjQh5VNDgWcfQ1wFBghoSnZ8lKz9eEgvXWN06kfUo+QeCGzQ/BR/kjNBmFj0P BPdA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f31-v6si50695plb.636.2018.02.27.13.13.39; Tue, 27 Feb 2018 13:13:54 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751956AbeB0VM5 (ORCPT + 99 others); Tue, 27 Feb 2018 16:12:57 -0500 Received: from mail.kernel.org ([198.145.29.99]:39626 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751550AbeB0VMz (ORCPT ); Tue, 27 Feb 2018 16:12:55 -0500 Received: from vmware.local.home (unknown [208.91.3.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B890021771; Tue, 27 Feb 2018 21:12:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B890021771 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=goodmis.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=rostedt@goodmis.org Date: Tue, 27 Feb 2018 16:12:52 -0500 From: Steven Rostedt To: Alan Kao Cc: Palmer Dabbelt , Albert Ou , , , , Subject: Re: ftrace: Proposal for an Alternative RecordMcount framework Message-ID: <20180227161252.25162d81@vmware.local.home> In-Reply-To: <20180227100425.GB20904@andestech.com> References: <20180227100425.GB20904@andestech.com> X-Mailer: Claws Mail 3.15.1 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 27 Feb 2018 18:04:26 +0800 Alan Kao wrote: > 1. During the final linking stages, do "objdump vmlinux.o | grep ..." [2] Note, doing it at that stage takes the longest time. It makes small changes much longer to compile. That said... > 2. Form the output as an ELF objecj > 3. Link the object to __mcount_loc_start symbol > 4. Done > > With the similar reason as the patch [3], we should mark _mcount to be > a weak symbol to prevent it from being relaxed later. > > We would like to know your opinion and comments on this. > Thanks! What about just having your arch use recordmcount.c instead? It doesn't do any grepping. It is an elf reader and modifier and modifies the .o file directly. Note, I will be rewriting that code in the near future too, to consolidate it with objtool. -- Steve