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] [thread-next>] [day] [month] [year] [list]
Message-ID: <2546f051-95be-1d8d-133c-2dac639b317d@intel.com>
Date:   Wed, 7 Sep 2022 16:33:44 +0300
From:   Adrian Hunter <adrian.hunter@...el.com>
To:     Namhyung Kim <namhyung@...nel.org>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        Jiri Olsa <jolsa@...nel.org>
Cc:     Ingo Molnar <mingo@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Ian Rogers <irogers@...gle.com>,
        linux-perf-users@...r.kernel.org
Subject: Re: [PATCH 3/6] perf test: Test record with --threads option

On 7/09/22 09:46, Namhyung Kim wrote:
> To verify per-thread mode is working with multi-thread recording.
> Use two software events for testing to check event set-output handling.
> Also update the cleanup routine because threads recording produces data
> in a directory.
> 
> Signed-off-by: Namhyung Kim <namhyung@...nel.org>
> ---
>  tools/perf/tests/shell/record.sh | 17 +++++++++++++++--
>  1 file changed, 15 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/perf/tests/shell/record.sh b/tools/perf/tests/shell/record.sh
> index cea3c7b7e2cd..3331fb092654 100755
> --- a/tools/perf/tests/shell/record.sh
> +++ b/tools/perf/tests/shell/record.sh
> @@ -11,8 +11,8 @@ testsym="test_loop"
>  testopt="-D 3"
>  
>  cleanup() {
> -  rm -f ${perfdata}
> -  rm -f ${perfdata}.old
> +  rm -rf ${perfdata}
> +  rm -rf ${perfdata}.old
>  
>    if [ "${testprog}" != "true" ]; then
>      rm -f ${testprog}
> @@ -90,6 +90,19 @@ test_per_thread() {
>      err=1
>      return
>    fi
> +  if ! perf record -e cpu-clock,cs --per-thread --threads=core ${testopt} \
> +    -o ${perfdata} ${testprog} 2> /dev/null

This does not seem to be possible, because it gives the error:

--per-thread option is mutually exclusive to parallel streaming mode.
Failed to initialize parallel data streaming masks 

> +  then
> +    echo "Per-thread record with --threads [Failed]"
> +    err=1
> +    return
> +  fi
> +  if ! perf report -i ${perfdata} -q | egrep -q ${testsym}
> +  then
> +    echo "Per-thread record with --threads [Failed missing output]"
> +    err=1
> +    return
> +  fi
>    echo "Basic --per-thread mode test [Success]"
>  }
>  

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ