1. 05 9月, 2009 2 次提交
  2. 04 9月, 2009 4 次提交
  3. 03 9月, 2009 6 次提交
    • I
      perf trace: Fix read_string() · 6f4596d9
      Ingo Molnar 提交于
      We did not account for the enclosing \0. Depending on what malloc()
      gave us this resulted in corrupted version string printouts.
      
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      6f4596d9
    • I
      perf trace: Print out in nanoseconds · 00fc9786
      Ingo Molnar 提交于
      Print out more accurate timestamps - usecs does not cut it
      anymore on fast enough boxes ;-)
      
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      00fc9786
    • I
      perf tools: Seek to the end of the header area · 2e01d179
      Ingo Molnar 提交于
      Leave the input fd at the data area.
      
      It does not matter right now - but seeking at the end of it
      certainly did not make sense.
      
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      2e01d179
    • I
      perf trace: Fix parsing of perf.data · 8886f42d
      Ingo Molnar 提交于
      We started parsing perf.data at head 0. This caused -D to
      segfault and it could possibly also case incorrect trace
      entries to be displayed.
      
      Parse it at data_offset instead.
      
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      8886f42d
    • I
      perf trace: Sample timestamps as well · 6ddf259d
      Ingo Molnar 提交于
      Before:
      
                  perf-21082 [013]     0.000000: sched_wakeup_new: task perf:21083 [120] success=1 [015]
                  perf-21082 [013]     0.000000: sched_migrate_task: task perf:21082 [120] from: 13  to: 15
                  perf-21082 [013]     0.000000: sched_process_fork: parent perf:21082  child perf:21083
                  true-21083 [015]     0.000000: sched_wakeup: task migration/15:33 [0] success=1 [015]
                  perf-21082 [013]     0.000000: sched_switch: task perf:21082 [120] (S) ==> swapper:0 [140]
                  true-21083 [015]     0.000000: sched_switch: task perf:21083 [120] (R) ==> migration/15:33 [0]
                  true-21083 [011]     0.000000: sched_process_exit: task true:21083 [120]
      
      After:
      
                  perf-21082 [013] 14674.797613: sched_wakeup_new: task perf:21083 [120] success=1 [015]
                  perf-21082 [013] 14674.797506: sched_migrate_task: task perf:21082 [120] from: 13  to: 15
                  perf-21082 [013] 14674.797610: sched_process_fork: parent perf:21082  child perf:21083
                  true-21083 [015] 14674.797725: sched_wakeup: task migration/15:33 [0] success=1 [015]
                  perf-21082 [013] 14674.797722: sched_switch: task perf:21082 [120] (S) ==> swapper:0 [140]
                  true-21083 [015] 14674.797729: sched_switch: task perf:21083 [120] (R) ==> migration/15:33 [0]
                  true-21083 [011] 14674.798159: sched_process_exit: task true:21083 [120]
      
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      6ddf259d
    • I
      perf trace: Sample the CPU too · cd6feeea
      Ingo Molnar 提交于
      Sample, record, parse and print the CPU field - it had all zeroes before.
      
      Before (watch the second column, the CPU values):
      
                  perf-32685 [000]     0.000000: sched_wakeup_new: task perf:32686 [120] success=1 [011]
                  perf-32685 [000]     0.000000: sched_migrate_task: task perf:32685 [120] from: 1  to: 11
                  perf-32685 [000]     0.000000: sched_process_fork: parent perf:32685  child perf:32686
                  true-32686 [000]     0.000000: sched_wakeup: task migration/11:25 [0] success=1 [011]
                  true-32686 [000]     0.000000: sched_wakeup: task distccd:12793 [125] success=1 [015]
                  true-32686 [000]     0.000000: sched_wakeup: task distccd:12793 [125] success=1 [015]
                  perf-32685 [000]     0.000000: sched_switch: task perf:32685 [120] (S) ==> swapper:0 [140]
                  true-32686 [000]     0.000000: sched_switch: task perf:32686 [120] (R) ==> migration/11:25 [0]
                  true-32686 [000]     0.000000: sched_switch: task perf:32686 [120] (R) ==> distccd:12793 [125]
                  true-32686 [000]     0.000000: sched_switch: task true:32686 [120] (R) ==> distccd:12793 [125]
                  true-32686 [000]     0.000000: sched_process_exit: task true:32686 [120]
                  true-32686 [000]     0.000000: sched_stat_wait: task: distccd:12793 wait: 6767985949080 [ns]
                  true-32686 [000]     0.000000: sched_stat_wait: task: distccd:12793 wait: 6767986139446 [ns]
                  true-32686 [000]     0.000000: sched_stat_sleep: task: distccd:12793 sleep: 132844 [ns]
                  true-32686 [000]     0.000000: sched_stat_sleep: task: distccd:12793 sleep: 131724 [ns]
      
      After:
      
                  perf-32685 [001]     0.000000: sched_wakeup_new: task perf:32686 [120] success=1 [011]
                  perf-32685 [001]     0.000000: sched_migrate_task: task perf:32685 [120] from: 1  to: 11
                  perf-32685 [001]     0.000000: sched_process_fork: parent perf:32685  child perf:32686
                  true-32686 [011]     0.000000: sched_wakeup: task migration/11:25 [0] success=1 [011]
                  true-32686 [015]     0.000000: sched_wakeup: task distccd:12793 [125] success=1 [015]
                  true-32686 [015]     0.000000: sched_wakeup: task distccd:12793 [125] success=1 [015]
                  perf-32685 [001]     0.000000: sched_switch: task perf:32685 [120] (S) ==> swapper:0 [140]
                  true-32686 [011]     0.000000: sched_switch: task perf:32686 [120] (R) ==> migration/11:25 [0]
                  true-32686 [015]     0.000000: sched_switch: task perf:32686 [120] (R) ==> distccd:12793 [125]
                  true-32686 [015]     0.000000: sched_switch: task true:32686 [120] (R) ==> distccd:12793 [125]
                  true-32686 [015]     0.000000: sched_process_exit: task true:32686 [120]
                  true-32686 [015]     0.000000: sched_stat_wait: task: distccd:12793 wait: 6767985949080 [ns]
                  true-32686 [015]     0.000000: sched_stat_wait: task: distccd:12793 wait: 6767986139446 [ns]
                  true-32686 [015]     0.000000: sched_stat_sleep: task: distccd:12793 sleep: 132844 [ns]
                  true-32686 [015]     0.000000: sched_stat_sleep: task: distccd:12793 sleep: 131724 [ns]
      
      So we can now see how this workload migrated between CPUs.
      
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Li Zefan <lizf@cn.fujitsu.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      cd6feeea
  4. 02 9月, 2009 2 次提交
    • I
      perf tools: Work around strict aliasing related warnings · 65014ab3
      Ingo Molnar 提交于
      Older versions of GCC are rather stupid about strict aliasing:
      
        util/trace-event-parse.c: In function 'parse_cmdlines':
        util/trace-event-parse.c:93: warning: dereferencing type-punned pointer will break strict-aliasing rules
        util/trace-event-parse.c: In function 'parse_proc_kallsyms':
        util/trace-event-parse.c:155: warning: dereferencing type-punned pointer will break strict-aliasing rules
        util/trace-event-parse.c:157: warning: dereferencing type-punned pointer will break strict-aliasing rules
        util/trace-event-parse.c:158: warning: dereferencing type-punned pointer will break strict-aliasing rules
        util/trace-event-parse.c: In function 'parse_ftrace_printk':
        util/trace-event-parse.c:294: warning: dereferencing type-punned pointer will break strict-aliasing rules
        util/trace-event-parse.c:295: warning: dereferencing type-punned pointer will break strict-aliasing rules
        make: *** [util/trace-event-parse.o] Error 1
      
      Make it clear to GCC that we intend with those pointers, by passing
      them through via an explicit (void *) cast.
      
      We might want to add -fno-strict-aliasing as well, like the kernel
      itself does.
      
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      65014ab3
    • I
      perf tools: Clean up warnings list in the Makefile · 61562445
      Ingo Molnar 提交于
      Make it easier to turn warnings on/off by using a separate
      line for each warning added.
      
      Some of the warnings have too much of a nuisance factor and
      we might want to turn them off in the future.
      
      Cc: Arjan van de Ven <arjan@infradead.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      61562445
  5. 31 8月, 2009 5 次提交
    • F
      perf tools: Complete support for dynamic strings · 561f732c
      Frederic Weisbecker 提交于
      Complete support for __str_loc type strings of ftrace events
      which have dynamic offsets values set for each of them inside
      their sammples.
      
      Before:
              geany-5759  [000]     0.000000: lock_release: name
              geany-5759  [000]     0.000000: lock_release: name
              geany-5759  [000]     0.000000: lock_release: name
        kondemand/0-362   [000]     0.000000: lock_release: name
            pdflush-421   [000]     0.000000: lock_release: name
      
      After:
              geany-5759  [000]     0.000000: lock_release: &u->lock
              geany-5759  [000]     0.000000: lock_release: key
              geany-5759  [000]     0.000000: lock_release: &group->notification_mutex
        kondemand/0-362   [000]     0.000000: lock_release: &rq->lock
            pdflush-421   [000]     0.000000: lock_release: &rq->lock
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      LKML-Reference: <1251693921-6579-4-git-send-email-fweisbec@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      561f732c
    • F
      perf tools: Unify swapper tasks naming · 9b8055a5
      Frederic Weisbecker 提交于
      In perf tools, we hardcode the pid 0 cmdline resolving to
      "idle" because the init task is not included in the COMM
      events.
      
      But the idle tasks secondary cpus are resolved into their
      "init" name through the COMM events.
      
      We have then such strange result in perf report (ditto with
      trace):
      
          19.66%       init    [kernel]          [k] acpi_idle_enter_c1
          17.32%       [idle]  [kernel]          [k] acpi_idle_enter_c1
      
      It's then better to unify the swapper tasks into a single init
      name.
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      LKML-Reference: <1251693921-6579-3-git-send-email-fweisbec@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      9b8055a5
    • F
      perf tools: Resolve idle thread cmdline for perf trace · 3a2684ca
      Frederic Weisbecker 提交于
      The cmd-trace tool used the cmdline file and resolved the idle
      thread using a hardcoded check for the 0 task pid.
      
      Now we have a centralized way to do that from perf using
      register_idle_thread() API.
      
      Before:
      	:0-0     [000]     0.000000: irq_handler_entry: irq=0 handler=name
      	:0-0     [000]     0.000000: irq_handler_entry: irq=0 handler=name
      
      After:
      	[idle]-0     [000]     0.000000: irq_handler_entry: irq=0 handler=name
      	[idle]-0     [000]     0.000000: irq_handler_entry: irq=0 handler=name
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      LKML-Reference: <1251693921-6579-2-git-send-email-fweisbec@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      3a2684ca
    • F
      perf tools: Librarize idle thread registration · 5b447a6a
      Frederic Weisbecker 提交于
      Librarize register_idle_thread() used by annotate and report.
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      LKML-Reference: <1251693921-6579-1-git-send-email-fweisbec@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      5b447a6a
    • F
      perf tools: Add missing parameters documentation · ec7ba4ea
      Frederic Weisbecker 提交于
      Add missing documentation for the following parameters:
      
      - perf record -R
      - perf report -g
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      LKML-Reference: <1251682323-10395-1-git-send-email-fweisbec@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      ec7ba4ea
  6. 28 8月, 2009 3 次提交
    • P
      perf tools: do not complain if root is owning perf.data · 119e7a22
      Pierre Habouzit 提交于
      This improves patch fa6963b2 so that perf.data stuff that has
      been dumped as root can be read (annotate/report) by a user
      without the use of the --force.
      
      Rationale is that root has plenty of ways to screw us (usually)
      that do not require twisted schemes involving specially
      crafting a perf.data.
      Signed-off-by: NPierre Habouzit <pierre.habouzit@intersec.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: <stable@kernel.org>
      LKML-Reference: <20090827075902.GF19653@laphroaig.corp>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      119e7a22
    • F
      perf tools: Fix missing string field printing in perf trace · d498bc1f
      Frederic Weisbecker 提交于
      Some string fields are not printed because of a missing printf
      in the post-processing.
      
      Before:
      	    perf-10070 [000]     0.000000: sched_switch: task :10070 [120] (R) ==> :5720 [120]
                 geany-5720  [000]     0.000000: sched_switch: task :5720 [120] (S) ==> :10070 [120]
                  perf-10070 [000]     0.000000: sched_switch: task :10070 [120] (R) ==> :5720 [120]
                 geany-5720  [000]     0.000000: sched_switch: task :5720 [120] (S) ==> :10070 [120]
                <idle>-0     [000]     0.000000: sched_switch: task :0 [140] (R) ==> :361 [115]
      
      After:
      	    perf-10070 [000]     0.000000: sched_switch: task perf:10070 [120] (R) ==> geany:5720 [120]
                 geany-5720  [000]     0.000000: sched_switch: task geany:5720 [120] (S) ==> perf:10070 [120]
                  perf-10070 [000]     0.000000: sched_switch: task perf:10070 [120] (R) ==> geany:5720 [120]
                 geany-5720  [000]     0.000000: sched_switch: task geany:5720 [120] (S) ==> perf:10070 [120]
                <idle>-0     [000]     0.000000: sched_switch: task swapper:0 [140] (R) ==> kondemand/1:361 [115]
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      LKML-Reference: <1251427567-10551-2-git-send-email-fweisbec@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      d498bc1f
    • F
      perf tools: Only save the event formats we need · 1ef2ed10
      Frederic Weisbecker 提交于
      While opening a trace event counter, every events are saved in
      the trace.info file. But we only want to save the
      specifications of the events we are using.
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      LKML-Reference: <1251421798-9101-1-git-send-email-fweisbec@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      1ef2ed10
  7. 27 8月, 2009 1 次提交
  8. 22 8月, 2009 1 次提交
    • M
      perf trace: Add OPT_END to option array of perf-trace · 1909629f
      Masami Hiramatsu 提交于
      Add OPT_END to option array of perf-trace for fixing a SEGV bug when
      showing perf-trace help message.
      
      Without this patch;
       ./perf trace -h
      
       usage: perf trace [<options>] <command>
      
          -D, --dump-raw-trace  dump raw trace in ASCII
          -v, --verbose         be more verbose (show symbol address, etc)
          -f, Segmentation fault
      
      With this patch:
       ./perf trace -h
      
       usage: perf trace [<options>] <command>
      
          -D, --dump-raw-trace  dump raw trace in ASCII
          -v, --verbose         be more verbose (show symbol address, etc)
      Signed-off-by: NMasami Hiramatsu <mhiramat@redhat.com>
      Cc: systemtap <systemtap@sources.redhat.com>
      Cc: DLE <dle-develop@lists.sourceforge.net>
      Cc: Masami Hiramatsu <mhiramat@redhat.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
      Cc: Zhaolei <zhaolei@cn.fujitsu.com>
      Cc: Li Zefan <lizf@cn.fujitsu.com>
      Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <20090821185603.11039.62109.stgit@localhost.localdomain>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      1909629f
  9. 19 8月, 2009 2 次提交
    • P
      perf tools: Check perf.data owner · fa6963b2
      Peter Zijlstra 提交于
      Add an owner check to opening perf.data files and a switch to
      silence it.
      
      Because perf-report/perf-annotate are binary parsers reading
      another users' perf.data file could be a security risk if the
      file were explicitly engineered to trigger bugs in the parser
      (we hope of course there are non such bugs, but you never
      know).
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      LKML-Reference: <20090819092023.896648538@chello.nl>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      fa6963b2
    • K
      perf tools: Make 'make html' work · b395cd8a
      Kyle McMartin 提交于
      pushd tools/perf/Documentation
      make html
      popd
      
      is failing for me...
      
          ASCIIDOC perf-annotate.html
      ERROR: unsafe: include file: /etc/asciidoc/./stylesheets/xhtml11.css
      ERROR: unsafe: include file:
      /etc/asciidoc/./stylesheets/xhtml11-manpage.css
      ERROR: unsafe: include file:
      /etc/asciidoc/./stylesheets/xhtml11-quirks.css
      make: *** [perf-annotate.html] Error 1
      
      Apparently asciidoc "unsafe" is the default mode of operation
      in practice.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=506953
      
      Works tidily now.
      Signed-off-by: NKyle McMartin <kyle@redhat.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <20090818164125.GM25206@bombadil.infradead.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      b395cd8a
  10. 18 8月, 2009 8 次提交
    • F
      perf tools: Save partial non-overlapping map · 6e086437
      Frederic Weisbecker 提交于
      The librarization of the thread helpers between annotate and
      report lost some perf report specifics.
      
      thread__insert_map() had its most uptodate version in perf
      report which cared about partial map overlapping. In case of
      overlap between two maps, perf annotate's version removes the
      whole old map without considering if it partially or
      absolutely overlaps the new map.
      
      We exported the odd version, change it by using the perf
      report version.
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Mike Galbraith <efault@gmx.de>
      LKML-Reference: <1250607843-7395-1-git-send-email-fweisbec@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      6e086437
    • F
      perf tools: Fix comm column adjusting · 4273b005
      Frederic Weisbecker 提交于
      The librarization of the thread helpers between annotate and
      report lost some perf report specifics.
      
      This patch fixes the thread comm column adjusting that has
      been omitted during this export.
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Mike Galbraith <efault@gmx.de>
      LKML-Reference: <1250604226-6852-1-git-send-email-fweisbec@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      4273b005
    • I
      perf annotate: Fix segmentation fault · 15f3fa4e
      Ingo Molnar 提交于
      Linus reported this perf annotate segfault:
      
              [torvalds@nehalem git]$ perf annotate unmap_vmas
              Segmentation fault
      
             	#0  map__clone (self=<value optimized out>) at builtin-annotate.c:236
             	#1  thread__fork (self=<value optimized out>) at builtin-annotate.c:372
      
      The bug here was that builtin-annotate.c was a copy of
      builtin-report.c and a threading related fix to builtin-report.c
      didnt get propagated to builtin-annotate.c ...
      Reported-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      15f3fa4e
    • I
      perf tools: Remove obsolete defines · 1f18345b
      Ingo Molnar 提交于
      The _XOPEN_SOURCE* defines are not really needed on Linux and
      it's not like we'll port this to AIX ;-)
      
      The define also broke the build with gcc 4.4.1:
      
       CC util/trace-event-parse.o
       In file included from util/trace-event-parse.c:32:
       util/util.h:43:1: error: "_XOPEN_SOURCE" redefined
      
      So remove them.
      
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      1f18345b
    • F
      perf tools: Make trace event format parser aware of cast to pointers · 3f9edc23
      Frederic Weisbecker 提交于
      The ftrace event format parser handles the usual casts but not
      the cast to pointers. Such casts have been introduced recently
      with the module trace events and raise the following parsing
      error:
      
      	Fatal: bad op token )
      
      This is because it considers the "*" character as a binary
      operator. Make it then aware of casts to pointers.
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      LKML-Reference: <1250543271-8383-4-git-send-email-fweisbec@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      3f9edc23
    • F
      perf tools: Record events info also when :record suffix is used. · 9df37ddd
      Frederic Weisbecker 提交于
      You can enable a counter's PERF_SAMPLE_RAW attribute in two
      fashions:
      
      - using the -R option (every counters get PERF_SAMPLE_RAW)
      - using the :record suffix in a trace event counter name
      
      Currently we record the events info in a trace.info file from
      perf record when the former method is used but we omit it with
      the latter.
      
      Check both situations.
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      LKML-Reference: <1250543271-8383-3-git-send-email-fweisbec@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      9df37ddd
    • F
      perf tools: Warn while running perf trace without sample · 4bf2364a
      Frederic Weisbecker 提交于
      When a user runs perf trace using an input with logged
      counters without PERF_SAMPLE_RAW attribute, warn by giving a
      nice tip.
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      LKML-Reference: <1250543271-8383-2-git-send-email-fweisbec@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      4bf2364a
    • F
      perf tools: Fix spelling mistake in callchain error · 6ede59c4
      Frederic Weisbecker 提交于
      While running perf report -g in a perf.data file that hasn't
      been recorded in callchain mode, the error reported has a
      spelling issue:
      
      	./perf report -g
      	selected -c but no callchain data. Did you call perf record without -g?
      
      Fix it.
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      LKML-Reference: <1250543271-8383-1-git-send-email-fweisbec@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      6ede59c4
  11. 17 8月, 2009 6 次提交
    • F
      perf tools: Add perf trace · 5f9c39dc
      Frederic Weisbecker 提交于
      This adds perf trace into the set of perf tools.
      
      It is written to fetch the tracepoint samples from perf events
      and display them, according to the events information given by
      the debugfs files through the util/trace* tools.
      
      It is a rough first shot and doesn't yet handle the cpu,
      timestamps fields and some other things.
      
      Example:
      
       perf record -f -e workqueue:workqueue_execution:record -F 1 -a
       perf trace
      
             kblockd/0-236   [000]     0.000000: workqueue_execution: thread=:236 func=cfq_kick_queue+0x0
           kondemand/0-360   [000]     0.000000: workqueue_execution: thread=:360 func=do_dbs_timer+0x0
           kondemand/0-360   [000]     0.000000: workqueue_execution: thread=:360 func=do_dbs_timer+0x0
           kondemand/1-361   [000]     0.000000: workqueue_execution: thread=:361 func=do_dbs_timer+0x0
           kondemand/1-361   [000]     0.000000: workqueue_execution: thread=:361 func=do_dbs_timer+0x0
           kondemand/1-361   [000]     0.000000: workqueue_execution: thread=:361 func=do_dbs_timer+0x0
           kondemand/1-361   [000]     0.000000: workqueue_execution: thread=:361 func=do_dbs_timer+0x0
           kondemand/1-361   [000]     0.000000: workqueue_execution: thread=:361 func=do_dbs_timer+0x0
           kondemand/1-361   [000]     0.000000: workqueue_execution: thread=:361 func=do_dbs_timer+0x0
           kondemand/1-361   [000]     0.000000: workqueue_execution: thread=:361 func=do_dbs_timer+0x0
           kondemand/1-361   [000]     0.000000: workqueue_execution: thread=:361 func=do_dbs_timer+0x0
           kondemand/1-361   [000]     0.000000: workqueue_execution: thread=:361 func=do_dbs_timer+0x0
           kondemand/1-361   [000]     0.000000: workqueue_execution: thread=:361 func=do_dbs_timer+0x0
           kondemand/1-361   [000]     0.000000: workqueue_execution: thread=:361 func=do_dbs_timer+0x0
           kondemand/1-361   [000]     0.000000: workqueue_execution: thread=:361 func=do_dbs_timer+0x0
           kondemand/1-361   [000]     0.000000: workqueue_execution: thread=:361 func=do_dbs_timer+0x0
      
      Todo:
      
      - A lot of things!
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: "Luis Claudio R. Goncalves" <lclaudio@uudg.org>
      Cc: Clark Williams <williams@redhat.com>
      Cc: Jon Masters <jonathan@jonmasters.org>
      Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
      Cc: Zhaolei <zhaolei@cn.fujitsu.com>
      Cc: Li Zefan <lizf@cn.fujitsu.com>
      Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
      Cc: Masami Hiramatsu <mhiramat@redhat.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      Cc: "Frank Ch. Eigler" <fche@redhat.com>
      Cc: Roland McGrath <roland@redhat.com>
      Cc: Jason Baron <jbaron@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Jiaying Zhang <jiayingz@google.com>
      Cc: Anton Blanchard <anton@samba.org>
      LKML-Reference: <1250518688-7207-4-git-send-email-fweisbec@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      5f9c39dc
    • S
      perf tools: Add trace event information parser · ea4010d1
      Steven Rostedt 提交于
      Add util/trace-event-parse.c which provides the handlers to
      parse the ftrace events info from the stream and handles the
      ftrace perf samples event printing.
      
      This file is a rename of the parse-events.c file from the
      trace-cmd tools, written by Steven Rostedt and Josh Triplett,
      originated from the git tree:
      
        git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git
      
      This is a perf tools integration.
      
      [ fweisbec@gmail.com: various changes for perf tools
                            integration. ]
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: "Luis Claudio R. Goncalves" <lclaudio@uudg.org>
      Cc: Clark Williams <williams@redhat.com>
      Cc: Jon Masters <jonathan@jonmasters.org>
      Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
      Cc: Zhaolei <zhaolei@cn.fujitsu.com>
      Cc: Li Zefan <lizf@cn.fujitsu.com>
      Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
      Cc: Masami Hiramatsu <mhiramat@redhat.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      Cc: "Frank Ch. Eigler" <fche@redhat.com>
      Cc: Roland McGrath <roland@redhat.com>
      Cc: Jason Baron <jbaron@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Jiaying Zhang <jiayingz@google.com>
      Cc: Anton Blanchard <anton@samba.org>
      LKML-Reference: <1250518688-7207-3-git-send-email-fweisbec@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      ea4010d1
    • S
      perf tools: Add trace event debugfs stream reader · 538bafb5
      Steven Rostedt 提交于
      Add util/trace-event-read.c which handles trace events
      informations reading.
      
      This file is a rename of the trace-read.c file from the
      trace-cmd tools, written by Steven Rostedt and Josh Triplett,
      originated from the git tree:
      
         git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git
      
      This is its perf tools integration.
      
      [ fweisbec@gmail.com: various changes for perf tools
                            integration. ]
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: "Luis Claudio R. Goncalves" <lclaudio@uudg.org>
      Cc: Clark Williams <williams@redhat.com>
      Cc: Jon Masters <jonathan@jonmasters.org>
      Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
      Cc: Zhaolei <zhaolei@cn.fujitsu.com>
      Cc: Li Zefan <lizf@cn.fujitsu.com>
      Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
      Cc: Masami Hiramatsu <mhiramat@redhat.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      Cc: "Frank Ch. Eigler" <fche@redhat.com>
      Cc: Roland McGrath <roland@redhat.com>
      Cc: Jason Baron <jbaron@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Jiaying Zhang <jiayingz@google.com>
      Cc: Anton Blanchard <anton@samba.org>
      LKML-Reference: <1250518688-7207-2-git-send-email-fweisbec@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      538bafb5
    • S
      perf tools: Add trace event debugfs IO handler · 52050943
      Steven Rostedt 提交于
      Add util/trace-event-info.c which handles ftrace file IO from
      debugfs and provides general helpers to fetch/save ftrace
      events informations.
      
      This file is a rename of the trace-cmd.c file from the
      trace-cmd tools, written by Steven Rostedt and Josh Triplett,
      originated from the git tree:
      
        git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git
      
      This is a perf tools integration.
      
      For now, ftrace events information is saved in a separate file
      than the standard perf.data
      
      [fweisbec@gmail.com: various changes for perf tools integration]
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: "Luis Claudio R. Goncalves" <lclaudio@uudg.org>
      Cc: Clark Williams <williams@redhat.com>
      Cc: Jon Masters <jonathan@jonmasters.org>
      Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
      Cc: Zhaolei <zhaolei@cn.fujitsu.com>
      Cc: Li Zefan <lizf@cn.fujitsu.com>
      Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
      Cc: Masami Hiramatsu <mhiramat@redhat.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      Cc: "Frank Ch. Eigler" <fche@redhat.com>
      Cc: Roland McGrath <roland@redhat.com>
      Cc: Jason Baron <jbaron@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Jiaying Zhang <jiayingz@google.com>
      Cc: Anton Blanchard <anton@samba.org>
      LKML-Reference: <1250518688-7207-1-git-send-email-fweisbec@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      52050943
    • C
      perf: Rename perf-examples.txt to examples.txt · 2932cffc
      Carlos R. Mafra 提交于
      Rename it to examples.txt to avoid the perf-*.txt pattern in
      the Makefile, otherwise 'make doc' fails because
      perf-examples.txt is not formatted to be a man page:
      
       ERROR: perf-examples.txt: line 1: manpage document title is mandatory
      Signed-off-by: NCarlos R. Mafra <crmafra@gmail.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      LKML-Reference: <new-submission>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      2932cffc
    • F
      perf tools: Librarize trace_event() helper · 8f28827a
      Frederic Weisbecker 提交于
      Librarize trace_event() helper so that perf trace can use it
      too. Also clean up the debug.h includes a bit.
      
      It's not good to have it included in perf.h because it doesn't
      make it flexible against other headers it may need (headers
      that can also depend on perf.h and then create a recursive
      header dependency).
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Mike Galbraith <efault@gmx.de>
      LKML-Reference: <1250453149-664-1-git-send-email-fweisbec@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      8f28827a