lkml.org 
[lkml]   [2013]   [Dec]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] perf stat: Do not show stats if workload fails
On 12/24/13, 8:30 AM, Arnaldo Carvalho de Melo wrote:
> Em Tue, Dec 24, 2013 at 09:53:42AM -0300, Arnaldo Carvalho de Melo escreveu:
>> >The thing to check is perf_evlist__{prepare,start}_workload notification
>> >errors using SIGUSR1, that we need to check for in the caller, and emit
>> >the message, no?
> Something like this:
>
> 1. We tell perf_evlist__prepare_workload that we want a signal if execvp
> fails, it will be a SIGUSR1
>
> 2. We catch that signal in 'stat' and check that we got a signal, only
> problem so far with this signal maze is that we're getting a SIGCHLD
> while I was expecting a SIGUSR1... I.e. the "if (signr != -1) test
> really should be if (signr == SIGUSR1), but I'm getting a SIGCHLD there
> and the elves are tugging me away...

Did the elves release you?

There are all kinds of failure paths with the workload functions. In the
end I was focusing on perf-stat actually checking the rc on the
start_workload function. If it fails, then write() failed and something
happened to the workload process. In that case don't show the counters.

Handling the other error paths with appropriate messages will take
additional effort - as you are finding. ;-)

David


\
 
 \ /
  Last update: 2013-12-26 15:41    [W:0.058 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site