All of lore.kernel.org
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung.kim@lge.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Arnaldo Carvalho de Melo <acme@infradead.org>,
	linux-kernel@vger.kernel.org,
	Arjan van de Ven <arjan@infradead.org>,
	David Ahern <dsahern@gmail.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Mike Galbraith <efault@gmx.de>, Paul Mackerras <paulus@samba.org>,
	Stephane Eranian <eranian@google.com>,
	arnaldo.melo@gmail.com,
	Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: Re: [GIT PULL 0/8] Annotation weekly ponies delivery
Date: Wed, 16 May 2012 17:19:16 +0900	[thread overview]
Message-ID: <87397035dn.fsf@sejong.aot.lge.com> (raw)
In-Reply-To: <87liksd5wi.fsf@sejong.aot.lge.com> (Namhyung Kim's message of "Wed, 16 May 2012 14:57:49 +0900")

Hi,

On Wed, 16 May 2012 14:57:49 +0900, Namhyung Kim wrote:
> Hmm.. but it seems this breaks my 'perf stat -g' - it doesn't
> respond any more (even for ^C):
>

I've found that it's a problem of whole perf stat, not only for -g
option. It's because the perf stat should use per-task events for some
reason as it's not use mmap on the events.

The commit 77a6f014e9ae ("perf stat: Use perf_evlist__create_maps")
introduced the issue and it seems following patch works well for me:

---[ cut here ]---

diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index d19058a7b84c..185e59a4715d 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -754,6 +754,9 @@ static struct perf_record record = {
 		.user_freq	     = UINT_MAX,
 		.user_interval	     = ULLONG_MAX,
 		.freq		     = 1000,
+		.target		     = {
+			.need_mmap   = true,
+		},
 	},
 	.write_mode = WRITE_FORCE,
 	.file_new   = true,
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index 553560a8b1be..ebcd15883ab8 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -1162,6 +1162,9 @@ int cmd_top(int argc, const char **argv, const char *prefix __used)
 		.freq		     = 1000, /* 1 KHz */
 		.mmap_pages	     = 128,
 		.sym_pcnt_filter     = 5,
+		.target		     = {
+			.need_mmap   = true,
+		},
 	};
 	char callchain_default_opt[] = "fractal,0.5,callee";
 	const struct option options[] = {
diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c
index 87889f325678..ba43c3a4046c 100644
--- a/tools/perf/util/evlist.c
+++ b/tools/perf/util/evlist.c
@@ -611,6 +611,8 @@ int perf_evlist__create_maps(struct perf_evlist *evlist,
 
 	if (perf_target__has_task(target))
 		evlist->cpus = cpu_map__dummy_new();
+	else if (!perf_target__has_cpu(target) && !target->need_mmap)
+		evlist->cpus = cpu_map__dummy_new();
 	else
 		evlist->cpus = cpu_map__new(target->cpu_list);
 
diff --git a/tools/perf/util/target.h b/tools/perf/util/target.h
index c43f632955fa..ffa247d3ede3 100644
--- a/tools/perf/util/target.h
+++ b/tools/perf/util/target.h
@@ -11,6 +11,7 @@ struct perf_target {
 	const char   *uid_str;
 	uid_t	     uid;
 	bool	     system_wide;
+	bool	     need_mmap;
 };
 
 enum perf_target_errno {


-- 
Thanks,
Namhyung

  reply	other threads:[~2012-05-16  8:21 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-12 19:52 [GIT PULL 0/8] Annotation weekly ponies delivery Arnaldo Carvalho de Melo
2012-05-12 19:53 ` [PATCH 1/8] perf annotate: Use raw form for register indirect call instructions Arnaldo Carvalho de Melo
2012-05-12 19:53 ` [PATCH 2/8] perf annotate: Resolve symbols using objdump comment Arnaldo Carvalho de Melo
2012-05-12 19:53 ` [PATCH 3/8] perf annotate: Resolve symbols using objdump comment for single op ins Arnaldo Carvalho de Melo
2012-05-12 19:53 ` [PATCH 4/8] perf annotate: Augment lock instruction output Arnaldo Carvalho de Melo
2012-05-12 19:53 ` [PATCH 5/8] perf annotate: Introduce ->free() method in ins_ops Arnaldo Carvalho de Melo
2012-05-12 19:53 ` [PATCH 6/8] perf annotate browser: Count the numbers of jump sources to a target Arnaldo Carvalho de Melo
2012-05-12 19:53 ` [PATCH 7/8] perf annotate browser: Show 'jumpy' functions Arnaldo Carvalho de Melo
2012-05-12 19:53 ` [PATCH 8/8] perf annotate browser: Add key bindings help window Arnaldo Carvalho de Melo
2012-05-12 20:40 ` [GIT PULL 0/8] Annotation weekly ponies delivery Linus Torvalds
2012-05-12 21:25   ` Arnaldo Carvalho de Melo
2012-05-12 22:29     ` Linus Torvalds
2012-05-14  7:05       ` Ingo Molnar
2012-05-14 11:13   ` Peter Zijlstra
2012-05-14 11:55     ` Ingo Molnar
2012-05-14 15:06       ` Namhyung Kim
2012-05-15  4:48         ` Namhyung Kim
2012-05-15 10:32         ` Peter Zijlstra
2012-05-15 14:44           ` Namhyung Kim
2012-05-15 17:07             ` Peter Zijlstra
2012-05-16  5:57               ` Namhyung Kim
2012-05-16  8:19                 ` Namhyung Kim [this message]
2012-05-17  0:13                 ` Namhyung Kim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87397035dn.fsf@sejong.aot.lge.com \
    --to=namhyung.kim@lge.com \
    --cc=acme@infradead.org \
    --cc=acme@redhat.com \
    --cc=arjan@infradead.org \
    --cc=arnaldo.melo@gmail.com \
    --cc=dsahern@gmail.com \
    --cc=efault@gmx.de \
    --cc=eranian@google.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=paulus@samba.org \
    --cc=peterz@infradead.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.