From: Leo Yan <leo.yan@linaro.org>
To: Ian Rogers <irogers@google.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org
Subject: Re: [PATCH v1] perf test: Introduce script for data symbol parsing
Date: Thu, 4 Aug 2022 09:07:34 +0800 [thread overview]
Message-ID: <20220804010734.GB133193@leoy-ThinkPad-X240s> (raw)
In-Reply-To: <CAP-5=fWArHKrxu80WKZystkEDFW_jhuU02m89S8tXkqvOChpoA@mail.gmail.com>
Hi Ian,
On Wed, Aug 03, 2022 at 04:06:04PM -0700, Ian Rogers wrote:
[...]
> > +echo "Compiling test program..."
> > +cc $TEST_PROGRAM_SOURCE -o $TEST_PROGRAM || exit 1
> > +
> > +echo "Recording workload..."
> > +perf mem record --all-user -o ${PERF_DATA} -- $TEST_PROGRAM &
> > +PERFPID=$!
>
> I wonder here you could do:
> TESTPID=$(ps -o pid -h --ppid "$PERFPID")
I tried this command and found "$TESTPID" is empty string. So the
test command doesn't create child process.
> > +sleep 1
> > +
> > +kill $PERFPID
> > +wait $PERFPID
> > +# test program may leave an orphan process running the workload
> > +killall $(basename $TEST_PROGRAM)
>
> And then here kill $TESTPID to avoid the killall which worries me a little.
Yeah, I referred the code from another script test_arm_spe_fork.sh,
this script doesn't fork new child process. So here I get over
complexity, will drop "killall $(basename $TEST_PROGRAM)" in next
version.
Thanks a lot for reviewing!
Leo
prev parent reply other threads:[~2022-08-04 1:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-03 15:07 [PATCH v1] perf test: Introduce script for data symbol parsing Leo Yan
2022-08-03 23:06 ` Ian Rogers
2022-08-04 1:07 ` Leo Yan [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=20220804010734.GB133193@leoy-ThinkPad-X240s \
--to=leo.yan@linaro.org \
--cc=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=irogers@google.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.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