linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [GIT PULL 0/2] perf/urgent fixes
@ 2011-12-07 15:47 Arnaldo Carvalho de Melo
  2011-12-07 15:47 ` [PATCH 1/2] perf stat: Failure with "Operation not supported" Arnaldo Carvalho de Melo
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Arnaldo Carvalho de Melo @ 2011-12-07 15:47 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Andrew Vagin,
	Anton Blanchard, Arun Sharma, David Ahern, devel,
	Frederic Weisbecker, Paul Mackerras, Peter Zijlstra, arnaldo.melo

Hi Ingo,

        Please consider pulling from:

git://github.com/acmel/linux.git perf/urgent

Regards,

- Arnaldo

Andrew Vagin (1):
  perf header: Use event_name() to get an event name

Anton Blanchard (1):
  perf stat: Failure with "Operation not supported"

 tools/perf/builtin-stat.c |    3 ++-
 tools/perf/util/header.c  |    2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

-- 
1.7.8.rc0.35.gee6df


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] perf stat: Failure with "Operation not supported"
  2011-12-07 15:47 [GIT PULL 0/2] perf/urgent fixes Arnaldo Carvalho de Melo
@ 2011-12-07 15:47 ` Arnaldo Carvalho de Melo
  2011-12-07 15:47 ` [PATCH 2/2] perf header: Use event_name() to get an event name Arnaldo Carvalho de Melo
  2011-12-07 22:24 ` [GIT PULL 0/2] perf/urgent fixes Ingo Molnar
  2 siblings, 0 replies; 4+ messages in thread
From: Arnaldo Carvalho de Melo @ 2011-12-07 15:47 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Anton Blanchard, David Ahern, Frederic Weisbecker,
	Paul Mackerras, Peter Zijlstra, Arnaldo Carvalho de Melo

From: Anton Blanchard <anton@samba.org>

perf stat is failing on PowerPC:

  Error: open_counter returned with 95 (Operation not supported). /bin/dmesg may provide additional information.

  Fatal: Not all events could be opened.

commit 370faf1dd046 (perf stat: Fail softly on unsupported events)
added a check for failure returning ENOENT, but the POWER backend
returns EOPNOTSUPP. It looks like alpha, blackfin and mips do the
same.

With the patch applied, things work as expected:

 Performance counter stats for '/bin/true':

          0.362176 task-clock                #    0.623 CPUs utilized
                 0 context-switches          #    0.000 M/sec
                 0 CPU-migrations            #    0.000 M/sec
                28 page-faults               #    0.077 M/sec
         1,677,020 cycles                    #    4.630 GHz
   <not supported> stalled-cycles-frontend
   <not supported> stalled-cycles-backend
           431,220 instructions              #    0.26  insns per cycle
           101,889 branches                  #  281.325 M/sec
             4,145 branch-misses             #    4.07% of all branches

       0.000581361 seconds time elapsed

Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/20111202093833.5fef7226@kryten
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-stat.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index 7d98676..955930e 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -463,7 +463,8 @@ static int run_perf_stat(int argc __used, const char **argv)
 
 	list_for_each_entry(counter, &evsel_list->entries, node) {
 		if (create_perf_stat_counter(counter, first) < 0) {
-			if (errno == EINVAL || errno == ENOSYS || errno == ENOENT) {
+			if (errno == EINVAL || errno == ENOSYS ||
+			    errno == ENOENT || errno == EOPNOTSUPP) {
 				if (verbose)
 					ui__warning("%s event is not supported by the kernel.\n",
 						    event_name(counter));
-- 
1.7.8.rc0.35.gee6df


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] perf header: Use event_name() to get an event name
  2011-12-07 15:47 [GIT PULL 0/2] perf/urgent fixes Arnaldo Carvalho de Melo
  2011-12-07 15:47 ` [PATCH 1/2] perf stat: Failure with "Operation not supported" Arnaldo Carvalho de Melo
@ 2011-12-07 15:47 ` Arnaldo Carvalho de Melo
  2011-12-07 22:24 ` [GIT PULL 0/2] perf/urgent fixes Ingo Molnar
  2 siblings, 0 replies; 4+ messages in thread
From: Arnaldo Carvalho de Melo @ 2011-12-07 15:47 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Andrew Vagin, David Ahern, Paul Mackerras,
	Peter Zijlstra, Arun Sharma, devel, Arnaldo Carvalho de Melo

From: Andrew Vagin <avagin@openvz.org>

perf_evsel.name may be not initialized

Cc: David Ahern <dsahern@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arun Sharma <asharma@fb.com>
Cc: devel@openvz.org
Link: http://lkml.kernel.org/r/1322471015-107825-2-git-send-email-avagin@openvz.org
Signed-off-by: Andrew Vagin <avagin@openvz.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/header.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
index bcd05d0..33c17a2 100644
--- a/tools/perf/util/header.c
+++ b/tools/perf/util/header.c
@@ -388,7 +388,7 @@ static int write_event_desc(int fd, struct perf_header *h __used,
 		/*
 		 * write event string as passed on cmdline
 		 */
-		ret = do_write_string(fd, attr->name);
+		ret = do_write_string(fd, event_name(attr));
 		if (ret < 0)
 			return ret;
 		/*
-- 
1.7.8.rc0.35.gee6df


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [GIT PULL 0/2] perf/urgent fixes
  2011-12-07 15:47 [GIT PULL 0/2] perf/urgent fixes Arnaldo Carvalho de Melo
  2011-12-07 15:47 ` [PATCH 1/2] perf stat: Failure with "Operation not supported" Arnaldo Carvalho de Melo
  2011-12-07 15:47 ` [PATCH 2/2] perf header: Use event_name() to get an event name Arnaldo Carvalho de Melo
@ 2011-12-07 22:24 ` Ingo Molnar
  2 siblings, 0 replies; 4+ messages in thread
From: Ingo Molnar @ 2011-12-07 22:24 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Andrew Vagin, Anton Blanchard, Arun Sharma,
	David Ahern, devel, Frederic Weisbecker, Paul Mackerras,
	Peter Zijlstra, arnaldo.melo


* Arnaldo Carvalho de Melo <acme@infradead.org> wrote:

> Hi Ingo,
> 
>         Please consider pulling from:
> 
> git://github.com/acmel/linux.git perf/urgent
> 
> Regards,
> 
> - Arnaldo
> 
> Andrew Vagin (1):
>   perf header: Use event_name() to get an event name
> 
> Anton Blanchard (1):
>   perf stat: Failure with "Operation not supported"
> 
>  tools/perf/builtin-stat.c |    3 ++-
>  tools/perf/util/header.c  |    2 +-
>  2 files changed, 3 insertions(+), 2 deletions(-)

Pulled, thanks Arnaldo!

	Ingo

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-12-07 22:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-07 15:47 [GIT PULL 0/2] perf/urgent fixes Arnaldo Carvalho de Melo
2011-12-07 15:47 ` [PATCH 1/2] perf stat: Failure with "Operation not supported" Arnaldo Carvalho de Melo
2011-12-07 15:47 ` [PATCH 2/2] perf header: Use event_name() to get an event name Arnaldo Carvalho de Melo
2011-12-07 22:24 ` [GIT PULL 0/2] perf/urgent fixes Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).