public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [BUG] perf sched broken
@ 2011-01-12  9:29 Stephane Eranian
  2011-01-12 12:11 ` Arnaldo Carvalho de Melo
                   ` (4 more replies)
  0 siblings, 5 replies; 20+ messages in thread
From: Stephane Eranian @ 2011-01-12  9:29 UTC (permalink / raw)
  To: LKML
  Cc: Frédéric Weisbecker, Arnaldo Carvalho de Melo,
	Peter Zijlstra, mingo, Robert Richter

Hi,

I am trying to use perf sched from tip-x86 but it fails for all my attempts.

First of, I think the event list is stale. This is not so much the
events themselves
but rather the flags.

Looks to me like the :r modifier is not supported anymore, so a patch like the
one below is needed. That helps collect a trace. But then, you can dump
the trace.

$ perf sched rec dd if=/dev/zero of=/dev/null count=1000000
1000000+0 records in
1000000+0 records out
512000000 bytes (512 MB) copied, 0.589981 s, 868 MB/s
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.481 MB perf.data (~20997 samples) ]

$ perf sched rep
run measurement overhead: 2934 nsecs
sleep measurement overhead: 90502 nsecs
the run test took 999149 nsecs
the sleep test took 1092248 nsecs
  Fatal: no trace data in the file

$ perf sched trace -D
 usage: perf sched [<options>] {record|latency|map|replay|trace}

    -i, --input <file>    input file name
    -v, --verbose         be more verbose (show symbol address, etc)
    -D, --dump-raw-trace  dump raw trace in ASCII

Note that this is not specific to pref sched. If I use perf record directly,
I run into the same issue:
$ perf record -R -a -c 1 -e sched:sched_switch -- sleep 1
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.365 MB perf.data (~15962 samples) ]
$./perf report -D
  Fatal: no trace data in the file

Now that perf trace is gone, how to I dump the trace?


Drop :r modifier for tracepoints

Signed-off-by: Stephane Eranian <eranian@google.com>
---

diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c
index abd4b84..29e7ffd 100644
--- a/tools/perf/builtin-sched.c
+++ b/tools/perf/builtin-sched.c
@@ -1843,15 +1843,15 @@ static const char *record_args[] = {
        "-f",
        "-m", "1024",
        "-c", "1",
-       "-e", "sched:sched_switch:r",
-       "-e", "sched:sched_stat_wait:r",
-       "-e", "sched:sched_stat_sleep:r",
-       "-e", "sched:sched_stat_iowait:r",
-       "-e", "sched:sched_stat_runtime:r",
-       "-e", "sched:sched_process_exit:r",
-       "-e", "sched:sched_process_fork:r",
-       "-e", "sched:sched_wakeup:r",
-       "-e", "sched:sched_migrate_task:r",
+       "-e", "sched:sched_switch",
+       "-e", "sched:sched_stat_wait",
+       "-e", "sched:sched_stat_sleep",
+       "-e", "sched:sched_stat_iowait",
+       "-e", "sched:sched_stat_runtime",
+       "-e", "sched:sched_process_exit",
+       "-e", "sched:sched_process_fork",
+       "-e", "sched:sched_wakeup",
+       "-e", "sched:sched_migrate_task",
 };

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

end of thread, other threads:[~2011-08-03 19:50 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-12  9:29 [BUG] perf sched broken Stephane Eranian
2011-01-12 12:11 ` Arnaldo Carvalho de Melo
2011-01-12 19:10   ` Corey Ashford
2011-01-12 19:41 ` Corey Ashford
2011-01-12 19:52   ` Stephane Eranian
2011-01-12 20:22     ` Corey Ashford
2011-01-12 22:35 ` Corey Ashford
2011-01-12 22:38   ` Stephane Eranian
2011-01-13  1:53 ` Corey Ashford
2011-01-13 13:20   ` Arnaldo Carvalho de Melo
2011-01-14  7:25 ` [tip:perf/urgent] perf sched: Fix list of events, dropping unsupported ':r' modifier tip-bot for Stephane Eranian
2011-08-03 10:59   ` Peter Zijlstra
2011-08-03 11:37     ` Frederic Weisbecker
2011-08-03 11:42       ` Peter Zijlstra
2011-08-03 11:57         ` Frederic Weisbecker
2011-08-03 12:05           ` Peter Zijlstra
2011-08-03 12:11             ` Frederic Weisbecker
2011-08-03 12:18               ` Peter Zijlstra
2011-08-03 17:06                 ` Arnaldo Carvalho de Melo
2011-08-03 19:49                   ` Peter Zijlstra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox