[prev in list] [next in list] [prev in thread] [next in thread]
List: oprofile-list
Subject: Re: [PATCH] OProfile testsuite, fix perf kill command
From: Maynard Johnson <maynardj () us ! ibm ! com>
Date: 2012-09-28 14:27:08
Message-ID: 5065B3BC.6050904 () us ! ibm ! com
[Download RAW message or body]
On 09/27/2012 04:08 PM, Carl E. Love wrote:
> OProfile testsuite, fix perf kill command
>
> The operf user tool expects to get a kill -SIGINT signal. However
> the SIGINT signal can not be sent from a script, it must come from
> the command line. Hence the pkill -P command was used to kill the
> parent and children processes. A bug was found in that the pkill
> command kills operf without letting it completely finish the data
> processing and exit cleanly. This issue actually was found when
> testing a patch that is currently under development to check for
> specific symbols. The kill -INT signal can be sent from the script
> and is properly caught by operf. When operf catches the INT signal
> it shuts down cleanly rather then exiting immediatly. This patch
> fixes the current kill command to make sure operf exits cleanly.
>
> Signed-off-by: Carl Love <cel@us.ibm.com>
> ---
> testsuite/oprofile-operf/oprofile-operf-run.exp | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/testsuite/oprofile-operf/oprofile-operf-run.exp \
> b/testsuite/oprofile-operf/oprofile-operf-run.exp index 2e54ec7..bbb68f0 100644
> --- a/testsuite/oprofile-operf/oprofile-operf-run.exp
> +++ b/testsuite/oprofile-operf/oprofile-operf-run.exp
> @@ -94,7 +94,7 @@ proc do_test {ctrs} {
> set filename "/tmp/operf_create_stop.zzzz"
> set fileId [open $filename "w"]
> puts $fileId "#!/bin/bash"
> - puts $fileId "echo -n \"pkill -9 -P \" > /tmp/operf_stop.zzzz "
> + puts $fileId "echo -n \"kill -s INT \" > /tmp/operf_stop.zzzz "
Yes, this works much nicer to cleanly stop operf. Patch committed. Thanks!
-Maynard
>
> # Get the process id to kill
> puts $fileId "cat /tmp/operf_out.zzzz | grep \"kill\" | cut -d\"\'\" -f2 | cut -d\" \
> \" -f3 >> /tmp/operf_stop.zzzz "
------------------------------------------------------------------------------
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
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