lkml.org 
[lkml]   [2012]   [Oct]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Perf] Adding timeout option
On 10/13/2012 08:54 AM, abhishek agarwal wrote:
> Hi folks..
>
> I was thinking that why cant we have a timeout option in perf stat
> command. The timeout feature will help us to profile a process for a
> stipulated time (preferably in millisecs) and make perf stat return
> after that time.
> Eg:
>
> perf stat --timeout=10 sleep 100
>
> This will make perf return and report stats after 10 ms...
>
> Hope anyone can shed some more light on the idea

It seems preferable to use the timeout program to do this.
Either sending a handled signal to the perf process like:

timeout -s HUP 10 perf stat sleep 100

Or even better, just use that to kill the monitored process itself

perf stat timeout 10 sleep 100

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

\
 
 \ /
  Last update: 2012-10-20 19:41    [W:0.048 / U:1.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site