public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Jiri Olsa <jolsa@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Ingo Molnar <mingo@kernel.org>, Paul Mackerras <paulus@samba.org>,
	Namhyung Kim <namhyung.kim@lge.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Stephane Eranian <eranian@google.com>,
	David Ahern <dsahern@gmail.com>
Subject: Re: [PATCH v5 1/2] perf record: Propagate exit status of a command line workload
Date: Fri, 09 May 2014 09:11:03 +0900	[thread overview]
Message-ID: <87a9arolpk.fsf@sejong.aot.lge.com> (raw)
In-Reply-To: <20140508103225.GA10851@krava.brq.redhat.com> (Jiri Olsa's message of "Thu, 8 May 2014 12:32:25 +0200")

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

      reply	other threads:[~2014-05-09  0:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-08  7:59 [PATCH v5 1/2] perf record: Propagate exit status of a command line workload Namhyung Kim
2014-05-08  7:59 ` [PATCH v5 2/2] perf tools: Get rid of on_exit() feature test Namhyung Kim
2014-05-08  8:23 ` [PATCH v5 1/2] perf record: Propagate exit status of a command line workload Peter Zijlstra
2014-05-08  8:42   ` Ingo Molnar
2014-05-08 10:32 ` Jiri Olsa
2014-05-09  0:11   ` Namhyung Kim [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a9arolpk.fsf@sejong.aot.lge.com \
    --to=namhyung@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@kernel.org \
    --cc=dsahern@gmail.com \
    --cc=eranian@google.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung.kim@lge.com \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox