lkml.org 
[lkml]   [2020]   [Oct]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 2/2] perf stat: Support regex pattern in --for-each-cgroup
On Sat, Oct 24, 2020 at 11:59:18AM +0900, Namhyung Kim wrote:
> To make the command line even more compact with cgroups, support regex
> pattern matching in cgroup names.
>
> $ perf stat -a -e cpu-clock,cycles --for-each-cgroup ^foo sleep 1
>
> 3,000.73 msec cpu-clock foo # 2.998 CPUs utilized
> 12,530,992,699 cycles foo # 7.517 GHz (100.00%)
> 1,000.61 msec cpu-clock foo/bar # 1.000 CPUs utilized
> 4,178,529,579 cycles foo/bar # 2.506 GHz (100.00%)
> 1,000.03 msec cpu-clock foo/baz # 0.999 CPUs utilized
> 4,176,104,315 cycles foo/baz # 2.505 GHz (100.00%)

just curious.. there was another foo/XXX group using the
rest of the cycles, right?


also perhaps we want to warn if there's no match found:

$ sudo ./perf stat -a -e cpu-clock,cycles --for-each-cgroup ^foo sleep 1

Performance counter stats for 'system wide':


1.002375575 seconds time elapsed

jirka

\
 
 \ /
  Last update: 2020-10-26 12:41    [W:0.201 / U:0.680 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site