linux-mips
[Top] [All Lists]

[PATCH v7 06/17] tracing: add an endian argument to scripts/recordmcount

To: linux-mips@linux-mips.org, linux-kernel@vger.kernel.org
Subject: [PATCH v7 06/17] tracing: add an endian argument to scripts/recordmcount.pl
From: Wu Zhangjin <wuzhangjin@gmail.com>
Date: Mon, 9 Nov 2009 23:31:23 +0800
Cc: zhangfx@lemote.com, zhouqg@gmail.com, Wu Zhangjin <wuzhangjin@gmail.com>, Ralf Baechle <ralf@linux-mips.org>, rostedt@goodmis.org, Frederic Weisbecker <fweisbec@gmail.com>, Ingo Molnar <mingo@elte.hu>, Nicholas Mc Guire <der.herr@hofr.at>, David Daney <ddaney@caviumnetworks.com>, Richard Sandiford <rdsandiford@googlemail.com>, Patrik Kluba <kpajko79@gmail.com>, Thomas Gleixner <tglx@linutronix.de>, Michal Simek <monstr@monstr.eu>, Wu Zhangjin <wuzj@lemote.com>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer:in-reply-to:references:in-reply-to:references; bh=tzlU6xls6mZ3XK6hOx+9AWMqssFJ/4foarBa5WiQDHs=; b=kOIexgVqsxF6oTxE2OQigLR8XBf8/2OyX9VR1gHy0uzO3X2E3wdbN4XG/VI9QWEzuO htyiq/PvxnNTNfMhLhGvGKhCgtJIP8XaKCVG2j1x1f6DA+ylw0xaTZu/zYLSAWvZF4Z1 eCH7Bp+UqeWsF8/W/KVxONR2eZ2cUCb5SWpaY=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=bGli0LZd+SQsmQji9unjue0YwqPVEbgygtc8A7kLvVOhfjNnLnNwpZXVQ8Ndh227Ke 5fO+u+XiSg5hf2itWtXOJmC7GHeif2YQDkFis8AG3lU49SnxcsovfUE2UTF9jozyzQp0 nBEC36sRmHxm1WJ222Jhme0+vhNHZTYCopVZY=
In-reply-to: <6199d7b3956b544fc65896af1062787a2e1283ce.1257779502.git.wuzhangjin@gmail.com>
In-reply-to: <cover.1257779502.git.wuzhangjin@gmail.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <9dc81a7a9e5a292cccdf465c533a2b08d19d6021.1257779502.git.wuzhangjin@gmail.com> <b99c08397d9ff92ac5a72bda9131df41b702fc71.1257779502.git.wuzhangjin@gmail.com> <8f579e2cece16cd22358a4ec143ef6a8c462639b.1257779502.git.wuzhangjin@gmail.com> <cefe074f5eb3cfbc2e0bb41b0c1f61fcd0190d90.1257779502.git.wuzhangjin@gmail.com> <6199d7b3956b544fc65896af1062787a2e1283ce.1257779502.git.wuzhangjin@gmail.com>
References: <cover.1257779502.git.wuzhangjin@gmail.com>
Sender: linux-mips-bounce@linux-mips.org
From: Wu Zhangjin <wuzhangjin@gmail.com>

MIPS and some other architectures need this argument to handle
big/little endian respectively.

Signed-off-by: Wu Zhangjin <wuzj@lemote.com>
---
 scripts/Makefile.build  |    1 +
 scripts/recordmcount.pl |    6 +++---
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 341b589..0b94d2f 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -207,6 +207,7 @@ endif
 
 ifdef CONFIG_FTRACE_MCOUNT_RECORD
 cmd_record_mcount = set -e ; perl $(srctree)/scripts/recordmcount.pl "$(ARCH)" 
\
+       "$(if $(CONFIG_CPU_BIG_ENDIAN),big,little)" \
        "$(if $(CONFIG_64BIT),64,32)" \
        "$(OBJDUMP)" "$(OBJCOPY)" "$(CC)" "$(LD)" "$(NM)" "$(RM)" "$(MV)" \
        "$(if $(part-of-module),1,0)" "$(@)";
diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl
index a4e2435..62a0001 100755
--- a/scripts/recordmcount.pl
+++ b/scripts/recordmcount.pl
@@ -113,13 +113,13 @@ $P =~ s@.*/@@g;
 
 my $V = '0.1';
 
-if ($#ARGV != 10) {
-       print "usage: $P arch bits objdump objcopy cc ld nm rm mv is_module 
inputfile\n";
+if ($#ARGV != 11) {
+       print "usage: $P arch endian bits objdump objcopy cc ld nm rm mv 
is_module inputfile\n";
        print "version: $V\n";
        exit(1);
 }
 
-my ($arch, $bits, $objdump, $objcopy, $cc,
+my ($arch, $endian, $bits, $objdump, $objcopy, $cc,
     $ld, $nm, $rm, $mv, $is_module, $inputfile) = @ARGV;
 
 # This file refers to mcount and shouldn't be ftraced, so lets' ignore it
-- 
1.6.2.1


<Prev in Thread] Current Thread [Next in Thread>