mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Li Hong <lihong.hi@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 4/8] tracing: recordmcount.pl Objcopy check should disable local reference correctly
Date: Wed, 28 Oct 2009 16:59:20 -0400	[thread overview]
Message-ID: <1256763560.26028.1825.camel@gandalf.stny.rr.com> (raw)
In-Reply-To: <20091028050421.GD30758@uhli>

On Wed, 2009-10-28 at 13:04 +0800, Li Hong wrote:
> >From ceb80d8ba4fc55916c5f88d8c0a7655b869702cf Mon Sep 17 00:00:00 2001
> From: Li Hong <lihong.hi@gmail.com>
> Date: Tue, 27 Oct 2009 12:41:22 +0800
> Subject: [PATCH] tracing: recordmcount.pl Objcopy check should disable local reference correctly
> 
> Use a function to do objcopy version check. Disable the local reference if
> copy can't support it. Remove some unused variables.

Note, a lot of your patches have whitespace issues (white space at the
end of the line, etc). I've cleaned them up, but you want to be more
careful next time.

> 
> Signed-off-by: Li Hong <lihong.hi@gmail.com>
> ---
>  scripts/recordmcount.pl |   55 ++++++++++++++++++++++------------------------
>  1 files changed, 26 insertions(+), 29 deletions(-)
> 
> diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl
> index 8ff9eab..1de9826 100755
> --- a/scripts/recordmcount.pl
> +++ b/scripts/recordmcount.pl
> @@ -158,6 +158,30 @@ my $function_regex;	# Find the name of a function
>  my $mcount_regex;	# Find the call site to mcount (return offset)
>  my $alignment;		# The .align value to use for $mcount_section
>  my $section_type;	# Section header plus possible alignment command
> +my $can_use_local = 0; 	# If we can use local function references
> +
> +##
> +# check_objcopy - whether objcopy supports --globalize-symbols
> +#
> +#  --globalize-symbols came out in 2.17, we must test the version
> +#  of objcopy, and if it is less than 2.17, then we can not
> +#  record local functions.
> +sub check_objcopy
> +{
> +    open (IN, "$objcopy --version |") or die "error running $objcopy";
> +    while (<IN>) {
> +        if (/objcopy.*\s(\d+)\.(\d+)/) {
> +            $can_use_local = 1 if ($1 > 2 || ($1 == 2 && $2 >= 17)); 
> +            last;
> +        }
> +    }
> +    close (IN);
> +
> +    if (!$can_use_local) {
> +        print STDERR "WARNING: could not find objcopy version or version is less than 2.17.\n" .
> +	"\tLocal function references is disabled.\n"  

Missing a ';' above. I've fixed this too, and broke the first line up
too, to be less than 80 characters.

Thanks,

-- Steve



> +    }
> +}
>  
>  if ($arch eq "x86") {
>      if ($bits == 64) {



  reply	other threads:[~2009-10-28 20:59 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-28  4:57 [PATCH v3 0/8] tracing: recordmcount.pl Bug fixes and code improvement Li Hong
2009-10-28  5:01 ` [PATCH v3 1/8] tracing: recordmcount.pl Amend the documentation according to the implementation Li Hong
2009-10-30 16:18   ` [tip:tracing/core] tracing: Amend documentation in recordmcount.pl to reflect implementation tip-bot for Li Hong
2009-10-28  5:02 ` [PATCH v3 2/8] tracing: recordmcount.pl Correct the check on the number of parameters Li Hong
2009-10-28  5:03 ` [PATCH v3 3/8] tracing: recordmcount.pl Support absolute path check on $inputfile Li Hong
2009-10-30 16:19   ` [tip:tracing/core] tracing: Check absolute path of input file in recordmcount.pl tip-bot for Li Hong
2009-10-28  5:04 ` [PATCH v3 4/8] tracing: recordmcount.pl Objcopy check should disable local reference correctly Li Hong
2009-10-28 20:59   ` Steven Rostedt [this message]
2009-10-30 16:19   ` [tip:tracing/core] tracing: Fix objcopy revision check in recordmcount.pl tip-bot for Li Hong
2009-10-28  5:05 ` [PATCH v3 5/8] tracing: recordmcount.pl Clarify the logic on mcount section check Li Hong
2009-10-30 16:19   ` [tip:tracing/core] tracing: Move mcount section search to front of loop in recordmcount.pl tip-bot for Li Hong
2009-10-28  5:06 ` [PATCH v3 6/8] tracing: recordmcount.pl Use more friendly variables to clean up the code Li Hong
2009-10-30 16:20   ` [tip:tracing/core] tracing: Add regex for weak functions in recordmcount.pl tip-bot for Li Hong
2009-10-28  5:07 ` [PATCH v3 7/8] tracing: recordmcount.pl Combine the condition validation in update_funcs Li Hong
2009-10-30 16:20   ` [tip:tracing/core] tracing: Move conditional into update_funcs() in recordmcount.pl tip-bot for Li Hong
2009-10-28  5:07 ` [PATCH v3 8/8] tracing: recordmcount.pl Die if we use a weak function as reference Li Hong
2009-10-30 16:20   ` [tip:tracing/core] tracing: Exit with error if a weak function is used in recordmcount.pl tip-bot for Li Hong
2009-10-28 15:49 ` [PATCH v3 0/8] tracing: recordmcount.pl Bug fixes and code improvement Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1256763560.26028.1825.camel@gandalf.stny.rr.com \
    --to=rostedt@goodmis.org \
    --cc=lihong.hi@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®