* Re: [BUG] perf sched broken
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
` (3 subsequent siblings)
4 siblings, 1 reply; 20+ messages in thread
From: Arnaldo Carvalho de Melo @ 2011-01-12 12:11 UTC (permalink / raw)
To: Stephane Eranian
Cc: LKML, Frédéric Weisbecker, Peter Zijlstra, mingo,
Robert Richter, Mike Galbraith, Corey Ashford
Em Wed, Jan 12, 2011 at 10:29:05AM +0100, Stephane Eranian escreveu:
> 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.
I got to this point as well, and reverting 4c635a4 did the trick for me,
Corey, this is another report for that problem, can you take a look at
it? Stephane, can you try doing a:
git show 4c635a4 | patch -p1 -R
To see if the problem is fixed?
- Arnaldo
> $ 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?
Good question, checking this s/trace/script/g fallout.
- Arnaldo
^ permalink raw reply [flat|nested] 20+ messages in thread* Re: [BUG] perf sched broken
2011-01-12 12:11 ` Arnaldo Carvalho de Melo
@ 2011-01-12 19:10 ` Corey Ashford
0 siblings, 0 replies; 20+ messages in thread
From: Corey Ashford @ 2011-01-12 19:10 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: Stephane Eranian, LKML, Frédéric Weisbecker,
Peter Zijlstra, mingo, Robert Richter, Mike Galbraith
On 01/12/2011 04:11 AM, Arnaldo Carvalho de Melo wrote:
> Em Wed, Jan 12, 2011 at 10:29:05AM +0100, Stephane Eranian escreveu:
>> 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.
>
> I got to this point as well, and reverting 4c635a4 did the trick for me,
> Corey, this is another report for that problem, can you take a look at
> it? Stephane, can you try doing a:
>
> git show 4c635a4 | patch -p1 -R
>
> To see if the problem is fixed?
>
I will have a look at this now. Thanks for the report.
- Corey
> - Arnaldo
>
>> $ 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?
>
> Good question, checking this s/trace/script/g fallout.
>
> - Arnaldo
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [BUG] perf sched broken
2011-01-12 9:29 [BUG] perf sched broken Stephane Eranian
2011-01-12 12:11 ` Arnaldo Carvalho de Melo
@ 2011-01-12 19:41 ` Corey Ashford
2011-01-12 19:52 ` Stephane Eranian
2011-01-12 22:35 ` Corey Ashford
` (2 subsequent siblings)
4 siblings, 1 reply; 20+ messages in thread
From: Corey Ashford @ 2011-01-12 19:41 UTC (permalink / raw)
To: Stephane Eranian
Cc: LKML, Frédéric Weisbecker, Arnaldo Carvalho de Melo,
Peter Zijlstra, mingo, Robert Richter
On 01/12/2011 01:29 AM, Stephane Eranian wrote:
> Hi,
>
> I am trying to use perf sched from tip-x86 but it fails for all my attempts.
So far I have been unsuccessful in reproducing this problem, but I
suspect that I have the wrong git tree or branch. The git tree I've
cloned is:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git
I've tried the branches master, x86/urgent, and x86-urgent-for-linus.
All of those produce correct results, as far as I can tell.
Which tree / branch should I be using?
- Corey
^ permalink raw reply [flat|nested] 20+ messages in thread* Re: [BUG] perf sched broken
2011-01-12 19:41 ` Corey Ashford
@ 2011-01-12 19:52 ` Stephane Eranian
2011-01-12 20:22 ` Corey Ashford
0 siblings, 1 reply; 20+ messages in thread
From: Stephane Eranian @ 2011-01-12 19:52 UTC (permalink / raw)
To: Corey Ashford
Cc: LKML, Frédéric Weisbecker, Arnaldo Carvalho de Melo,
Peter Zijlstra, mingo, Robert Richter
On Wed, Jan 12, 2011 at 8:41 PM, Corey Ashford
<cjashfor@linux.vnet.ibm.com> wrote:
> On 01/12/2011 01:29 AM, Stephane Eranian wrote:
>>
>> Hi,
>>
>> I am trying to use perf sched from tip-x86 but it fails for all my
>> attempts.
>
> So far I have been unsuccessful in reproducing this problem, but I suspect
> that I have the wrong git tree or branch. The git tree I've cloned is:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git
>
I was using this branch.
I also tried running the tool on ubuntu lucid (2.6.32-based).
Didn't you have to at least fixup the sched event names to drop :r?
Once you have the perf.data file, how do you dump it?
I tried:
- perf sched trace -> error
- perf sched replay -> error
- perf script sched-migration -> hangs
- perf report -D
> I've tried the branches master, x86/urgent, and x86-urgent-for-linus. All of
> those produce correct results, as far as I can tell.
>
> Which tree / branch should I be using?
>
> - Corey
>
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [BUG] perf sched broken
2011-01-12 19:52 ` Stephane Eranian
@ 2011-01-12 20:22 ` Corey Ashford
0 siblings, 0 replies; 20+ messages in thread
From: Corey Ashford @ 2011-01-12 20:22 UTC (permalink / raw)
To: Stephane Eranian
Cc: LKML, Frédéric Weisbecker, Arnaldo Carvalho de Melo,
Peter Zijlstra, mingo, Robert Richter
On 01/12/2011 11:52 AM, Stephane Eranian wrote:
> On Wed, Jan 12, 2011 at 8:41 PM, Corey Ashford
> <cjashfor@linux.vnet.ibm.com> wrote:
>> On 01/12/2011 01:29 AM, Stephane Eranian wrote:
>>>
>>> Hi,
>>>
>>> I am trying to use perf sched from tip-x86 but it fails for all my
>>> attempts.
>>
>> So far I have been unsuccessful in reproducing this problem, but I suspect
>> that I have the wrong git tree or branch. The git tree I've cloned is:
>>
>> git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git
>>
> I was using this branch.
> I also tried running the tool on ubuntu lucid (2.6.32-based).
>
> Didn't you have to at least fixup the sched event names to drop :r?
> Once you have the perf.data file, how do you dump it?
>
> I tried:
> - perf sched trace -> error
> - perf sched replay -> error
> - perf script sched-migration -> hangs
> - perf report -D
>
>> I've tried the branches master, x86/urgent, and x86-urgent-for-linus. All of
>> those produce correct results, as far as I can tell.
>>
>> Which tree / branch should I be using?
>>
>> - Corey
>>
I made a stupid mistake! When I ran perf, it was picking up the
executable from /usr/bin instead of the kernel build tree.
I am seeing the problem you are reporting now.
Thanks for your patience,
- Corey
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [BUG] perf sched broken
2011-01-12 9:29 [BUG] perf sched broken Stephane Eranian
2011-01-12 12:11 ` Arnaldo Carvalho de Melo
2011-01-12 19:41 ` 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-14 7:25 ` [tip:perf/urgent] perf sched: Fix list of events, dropping unsupported ':r' modifier tip-bot for Stephane Eranian
4 siblings, 1 reply; 20+ messages in thread
From: Corey Ashford @ 2011-01-12 22:35 UTC (permalink / raw)
To: Stephane Eranian
Cc: LKML, Frédéric Weisbecker, Arnaldo Carvalho de Melo,
Peter Zijlstra, mingo, Robert Richter
On 01/12/2011 01:29 AM, Stephane Eranian wrote:
> 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.
I'm currently using the master branch of
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git
Without your :r patch, I do see the problem with the :r modifier, but
this sequence
$ 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
is working fine for me. I even removed /usr/bin from my search path to
make sure /usr/bin/perf wasn't getting found during the run of ./perf.
I am running on a different environment than you, though. I am using
Fedora 14 (2.6.35 kernel).
For the record, this is what I see:
[root@oc7708135540 perf]# ./perf report -D
WARNING: No sample_id_all support, falling back to unordered processing
0x100 [0x40]: event: 1
.
. ... raw event: size 64 bytes
. 0000: 01 00 00 00 01 00 40 00 ff
ff ff ff 00 00 00 00 ...
...@.........
. 0010: 00 00 00 00 00 00 00 00 ff
ff ff 9f ff ff ff ff ...
.............
. 0020: 00 00 00 81 ff ff ff ff 5b
6b 65 72 6e 65 6c 2e ...
.....[kernel.
. 0030: 6b 61 6c 6c 73 79 6d 73 5d
5f 74 65 78 74 00 00 kal
lsyms]_text..
.
-1 -1 0x100 [0x40]: PERF_RECORD_MMAP -1/0: [0(0xffffffff9fffffff) @
0xffffffff81000000]: [kernel
.kallsyms]_text
0x140 [0x38]: event: 1
.
. ... raw event: size 56 bytes
. 0000: 01 00 00 00 01 00 38 00 ff
ff ff ff 00 00 00 00 ...
...8.........
. 0010: 00 00 00 a0 ff ff ff ff ff
2f 00 00 00 00 00 00 ...
....../......
. 0020: 00 00 00 00 00 00 00 00 5b
6f 75 74 70 75 74 5d ...
.....[output]
. 0030: 00 00 00 00 00 00 00 00
...
.....
.
-1 -1 0x140 [0x38]: PERF_RECORD_MMAP -1/0: [0xffffffffa0000000(0x2fff) @
0]: [output]
.. and so on ..
I will look into the :r problem now.
- Corey
^ permalink raw reply [flat|nested] 20+ messages in thread* Re: [BUG] perf sched broken
2011-01-12 22:35 ` Corey Ashford
@ 2011-01-12 22:38 ` Stephane Eranian
0 siblings, 0 replies; 20+ messages in thread
From: Stephane Eranian @ 2011-01-12 22:38 UTC (permalink / raw)
To: Corey Ashford
Cc: LKML, Frédéric Weisbecker, Arnaldo Carvalho de Melo,
Peter Zijlstra, mingo, Robert Richter
On Wed, Jan 12, 2011 at 11:35 PM, Corey Ashford
<cjashfor@linux.vnet.ibm.com> wrote:
> On 01/12/2011 01:29 AM, Stephane Eranian wrote:
>>
>> 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.
>
> I'm currently using the master branch of
> git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git
>
> Without your :r patch, I do see the problem with the :r modifier, but this
> sequence
>
> $ 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
>
> is working fine for me. I even removed /usr/bin from my search path to make
> sure /usr/bin/perf wasn't getting found during the run of ./perf.
>
> I am running on a different environment than you, though. I am using Fedora
> 14 (2.6.35 kernel).
>
Maybe that's the problem. I was trying this on 2.6.37-tip.
> For the record, this is what I see:
> [root@oc7708135540 perf]# ./perf report -D
> WARNING: No sample_id_all support, falling back to unordered processing
>
> 0x100 [0x40]: event: 1
> .
> . ... raw event: size 64 bytes
> . 0000: 01 00 00 00 01 00 40 00 ff
> ff ff ff 00 00 00 00 ...
> ...@.........
> . 0010: 00 00 00 00 00 00 00 00 ff
> ff ff 9f ff ff ff ff ...
> .............
> . 0020: 00 00 00 81 ff ff ff ff 5b
> 6b 65 72 6e 65 6c 2e ...
> .....[kernel.
> . 0030: 6b 61 6c 6c 73 79 6d 73 5d
> 5f 74 65 78 74 00 00 kal
> lsyms]_text..
> .
> -1 -1 0x100 [0x40]: PERF_RECORD_MMAP -1/0: [0(0xffffffff9fffffff) @
> 0xffffffff81000000]: [kernel
> .kallsyms]_text
>
> 0x140 [0x38]: event: 1
> .
> . ... raw event: size 56 bytes
> . 0000: 01 00 00 00 01 00 38 00 ff
> ff ff ff 00 00 00 00 ...
> ...8.........
> . 0010: 00 00 00 a0 ff ff ff ff ff
> 2f 00 00 00 00 00 00 ...
> ....../......
> . 0020: 00 00 00 00 00 00 00 00 5b
> 6f 75 74 70 75 74 5d ...
> .....[output]
> . 0030: 00 00 00 00 00 00 00 00
> ...
> .....
> .
> -1 -1 0x140 [0x38]: PERF_RECORD_MMAP -1/0: [0xffffffffa0000000(0x2fff) @ 0]:
> [output]
>
> .. and so on ..
>
>
> I will look into the :r problem now.
>
> - Corey
>
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [BUG] perf sched broken
2011-01-12 9:29 [BUG] perf sched broken Stephane Eranian
` (2 preceding siblings ...)
2011-01-12 22:35 ` Corey Ashford
@ 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
4 siblings, 1 reply; 20+ messages in thread
From: Corey Ashford @ 2011-01-13 1:53 UTC (permalink / raw)
To: Stephane Eranian
Cc: LKML, Frédéric Weisbecker, Arnaldo Carvalho de Melo,
Peter Zijlstra, mingo, Robert Richter
On 01/12/2011 01:29 AM, Stephane Eranian wrote:
> 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.
After looking at this in more detail, I agree with Stephane: the 'r'
option appears to only be supported for hardware breakpoint events. My
patch just causes the 'r' to be properly processed and rejected as a
legal option.
As I stated elsewhere in this thread, I don't have a problem running the
perf commands below on a Fedora 14, 2.6.35 kernel, using the perf from
2.6-tip master or x86/urgent.
I don't have a 2.6.37-tip kernel installed at the moment, but if you
still think this could be a perf tool bug that occurs only when using it
with a 2.6.37-tip kernel, let me know and I will devote some time to
trying it out.
- Corey
>
> $ 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",
> };
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 20+ messages in thread* Re: [BUG] perf sched broken
2011-01-13 1:53 ` Corey Ashford
@ 2011-01-13 13:20 ` Arnaldo Carvalho de Melo
0 siblings, 0 replies; 20+ messages in thread
From: Arnaldo Carvalho de Melo @ 2011-01-13 13:20 UTC (permalink / raw)
To: Corey Ashford
Cc: Stephane Eranian, LKML, Frédéric Weisbecker,
Peter Zijlstra, mingo, Robert Richter
Em Wed, Jan 12, 2011 at 05:53:55PM -0800, Corey Ashford escreveu:
> On 01/12/2011 01:29 AM, Stephane Eranian wrote:
>> 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.
>
> After looking at this in more detail, I agree with Stephane: the 'r'
> option appears to only be supported for hardware breakpoint events. My
> patch just causes the 'r' to be properly processed and rejected as a
> legal option.
And thus broke 'perf sched' because it uses it, thanks to this
discussion we figured out that 'perf sched' shouldn't be using it :)
So thank you and Stephane, I'm applying his patch. That ':r' stuff makes
no sense and I couldn't find it being parsed anywhere, historical
bitrotted baggage it seems.
Thanks a lot!
- Arnaldo
^ permalink raw reply [flat|nested] 20+ messages in thread
* [tip:perf/urgent] perf sched: Fix list of events, dropping unsupported ':r' modifier
2011-01-12 9:29 [BUG] perf sched broken Stephane Eranian
` (3 preceding siblings ...)
2011-01-13 1:53 ` Corey Ashford
@ 2011-01-14 7:25 ` tip-bot for Stephane Eranian
2011-08-03 10:59 ` Peter Zijlstra
4 siblings, 1 reply; 20+ messages in thread
From: tip-bot for Stephane Eranian @ 2011-01-14 7:25 UTC (permalink / raw)
To: linux-tip-commits
Cc: acme, linux-kernel, eranian, hpa, mingo, peterz, fweisbec,
robert.richter, tglx, cjashfor, mingo
Commit-ID: 9710118bd4e7f3406865171cb9b9c94547c1c2f9
Gitweb: http://git.kernel.org/tip/9710118bd4e7f3406865171cb9b9c94547c1c2f9
Author: Stephane Eranian <eranian@google.com>
AuthorDate: Wed, 12 Jan 2011 10:29:05 +0100
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Thu, 13 Jan 2011 11:25:49 -0200
perf sched: Fix list of events, dropping unsupported ':r' modifier
Looks to me like the :r modifier is not supported anymore, so remove it from
the list of events.
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Robert Richter <robert.richter@amd.com>
LKML-Reference: <AANLkTim=jawJyBj0iFd0r4-LCKzvjFW+NddzJMD5GUB9@mail.gmail.com>
Signed-off-by: Stephane Eranian <eranian@google.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/builtin-sched.c | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
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",
};
static int __cmd_record(int argc, const char **argv)
^ permalink raw reply related [flat|nested] 20+ messages in thread* Re: [tip:perf/urgent] perf sched: Fix list of events, dropping unsupported ':r' modifier
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
0 siblings, 1 reply; 20+ messages in thread
From: Peter Zijlstra @ 2011-08-03 10:59 UTC (permalink / raw)
To: mingo, hpa, eranian, linux-kernel, acme, fweisbec, robert.richter,
tglx, cjashfor, mingo
Cc: linux-tip-commits
On Fri, 2011-01-14 at 07:25 +0000, tip-bot for Stephane Eranian wrote:
> Looks to me like the :r modifier is not supported anymore, so remove it from
> the list of events.
acme, why is that anyway? -R is a fun way to save some typing, but not
supporting :r anymore takes away the option of not getting
PERF_SAMPLE_RAW output for every event.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [tip:perf/urgent] perf sched: Fix list of events, dropping unsupported ':r' modifier
2011-08-03 10:59 ` Peter Zijlstra
@ 2011-08-03 11:37 ` Frederic Weisbecker
2011-08-03 11:42 ` Peter Zijlstra
0 siblings, 1 reply; 20+ messages in thread
From: Frederic Weisbecker @ 2011-08-03 11:37 UTC (permalink / raw)
To: Peter Zijlstra
Cc: mingo, hpa, eranian, linux-kernel, acme, robert.richter, tglx,
cjashfor, mingo, linux-tip-commits
On Wed, Aug 03, 2011 at 12:59:21PM +0200, Peter Zijlstra wrote:
> On Fri, 2011-01-14 at 07:25 +0000, tip-bot for Stephane Eranian wrote:
> > Looks to me like the :r modifier is not supported anymore, so remove it from
> > the list of events.
>
> acme, why is that anyway? -R is a fun way to save some typing, but not
> supporting :r anymore takes away the option of not getting
> PERF_SAMPLE_RAW output for every event.
Because it was very non obvious for people to select this -R or :r
every time they wanted to use trace events for tracing. I think
there was complaints about that. Moreover nobody seemed to use
trace events for non-tracing (perf report, top, annotate, ...)
so we decided to always have RAW records so that it works for
every cases...unless we lose events because of that.
We can still bring an option to force disabling of raw records.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [tip:perf/urgent] perf sched: Fix list of events, dropping unsupported ':r' modifier
2011-08-03 11:37 ` Frederic Weisbecker
@ 2011-08-03 11:42 ` Peter Zijlstra
2011-08-03 11:57 ` Frederic Weisbecker
0 siblings, 1 reply; 20+ messages in thread
From: Peter Zijlstra @ 2011-08-03 11:42 UTC (permalink / raw)
To: Frederic Weisbecker
Cc: mingo, hpa, eranian, linux-kernel, acme, robert.richter, tglx,
cjashfor, mingo, linux-tip-commits
On Wed, 2011-08-03 at 13:37 +0200, Frederic Weisbecker wrote:
> On Wed, Aug 03, 2011 at 12:59:21PM +0200, Peter Zijlstra wrote:
> > On Fri, 2011-01-14 at 07:25 +0000, tip-bot for Stephane Eranian wrote:
> > > Looks to me like the :r modifier is not supported anymore, so remove it from
> > > the list of events.
> >
> > acme, why is that anyway? -R is a fun way to save some typing, but not
> > supporting :r anymore takes away the option of not getting
> > PERF_SAMPLE_RAW output for every event.
>
> Because it was very non obvious for people to select this -R or :r
> every time they wanted to use trace events for tracing. I think
> there was complaints about that. Moreover nobody seemed to use
> trace events for non-tracing (perf report, top, annotate, ...)
> so we decided to always have RAW records so that it works for
> every cases...unless we lose events because of that.
>
> We can still bring an option to force disabling of raw records.
That just doesn't compute, they still have to use -R, so what's the harm
in also having :r?
Also taking away options just because it confuses people sounds like
gnome, lets just not go there.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [tip:perf/urgent] perf sched: Fix list of events, dropping unsupported ':r' modifier
2011-08-03 11:42 ` Peter Zijlstra
@ 2011-08-03 11:57 ` Frederic Weisbecker
2011-08-03 12:05 ` Peter Zijlstra
0 siblings, 1 reply; 20+ messages in thread
From: Frederic Weisbecker @ 2011-08-03 11:57 UTC (permalink / raw)
To: Peter Zijlstra
Cc: mingo, hpa, eranian, linux-kernel, acme, robert.richter, tglx,
cjashfor, mingo, linux-tip-commits
On Wed, Aug 03, 2011 at 01:42:21PM +0200, Peter Zijlstra wrote:
> On Wed, 2011-08-03 at 13:37 +0200, Frederic Weisbecker wrote:
> > On Wed, Aug 03, 2011 at 12:59:21PM +0200, Peter Zijlstra wrote:
> > > On Fri, 2011-01-14 at 07:25 +0000, tip-bot for Stephane Eranian wrote:
> > > > Looks to me like the :r modifier is not supported anymore, so remove it from
> > > > the list of events.
> > >
> > > acme, why is that anyway? -R is a fun way to save some typing, but not
> > > supporting :r anymore takes away the option of not getting
> > > PERF_SAMPLE_RAW output for every event.
> >
> > Because it was very non obvious for people to select this -R or :r
> > every time they wanted to use trace events for tracing. I think
> > there was complaints about that. Moreover nobody seemed to use
> > trace events for non-tracing (perf report, top, annotate, ...)
> > so we decided to always have RAW records so that it works for
> > every cases...unless we lose events because of that.
> >
> > We can still bring an option to force disabling of raw records.
>
> That just doesn't compute, they still have to use -R, so what's the harm
> in also having :r?
Nope -R is the default/forced behaviour already.
But even if it wasn't I don't see much the point of ":r". Who wants
to run two trace events and only record the traces of one?
> Also taking away options just because it confuses people sounds like
> gnome, lets just not go there.
You're right but options should be there only to be able to override
sane default common uses. And not the opposite. And the common use
of trace events is for tracing.
We should rather enable tracing by default and disable it through
an option. Like --no-trace or so.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [tip:perf/urgent] perf sched: Fix list of events, dropping unsupported ':r' modifier
2011-08-03 11:57 ` Frederic Weisbecker
@ 2011-08-03 12:05 ` Peter Zijlstra
2011-08-03 12:11 ` Frederic Weisbecker
0 siblings, 1 reply; 20+ messages in thread
From: Peter Zijlstra @ 2011-08-03 12:05 UTC (permalink / raw)
To: Frederic Weisbecker
Cc: mingo, hpa, eranian, linux-kernel, acme, robert.richter, tglx,
cjashfor, mingo, linux-tip-commits
On Wed, 2011-08-03 at 13:57 +0200, Frederic Weisbecker wrote:
> On Wed, Aug 03, 2011 at 01:42:21PM +0200, Peter Zijlstra wrote:
> > On Wed, 2011-08-03 at 13:37 +0200, Frederic Weisbecker wrote:
> > > On Wed, Aug 03, 2011 at 12:59:21PM +0200, Peter Zijlstra wrote:
> > > > On Fri, 2011-01-14 at 07:25 +0000, tip-bot for Stephane Eranian wrote:
> > > > > Looks to me like the :r modifier is not supported anymore, so remove it from
> > > > > the list of events.
> > > >
> > > > acme, why is that anyway? -R is a fun way to save some typing, but not
> > > > supporting :r anymore takes away the option of not getting
> > > > PERF_SAMPLE_RAW output for every event.
> > >
> > > Because it was very non obvious for people to select this -R or :r
> > > every time they wanted to use trace events for tracing. I think
> > > there was complaints about that. Moreover nobody seemed to use
> > > trace events for non-tracing (perf report, top, annotate, ...)
> > > so we decided to always have RAW records so that it works for
> > > every cases...unless we lose events because of that.
> > >
> > > We can still bring an option to force disabling of raw records.
> >
> > That just doesn't compute, they still have to use -R, so what's the harm
> > in also having :r?
>
> Nope -R is the default/forced behaviour already.
> But even if it wasn't I don't see much the point of ":r". Who wants
> to run two trace events and only record the traces of one?
[root@westmere linux-2.6]# grep raw_samples tools/perf/builtin-record.c | head -1
static bool raw_samples = false;
is what tip/master is showing me..
> > Also taking away options just because it confuses people sounds like
> > gnome, lets just not go there.
>
> You're right but options should be there only to be able to override
> sane default common uses. And not the opposite. And the common use
> of trace events is for tracing.
>
> We should rather enable tracing by default and disable it through
> an option. Like --no-trace or so.
you smoking some expensive stuff, right?
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [tip:perf/urgent] perf sched: Fix list of events, dropping unsupported ':r' modifier
2011-08-03 12:05 ` Peter Zijlstra
@ 2011-08-03 12:11 ` Frederic Weisbecker
2011-08-03 12:18 ` Peter Zijlstra
0 siblings, 1 reply; 20+ messages in thread
From: Frederic Weisbecker @ 2011-08-03 12:11 UTC (permalink / raw)
To: Peter Zijlstra
Cc: mingo, hpa, eranian, linux-kernel, acme, robert.richter, tglx,
cjashfor, mingo, linux-tip-commits
On Wed, Aug 03, 2011 at 02:05:35PM +0200, Peter Zijlstra wrote:
> On Wed, 2011-08-03 at 13:57 +0200, Frederic Weisbecker wrote:
> > On Wed, Aug 03, 2011 at 01:42:21PM +0200, Peter Zijlstra wrote:
> > > On Wed, 2011-08-03 at 13:37 +0200, Frederic Weisbecker wrote:
> > > > On Wed, Aug 03, 2011 at 12:59:21PM +0200, Peter Zijlstra wrote:
> > > > > On Fri, 2011-01-14 at 07:25 +0000, tip-bot for Stephane Eranian wrote:
> > > > > > Looks to me like the :r modifier is not supported anymore, so remove it from
> > > > > > the list of events.
> > > > >
> > > > > acme, why is that anyway? -R is a fun way to save some typing, but not
> > > > > supporting :r anymore takes away the option of not getting
> > > > > PERF_SAMPLE_RAW output for every event.
> > > >
> > > > Because it was very non obvious for people to select this -R or :r
> > > > every time they wanted to use trace events for tracing. I think
> > > > there was complaints about that. Moreover nobody seemed to use
> > > > trace events for non-tracing (perf report, top, annotate, ...)
> > > > so we decided to always have RAW records so that it works for
> > > > every cases...unless we lose events because of that.
> > > >
> > > > We can still bring an option to force disabling of raw records.
> > >
> > > That just doesn't compute, they still have to use -R, so what's the harm
> > > in also having :r?
> >
> > Nope -R is the default/forced behaviour already.
> > But even if it wasn't I don't see much the point of ":r". Who wants
> > to run two trace events and only record the traces of one?
>
> [root@westmere linux-2.6]# grep raw_samples tools/perf/builtin-record.c | head -1
> static bool raw_samples = false;
>
> is what tip/master is showing me..
Look at tools/perf/util/parse-events.c:parse_single_tracepoint_event()
>
> > > Also taking away options just because it confuses people sounds like
> > > gnome, lets just not go there.
> >
> > You're right but options should be there only to be able to override
> > sane default common uses. And not the opposite. And the common use
> > of trace events is for tracing.
> >
> > We should rather enable tracing by default and disable it through
> > an option. Like --no-trace or so.
>
> you smoking some expensive stuff, right?
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [tip:perf/urgent] perf sched: Fix list of events, dropping unsupported ':r' modifier
2011-08-03 12:11 ` Frederic Weisbecker
@ 2011-08-03 12:18 ` Peter Zijlstra
2011-08-03 17:06 ` Arnaldo Carvalho de Melo
0 siblings, 1 reply; 20+ messages in thread
From: Peter Zijlstra @ 2011-08-03 12:18 UTC (permalink / raw)
To: Frederic Weisbecker
Cc: mingo, hpa, eranian, linux-kernel, acme, robert.richter, tglx,
cjashfor, mingo, linux-tip-commits
On Wed, 2011-08-03 at 14:11 +0200, Frederic Weisbecker wrote:
> Look at tools/perf/util/parse-events.c:parse_single_tracepoint_event()
fscking tinkerers.. that's horrid... strncmp("record") seriously wtf
were you smoking, Acme why did you ever merge crap like that?
Also, acme that can break stuff, remember the whole different
->sample_format discussion?
/me stomps off and goes do something useful, this userspace is like all
other userspace.. a steaming pile of shit.
^ permalink raw reply [flat|nested] 20+ messages in thread* Re: [tip:perf/urgent] perf sched: Fix list of events, dropping unsupported ':r' modifier
2011-08-03 12:18 ` Peter Zijlstra
@ 2011-08-03 17:06 ` Arnaldo Carvalho de Melo
2011-08-03 19:49 ` Peter Zijlstra
0 siblings, 1 reply; 20+ messages in thread
From: Arnaldo Carvalho de Melo @ 2011-08-03 17:06 UTC (permalink / raw)
To: Peter Zijlstra
Cc: Frederic Weisbecker, mingo, hpa, eranian, linux-kernel,
robert.richter, tglx, cjashfor, mingo, linux-tip-commits
Em Wed, Aug 03, 2011 at 02:18:51PM +0200, Peter Zijlstra escreveu:
> On Wed, 2011-08-03 at 14:11 +0200, Frederic Weisbecker wrote:
> > Look at tools/perf/util/parse-events.c:parse_single_tracepoint_event()
>
> fscking tinkerers.. that's horrid... strncmp("record") seriously wtf
> were you smoking, Acme why did you ever merge crap like that?
I haven't :-)
> Also, acme that can break stuff, remember the whole different
> ->sample_format discussion?
Yes, the evsel/evlist abstractions were in part motivated by the
multiple perf_event_attr->sample_type in the same session.
Being 5 weeks AFK was really nice but left me with a rather large
backlog :-)
> /me stomps off and goes do something useful, this userspace is like all
> other userspace.. a steaming pile of shit.
Nah, its all code, no matter what side of the fence.
- Arnaldo
^ permalink raw reply [flat|nested] 20+ messages in thread* Re: [tip:perf/urgent] perf sched: Fix list of events, dropping unsupported ':r' modifier
2011-08-03 17:06 ` Arnaldo Carvalho de Melo
@ 2011-08-03 19:49 ` Peter Zijlstra
0 siblings, 0 replies; 20+ messages in thread
From: Peter Zijlstra @ 2011-08-03 19:49 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: Frederic Weisbecker, mingo, hpa, eranian, linux-kernel,
robert.richter, tglx, cjashfor, mingo, linux-tip-commits
On Wed, 2011-08-03 at 14:06 -0300, Arnaldo Carvalho de Melo wrote:
>
> > /me stomps off and goes do something useful, this userspace is like all
> > other userspace.. a steaming pile of shit.
>
> Nah, its all code, no matter what side of the fence.
Yeah, I know, I'm overly grumpy at times, more so of late. Sorry about
that.
^ permalink raw reply [flat|nested] 20+ messages in thread