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, 15 May 2012 23:44:40 +0900
From:	Namhyung Kim <namhyung@...il.com>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	Ingo Molnar <mingo@...nel.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Arnaldo Carvalho de Melo <acme@...radead.org>,
	linux-kernel@...r.kernel.org,
	Arjan van de Ven <arjan@...radead.org>,
	David Ahern <dsahern@...il.com>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Mike Galbraith <efault@....de>,
	Paul Mackerras <paulus@...ba.org>,
	Stephane Eranian <eranian@...gle.com>, arnaldo.melo@...il.com,
	Arnaldo Carvalho de Melo <acme@...hat.com>
Subject: Re: [GIT PULL 0/8] Annotation weekly ponies delivery

2012-05-15 (화), 12:32 +0200, Peter Zijlstra:
> On Tue, 2012-05-15 at 00:06 +0900, Namhyung Kim wrote:
> 
> > perf_evlist__config_attrs() has this:
> > 
> > 	if (evlist->cpus->map[0] < 0)
> > 		opts->no_inherit = true;
> > 
> > meaning that per task profiling won't enable event inheritance. I don't
> > know why it's needed though.
> 
> Because you cannot have inherited per-task counters. It only works for
> per-task-per-cpu counters. Otherwise you'll have a scalability
> nightmare.
> 

Got it. So it means that we do need to create an event for each cpu
in order to profile a task (and its children), right? (Originally, I
thought it's a bug :-p)

If so, yes, the commit 55261f46702c ("perf evlist: Fix creation of
cpu map") should be reverted like below (note that target->cpu_list
check no longer needed since perf_target__validate() will handle
those cases). If it looks ok to you guys, I'll send a formal patch
with name changes (to avoid the double negation suggested by Ingo):


diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c
index 1201daf71719..f6979ba391d1 100644
--- a/tools/perf/util/evlist.c
+++ b/tools/perf/util/evlist.c
@@ -609,10 +609,10 @@ int perf_evlist__create_maps(struct perf_evlist 
 	if (evlist->threads == NULL)
 		return -1;
 
-	if (!perf_target__no_cpu(target))
-		evlist->cpus = cpu_map__new(target->cpu_list);
-	else
+	if (!perf_target__no_task(target))
 		evlist->cpus = cpu_map__dummy_new();
+	else
+		evlist->cpus = cpu_map__new(target->cpu_list);
 
 	if (evlist->cpus == NULL)
 		goto out_delete_threads;



-- 
Regards,
Namhyung Kim


--
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