[prev in list] [next in list] [prev in thread] [next in thread] 

List:       oprofile-list
Subject:    Re: [PATCH 05/10] opcontrol: fix, stop only if enabled
From:       Maynard Johnson <maynardj () us ! ibm ! com>
Date:       2009-09-04 19:47:18
Message-ID: 4AA16EC6.3050807 () us ! ibm ! com
[Download RAW message or body]

Robert Richter wrote:
> Now, the functions do_stop() is only called, if the daemon is
> enabled. This prevents the irritating message 'Stopping profiling.' if
> the profiler is not running.
While this patch is also a small change in user interaction (like patch #4), it's \
result is to get rid of the bogus message "Stopping profiling" when in fact we're \
doing nothing.  Better to display no message at all when the stop command has no \
effects.

Patch committed.

Thanks.
-Maynard
> 
> Signed-off-by: Robert Richter <robert.richter@amd.com>
> ---
> ChangeLog       |    4 ++++
> utils/opcontrol |    3 ++-
> 2 files changed, 6 insertions(+), 1 deletions(-)
> 
> diff --git a/ChangeLog b/ChangeLog
> index e0adc98..5c32677 100644
> --- a/ChangeLog
> +++ b/ChangeLog
> @@ -1,5 +1,9 @@
> 2009-08-11  Robert Richter <robert.richter@amd.com>
> 
> +	* utils/opcontrol: fix, stop only if enabled
> +
> +2009-08-11  Robert Richter <robert.richter@amd.com>
> +
> 	* utils/opcontrol: fix deinit, kill daemon only if running
> 
> 2009-08-11  Robert Richter <robert.richter@amd.com>
> diff --git a/utils/opcontrol b/utils/opcontrol
> index 5a4e948..6d1bfc0 100644
> --- a/utils/opcontrol
> +++ b/utils/opcontrol
> @@ -943,7 +943,8 @@ do_stop()
> 		return
> 	fi
> 
> -	if test $KERNEL_SUPPORT = "yes"; then
> +	if test $KERNEL_SUPPORT = "yes" \
> +	    && test 0 != $(cat /dev/oprofile/enable); then
> 		echo "Stopping profiling."
> 		echo 0 >/dev/oprofile/enable
> 	fi


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
oprofile-list mailing list
oprofile-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oprofile-list


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic