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]
Date:	Tue, 8 Oct 2013 14:51:13 +0200
From:	Ingo Molnar <mingo@...nel.org>
To:	Arnaldo Carvalho de Melo <acme@...stprotocols.net>
Cc:	David Ahern <dsahern@...il.com>,
	Namhyung Kim <namhyung@...nel.org>,
	linux-kernel@...r.kernel.org,
	Frederic Weisbecker <fweisbec@...il.com>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Jiri Olsa <jolsa@...hat.com>,
	Namhyung Kim <namhyung.kim@....com>,
	Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCH 2/3] perf stat: Don't require a workload when using
 system wide or CPU options


* Arnaldo Carvalho de Melo <acme@...stprotocols.net> wrote:

> Em Mon, Sep 30, 2013 at 07:40:12AM -0600, David Ahern escreveu:
> > On 9/30/13 2:47 AM, Namhyung Kim wrote:
> > >>@@ -1517,8 +1517,10 @@ int cmd_stat(int argc, const char **argv, const char *prefix __maybe_unused)
> > >>  	} else if (big_num_opt == 0) /* User passed --no-big-num */
> > >>  		big_num = false;
> > >>
> > >>-	if (!argc && !perf_target__has_task(&target))
> > >>+	if (!argc && !perf_target__has_task(&target) &&
> > >>+	    !perf_target__has_cpu(&target))
> > >
> > >You can use perf_target__none() for this.
> > 
> > Indeed. Updated patch attached.
> 
> Cool patch, applying to acme/perf/core.
> 
> While trying it noticed this, that should also be fixed
> eventually:
> 
> [root@zoo ~]# perf stat -c C 0
> C: No such file or directory
> 
>  Performance counter stats for 'C 0':
> 
>      <not counted> task-clock              
>      <not counted> context-switches        
>      <not counted> cpu-migrations 
> <SNIP>

Btw., would anyone be interested in adding CPU and node binding options to 
perf stat?

There's code to do something like that in tools/perf/bench/numa.c:

        /* Special option string parsing callbacks: */
        OPT_CALLBACK('C', "cpus", NULL, "cpu[,cpu2,...cpuN]",
                        "bind the first N tasks to these specific cpus (the rest is unbound)",
                        parse_cpus_opt),
        OPT_CALLBACK('M', "memnodes", NULL, "node[,node2,...nodeN]",
                        "bind the first N tasks to these specific memory nodes (the rest is unbound)",
                        parse_nodes_opt),

Thanks,

	Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ