[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87a9arolpk.fsf@sejong.aot.lge.com>
Date: Fri, 09 May 2014 09:11:03 +0900
From: Namhyung Kim <namhyung@...nel.org>
To: Jiri Olsa <jolsa@...hat.com>
Cc: Arnaldo Carvalho de Melo <acme@...nel.org>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Ingo Molnar <mingo@...nel.org>,
Paul Mackerras <paulus@...ba.org>,
Namhyung Kim <namhyung.kim@....com>,
LKML <linux-kernel@...r.kernel.org>,
Stephane Eranian <eranian@...gle.com>,
David Ahern <dsahern@...il.com>
Subject: Re: [PATCH v5 1/2] perf record: Propagate exit status of a command line workload
Hi Jiri,
On Thu, 8 May 2014 12:32:25 +0200, Jiri Olsa wrote:
> On Thu, May 08, 2014 at 04:59:53PM +0900, Namhyung Kim wrote:
>
> SNIP
>
>> +
>> + if (!err && !file->is_pipe) {
>> + rec->session->header.data_size += rec->bytes_written;
>> +
>> + if (!rec->no_buildid)
>> + process_buildids(rec);
>> + perf_session__write_header(rec->session, rec->evlist,
>> + file->fd, true);
>> + }
>> +
>> + if (signr != -1) {
>> + signal(signr, SIG_DFL);
>> + raise(signr);
>> + }
>
> hum.. so we dont call perf_session__delete in case we propagate
> the signal.. also the outer function's cleanups are not called:
>
> perf_evlist__delete(rec->evlist);
> symbol__exit();
>
> the only cleanup I found that actually matters here and won't be
> called is 'vdso__exit' which removes the temp vdso library file.
Ah.. missed that.
>
> Maybe we could have one on_exit callback raising the signal
> if needed.. at the time we are sure we called all out cleanup
> functions.
Sounds like a good idea. I'll send v6.
Thanks,
Namhyung
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists