[PATCH] tracing: recordmcount.pl Remove the redundant code

From: Li Hong
Date: Tue Oct 27 2009 - 01:28:53 EST


If an object file has some local symbols and objcopy doesn't support local
reference, we have exited before the real work starts. So remove the redundant
check in update_funcs.

Signed-off-by: Li Hong <lihong.hi@xxxxxxxxx>

diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl
index 867c24a..ff3a9eb 100755
--- a/scripts/recordmcount.pl
+++ b/scripts/recordmcount.pl
@@ -353,14 +353,7 @@ sub update_funcs
return unless ($ref_func and @offsets);

# is this function static? If so, note this fact.
- if (defined $locals{$ref_func}) {
-
- # only use locals if objcopy supports globalize-symbols
- if (!$can_use_local) {
- return;
- }
- $convert{$ref_func} = 1;
- }
+ $convert{$ref_func} = 1 if $locals{$ref_func};

# Loop through all the mcount caller offsets and print a reference
# to the caller based from the ref_func.
--
1.6.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/