1. 17 8月, 2009 8 次提交
    • 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
    • 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
    • F
      perf tools: Librarize sample type and attr finding from headers · 0d3a5c88
      Frederic Weisbecker 提交于
      Librarize the sample type and attr fetching from perf data file
      headers so that we can also use it from perf trace.
      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: <1250448997-30715-1-git-send-email-fweisbec@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      0d3a5c88
    • F
      perf tools: Put the show mode into the event headers files · 0f25bfc8
      Frederic Weisbecker 提交于
      Annotate and report share the same flags to filter events
      considering their context (kernel, user, hypervisor).
      
      Both tools have their own definitions of these flags. Factorize
      them out into the event headers file.
      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: <1250445414-29237-1-git-send-email-fweisbec@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      0f25bfc8
    • F
      perf tools: Factorize the dprintf definition · 2cec19d9
      Frederic Weisbecker 提交于
      We have two users of dprintf: report and annotate. Another one
      is coming with perf trace. Then factorize it into the debug
      file.
      
      While at it, rename dprintf() to dump_printf() so that it
      doesn't conflicts with its libc homograph.
      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: <1250443461-28130-1-git-send-email-fweisbec@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      2cec19d9
  2. 16 8月, 2009 3 次提交
    • F
      perf tools: Substract -Wformat-nonliteral from Wformat=2 in extra flags · 0d31b82d
      Frederic Weisbecker 提交于
      The soon coming perf trace needs to use printf with dynamically
      built formats.
      
      But we are using -Wformat=2 which is a shortcut for the
      following set: -Wformat -Wformat-security -Wformat-y2k
      -Wformat-nonliteral
      
      -Wformat-nonliteral warns when it can't check formats because
      they are not builtin constant strings, but we want to feature
      dynamic formats. What we want instead is Wformat=2 minus
      -Wformat-nonliteral, which is what this patch does.
      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: <1250437927-25490-1-git-send-email-fweisbec@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      0d31b82d
    • I
      perf: Build with stack-protector and with -D_FORTIFY_SOURCE=2 · 35ba15b7
      Ingo Molnar 提交于
      Up our defences a bit.
      Suggested-by: NArjan 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>
      35ba15b7
    • I
      perf: Enable more compiler warnings · 83a0944f
      Ingo Molnar 提交于
      Related to a shadowed variable bug fix Valdis Kletnieks noticed
      that perf does not get built with -Wshadow, which could have
      helped us avoid the bug.
      
      So enable -Wshadow and also enable the following warnings on
      perf builds, in addition to the already enabled -Wall -Wextra
      -std=gnu99 warnings:
      
       -Wcast-align
       -Wformat=2
       -Wshadow
       -Winit-self
       -Wpacked
       -Wredundant-decls
       -Wstack-protector
       -Wstrict-aliasing=3
       -Wswitch-default
       -Wswitch-enum
       -Wno-system-headers
       -Wundef
       -Wvolatile-register-var
       -Wwrite-strings
       -Wbad-function-cast
       -Wmissing-declarations
       -Wmissing-prototypes
       -Wnested-externs
       -Wold-style-definition
       -Wstrict-prototypes
       -Wdeclaration-after-statement
      
      And change/fix the perf code to build cleanly under GCC 4.3.2.
      
      The list of warnings enablement is rather arbitrary: it's based
      on my (quick) reading of the GCC manpages and trying them on
      perf.
      
      I categorized the warnings based on individually enabling them
      and looking whether they trigger something in the perf build.
      If i liked those warnings (i.e. if they trigger for something
      that arguably could be improved) i enabled the warning.
      
      If the warnings seemed to come from language laywers spamming
      the build with tons of nuisance warnings i generally kept them
      off. Most of the sign conversion related warnings were in
      this category. (A second patch enabling some of the sign
      warnings might be welcome - sign bugs can be nasty.)
      
      I also kept warnings that seem to make sense from their manpage
      description and which produced no actual warnings on our code
      base. These warnings might still be turned off if they end up
      being a nuisance.
      
      I also left out a few warnings that are not supported in older
      compilers.
      
      [ Note that these changes might break the build on older
        compilers i did not test, or on non-x86 architectures that
        produce different warnings, so more testing would be welcome. ]
      
      Reported-by: Valdis.Kletnieks@vt.edu
      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>
      83a0944f
  3. 15 8月, 2009 4 次提交
  4. 14 8月, 2009 9 次提交
  5. 13 8月, 2009 16 次提交
    • P
      perf_counter: Report the cloning task as parent on perf_counter_fork() · 94d5d1b2
      Peter Zijlstra 提交于
      A bug in (9f498cc5: perf_counter: Full task tracing) makes
      profiling multi-threaded apps it go belly up.
      
      [ output as: (PID:TID):(PPID:PTID) ]
      
       # ./perf report -D | grep FORK
      0x4b0 [0x18]: PERF_EVENT_FORK: (3237:3237):(3236:3236)
      0xa10 [0x18]: PERF_EVENT_FORK: (3237:3238):(3236:3236)
      0xa70 [0x18]: PERF_EVENT_FORK: (3237:3239):(3236:3236)
      0xad0 [0x18]: PERF_EVENT_FORK: (3237:3240):(3236:3236)
      0xb18 [0x18]: PERF_EVENT_FORK: (3237:3241):(3236:3236)
      
      Shows us that the test (27d028de perf report: Update for the new
      FORK/EXIT events) in builtin-report.c:
      
              /*
               * A thread clone will have the same PID for both
               * parent and child.
               */
              if (thread == parent)
                      return 0;
      
      Will clearly fail.
      
      The problem is that perf_counter_fork() reports the actual
      parent, instead of the cloning thread.
      
      Fixing that (with the below patch), yields:
      
       # ./perf report -D | grep FORK
      0x4c8 [0x18]: PERF_EVENT_FORK: (1590:1590):(1589:1589)
      0xbd8 [0x18]: PERF_EVENT_FORK: (1590:1591):(1590:1590)
      0xc80 [0x18]: PERF_EVENT_FORK: (1590:1592):(1590:1590)
      0x3338 [0x18]: PERF_EVENT_FORK: (1590:1593):(1590:1590)
      0x66b0 [0x18]: PERF_EVENT_FORK: (1590:1594):(1590:1590)
      
      Which both makes more sense and doesn't confuse perf report
      anymore.
      Reported-by: NPekka Enberg <penberg@cs.helsinki.fi>
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: paulus@samba.org
      Cc: Anton Blanchard <anton@samba.org>
      Cc: Arjan van de Ven <arjan@infradead.org>
      LKML-Reference: <1250172882.5241.62.camel@twins>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      94d5d1b2
    • P
      perf_counter: Fix an ipi-deadlock · 970892a9
      Peter Zijlstra 提交于
      perf_pending_counter() is called from IRQ context and will call
      perf_counter_disable(), however perf_counter_disable() uses
      smp_call_function_single() which doesn't fancy being used with
      IRQs disabled due to IPI deadlocks.
      
      Fix this by making it use the local __perf_counter_disable()
      call and teaching the counter_sched_out() code about pending
      disables as well.
      
      This should cover the case where a counter migrates before the
      pending queue gets processed.
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Corey J Ashford <cjashfor@us.ibm.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: stephane eranian <eranian@googlemail.com>
      LKML-Reference: <20090813103655.244097721@chello.nl>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      970892a9
    • P
      perf: Rework/fix the whole read vs group stuff · 3dab77fb
      Peter Zijlstra 提交于
      Replace PERF_SAMPLE_GROUP with PERF_SAMPLE_READ and introduce
      PERF_FORMAT_GROUP to deal with group reads in a more generic
      way.
      
      This allows you to get group reads out of read() as well.
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Corey J Ashford <cjashfor@us.ibm.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: stephane eranian <eranian@googlemail.com>
      LKML-Reference: <20090813103655.117411814@chello.nl>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      3dab77fb
    • P
      perf_counter: Fix swcounter context invariance · bcfc2602
      Peter Zijlstra 提交于
      perf_swcounter_is_counting() uses a lock, which means we cannot
      use swcounters from NMI or when holding that particular lock,
      this is unintended.
      
      The below removes the lock, this opens up race window, but not
      worse than the swcounters already experience due to RCU
      traversal of the context in perf_swcounter_ctx_event().
      
      This also fixes the hard lockups while opening a lockdep
      tracepoint counter.
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Acked-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: stephane eranian <eranian@googlemail.com>
      Cc: Corey J Ashford <cjashfor@us.ibm.com>
      LKML-Reference: <1250149915.10001.66.camel@twins>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      bcfc2602
    • A
      perf report: Don't show unresolved DSOs and symbols when -S/-d is used · 8fd101f2
      Arnaldo Carvalho de Melo 提交于
      We're interested in just those symbols/DSOs, so filter out the
      unresolved ones.
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      LKML-Reference: <20090812211957.GE3495@ghostprotocols.net>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      8fd101f2
    • F
      perf tools: Add a general option to enable raw sample records · daac07b2
      Frederic Weisbecker 提交于
      While we can enable the perf sample records per tracepoint
      counter, we may also want to enable this option for every
      tracepoint counters to open, so that we don't need to add a
      :record flag for all of them.
      
      Add the -R, --raw-samples options for this purpose.
      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: <1250152039-7284-2-git-send-email-fweisbec@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      daac07b2
    • F
      perf tools: Add a per tracepoint counter attribute to get raw sample · 3a9f131f
      Frederic Weisbecker 提交于
      Add a new flag field while opening a tracepoint perf counter:
      
      	-e tracepoint_subsystem:tracepoint_name:flags
      
      This is intended to be generic although for now it only supports the
      r[e[c[o[r[d]]]]] flag:
      
      	./perf record -e workqueue:workqueue_insertion:record
      	./perf record -e workqueue:workqueue_insertion:r
      
      will have the same effect: enabling the raw samples record for
      the given tracepoint counter.
      
      In the future, we may want to support further flags, separated
      by commas.
      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: <1250152039-7284-1-git-send-email-fweisbec@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      3a9f131f
    • I
      perf_counter: Provide hw_perf_counter_setup_online() APIs · 28402971
      Ingo Molnar 提交于
      Provide weak aliases for hw_perf_counter_setup_online(). This is
      used by the BTS patches (for v2.6.32), but it interacts with
      fixes so propagate this upstream. (it has no effect as of yet)
      
      Also export perf_counter_output() to architecture code.
      
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      28402971
    • A
      perf list: Fix large list output by using the pager · 8f7a0dc5
      Arnaldo Carvalho de Melo 提交于
      When /sys/kernel/debug is mounted the list can be imense, so
      use the pager like the other tools.
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Acked-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      LKML-Reference: <20090812174459.GB3495@ghostprotocols.net>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      8f7a0dc5
    • M
      sh: fix i2c init order on ap325rxa V2 · dbefd606
      Magnus Damm 提交于
      Convert the AP325RXA board code to register devices at
      arch_initcall() time instead of device_initcall(). This
      fix unbreaks pcf8563 RTC driver support.
      Signed-off-by: NMagnus Damm <damm@igel.co.jp>
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      dbefd606
    • M
      sh: fix i2c init order on Migo-R V2 · ba3a1701
      Magnus Damm 提交于
      Convert the Migo-R board code to register devices at
      arch_initcall() time instead of __initcall(). This fix
      unbreaks migor_ts touch screen driver support.
      Signed-off-by: NMagnus Damm <damm@igel.co.jp>
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      ba3a1701
    • M
      sh: convert processor device setup functions to arch_initcall() · ba9a6337
      Magnus Damm 提交于
      Convert the processor platform device setup
      functions from __initcall() and sometimes
      device_initcall() to arch_initcall().
      
      This makes sure that the platform devices are
      registered a bit earlier so the devices are
      available when drivers register using initcall
      levels earlier than device_initcall().
      
      A good example is platform devices needed by
      i2c-sh_mobile.c which registers a bit earlier
      using subsys_initcall().
      Signed-off-by: NMagnus Damm <damm@igel.co.jp>
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      ba9a6337
    • N
      md: allow upper limit for resync/reshape to be set when array is read-only · 4d484a4a
      NeilBrown 提交于
      Normally we only allow the upper limit for a reshape to be decreased
      when the array not performing a sync/recovery/reshape, otherwise there
      could be races.  But if an array is part-way through a reshape when it
      is assembled the reshape is started immediately leaving no window
      to set an upper bound.
      
      If the array is started read-only, the reshape will be suspended until
      the array becomes writable, so that provides a window during which it
      is perfectly safe to reduce the upper limit of a reshape.
      
      So: allow the upper limit (sync_max) to be reduced even if the reshape
      thread is running, as long as the array is still read-only.
      Signed-off-by: NNeilBrown <neilb@suse.de>
      4d484a4a
    • N
      md/raid5: Properly remove excess drives after shrinking a raid5/6 · 1a67dde0
      NeilBrown 提交于
      We were removing the drives, from the array, but not
      removing symlinks from /sys/.... and not marking the device
      as having been removed.
      Signed-off-by: NNeilBrown <neilb@suse.de>
      1a67dde0
    • N
      md/raid5: make sure a reshape restarts at the correct address. · a639755c
      NeilBrown 提交于
      This "if" don't allow for the possibility that the number of devices
      doesn't change, and so sector_nr isn't set correctly in that case.
      So change '>' to '>='.
      Signed-off-by: NNeilBrown <neilb@suse.de>
      a639755c
    • N
      md/raid5: allow new reshape modes to be restarted in the middle. · 67ac6011
      NeilBrown 提交于
      md/raid5 doesn't allow a reshape to restart if it involves writing
      over the same part of disk that it would be reading from.
      This happens at the beginning of a reshape that increases the number
      of devices, at the end of a reshape that decreases the number of
      devices, and continuously for a reshape that does not change the
      number of devices.
      
      The current code is correct for the "increase number of devices"
      case as the critical section at the start is handled by userspace
      performing a backup.
      
      It does not work for reducing the number of devices, or the
      no-change case.
      For 'reducing', we need to invert the test.  For no-change we cannot
      really be sure things will be safe, so simply require the array
      to be read-only, which is how the user-space code which carefully
      starts such arrays works.
      Signed-off-by: NNeilBrown <neilb@suse.de>
      67ac6011