lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 4 Aug 2022 09:07:34 +0800
From:   Leo Yan <leo.yan@...aro.org>
To:     Ian Rogers <irogers@...gle.com>
Cc:     Arnaldo Carvalho de Melo <acme@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Jiri Olsa <jolsa@...nel.org>,
        Namhyung Kim <namhyung@...nel.org>,
        linux-kernel@...r.kernel.org, linux-perf-users@...r.kernel.org
Subject: Re: [PATCH v1] perf test: Introduce script for data symbol parsing

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ