From: Namhyung Kim <namhyung@kernel.org>
To: xiakaixu <xiakaixu@huawei.com>
Cc: <a.p.zijlstra@chello.nl>, <paulus@samba.org>, <mingo@redhat.com>,
<acme@ghostprotocols.net>, <linux-kernel@vger.kernel.org>,
Huxinwei <huxinwei@huawei.com>, Genghui <hui.geng@huawei.com>,
<peifeiyue@huawei.com>
Subject: Re: A Bug Inquiry in linux/tools/perf/builtin-record.c
Date: Wed, 26 Feb 2014 17:03:37 +0900 [thread overview]
Message-ID: <87lhwyuwpy.fsf@sejong.aot.lge.com> (raw)
In-Reply-To: <530C4330.20706@huawei.com> (xiakaixu@huawei.com's message of "Tue, 25 Feb 2014 15:16:00 +0800")
Hi xiakaixu,
> 于 2014/2/19 9:48, xiakaixu 写道:
>> Hi all,
>>
>> There is a bug found in my work when running "perf record". The basic information
>> is here. As we know, perf record is a parent process and the programme traced is
>> a child process when running "perf record". Sometimes the child process become
>> zombie state and disappear until the parent process is killed. The bug stays in linux/
>> tools/perf/builtin-record.c.
>> *********************************************************************
>> static int __cmd_record(struct perf_record *rec, int argc, const char **argv)
>> ......
>> if (hits == rec->samples) {
>> if (done)
>> break;
>> err = poll(evsel_list->pollfd, evsel_list->nr_fds, -1);
>> waking++;
>> }
>> ......
>> *********************************************************************
>> The parent process still call the function
>> poll(evsel_list->pollfd, evsel_list->nr_fds, -1) when the child process has exited
>> already, which caused a zombie process.
>>
>> May I have your opinion ?
>> Waiting for your reply!
Do you have a real bug report based on this?
AFAIK perf record installed a signal handler for SIGCHLD so it'll set
the 'done' variable when child exits and then break the loop.
Thanks,
Namhyung
next prev parent reply other threads:[~2014-02-26 8:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-19 1:48 A Bug Inquiry in linux/tools/perf/builtin-record.c xiakaixu
2014-02-25 7:16 ` xiakaixu
2014-02-26 8:03 ` Namhyung Kim [this message]
2014-02-27 2:53 ` xiakaixu
2014-03-03 4:10 ` xiakaixu
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=87lhwyuwpy.fsf@sejong.aot.lge.com \
--to=namhyung@kernel.org \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@ghostprotocols.net \
--cc=hui.geng@huawei.com \
--cc=huxinwei@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=paulus@samba.org \
--cc=peifeiyue@huawei.com \
--cc=xiakaixu@huawei.com \
/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