1. 04 9月, 2009 5 次提交
  2. 03 9月, 2009 8 次提交
    • 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_counter: Introduce new (non-)paranoia level to allow raw tracepoint access · 0fbdea19
      Ingo Molnar 提交于
      I want to sample inherited tracepoint workloads as a normal
      user and the CAP_SYS_ADMIN check prevents me from doing that
      right now.
      
      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>
      0fbdea19
    • I
      Merge branch 'perfcounters/urgent' into perfcounters/core · f76bd108
      Ingo Molnar 提交于
      Merge reason: We are going to modify a place modified by
                    perfcounters/urgent.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      f76bd108
    • 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
  3. 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
  4. 31 8月, 2009 6 次提交
    • 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
    • I
      Merge branch 'perfcounters/tracing' into perfcounters/core · 19c95962
      Ingo Molnar 提交于
      Merge reason: this topic is ready now to merge into the main
                    development branch for .32, with functional
                    perf trace output.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      19c95962
  5. 29 8月, 2009 1 次提交
    • P
      perf_counter: Fix /0 bug in swcounters · eced1dfc
      Peter Zijlstra 提交于
      We have a race in the swcounter stuff where we can start
      counting a counter that has never been enabled, this leads to a
      /0 situation.
      
      The below avoids the /0 but doesn't close the race, this would
      need a new counter state.
      
      The race is due to perf_swcounter_is_counting() which cannot
      discern between disabled due to scheduled out, and disabled for
      any other reason.
      
      Such a crash has been seen by Ingo:
      
      [  967.092372] divide error: 0000 [#1] SMP
      [  967.096499] last sysfs file: /sys/devices/system/cpu/cpu15/cache/index2/shared_cpu_map
      [  967.104846] CPU 5
      [  967.106965] Modules linked in:
      [  967.110169] Pid: 3351, comm: hackbench Not tainted 2.6.31-rc8-tip-01158-gd940a54-dirty #1568 X8DTN
      [  967.119456] RIP: 0010:[<ffffffff810c0aba>]  [<ffffffff810c0aba>] perf_swcounter_ctx_event+0x127/0x1af
      [  967.129137] RSP: 0018:ffff8801a95abd70  EFLAGS: 00010046
      [  967.134699] RAX: 0000000000000002 RBX: ffff8801bd645c00 RCX: 0000000000000002
      [  967.142162] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff8801bd645d40
      [  967.149584] RBP: ffff8801a95abdb0 R08: 0000000000000001 R09: ffff8801a95abe00
      [  967.157042] R10: 0000000000000037 R11: ffff8801aa1245f8 R12: ffff8801a95abe00
      [  967.164481] R13: ffff8801a95abe00 R14: ffff8801aa1c0e78 R15: 0000000000000001
      [  967.171953] FS:  0000000000000000(0000) GS:ffffc90000a00000(0063) knlGS:00000000f7f486c0
      [  967.180406] CS:  0010 DS: 002b ES: 002b CR0: 000000008005003b
      [  967.186374] CR2: 000000004822c0ac CR3: 00000001b19a2000 CR4: 00000000000006e0
      [  967.193770] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      [  967.201224] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
      [  967.208692] Process hackbench (pid: 3351, threadinfo ffff8801a95aa000, task ffff8801a96b0000)
      [  967.217607] Stack:
      [  967.219711]  0000000000000000 0000000000000037 0000000200000001 ffffc90000a1107c
      [  967.227296] <0> ffff8801a95abe00 0000000000000001 0000000000000001 0000000000000037
      [  967.235333] <0> ffff8801a95abdf0 ffffffff810c0c20 0000000200a14f30 ffff8801a95abe40
      [  967.243532] Call Trace:
      [  967.246103]  [<ffffffff810c0c20>] do_perf_swcounter_event+0xde/0xec
      [  967.252635]  [<ffffffff810c0ca7>] perf_tpcounter_event+0x79/0x7b
      [  967.258957]  [<ffffffff81037f73>] ftrace_profile_sched_switch+0xc0/0xcb
      [  967.265791]  [<ffffffff8155f22d>] schedule+0x429/0x4c4
      [  967.271156]  [<ffffffff8100c01e>] int_careful+0xd/0x14
      Reported-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      LKML-Reference: <1251472247.17617.74.camel@laptop>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      eced1dfc
  6. 28 8月, 2009 13 次提交
  7. 27 8月, 2009 5 次提交