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:   Fri, 26 Jan 2018 08:10:30 +0800
From:   weiping zhang <zwp10758@...il.com>
To:     peterz@...radead.org, mingo@...hat.com, acme@...nel.org,
        alexander.shishkin@...ux.intel.com, jolsa@...hat.com,
        namhyung@...nel.org,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-perf-users@...r.kernel.org
Subject: Re: [PATCH] perf cgroup: fix cgroup for multiple events

please discard this patch, may the right way to use cgroup with multiple events
like following:

perf stat -e cycles -e cache-misses  -a -I 1000 -G test,test

2018-01-25 23:00 GMT+08:00 weiping zhang <zhangweiping@...ichuxing.com>:
> if use -G and with multiple events, only the first event has
> correct cgroup setting, all other events have a wroung setting.
>
> reproduce:
> mkdir -p /sys/fs/cgroup/perf_event/test
> perf stat -e cycles -e cache-misses  -a -I 1000 -G test
>
> before:
>      1.001007226      <not counted>      cycles                    test
>      1.001007226              7,506      cache-misses
>
> after:
>      1.000834097      <not counted>      cycles                    test
>      1.000834097      <not counted>      cache-misses              test
>
> Signed-off-by: weiping zhang <zhangweiping@...ichuxing.com>
> ---
>  tools/perf/util/cgroup.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/tools/perf/util/cgroup.c b/tools/perf/util/cgroup.c
> index d9ffc1e..b50bfd1 100644
> --- a/tools/perf/util/cgroup.c
> +++ b/tools/perf/util/cgroup.c
> @@ -137,7 +137,8 @@ static int add_cgroup(struct perf_evlist *evlist, char *str)
>
>         return -1;
>  found:
> -       counter->cgrp = cgrp;
> +       evlist__for_each_entry(evlist, counter)
> +               counter->cgrp = cgrp;
>         return 0;
>  }
>
> --
> 2.9.4
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ