1. 16 12月, 2009 1 次提交
    • P
      perf_events: Fix perf_event_attr layout · f13c12c6
      Peter Zijlstra 提交于
      The miss-alignment of bp_addr created a 32bit hole, causing
      different structure packings on 32 and 64 bit machines.
      
      Fix that by moving __reserve_2 into that hole.
      
      Further, remove the useless struct and redundant __bp_reserve
      muck.
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      LKML-Reference: <1260902591.8023.781.camel@laptop>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      f13c12c6
  2. 15 12月, 2009 1 次提交
  3. 11 12月, 2009 1 次提交
  4. 10 12月, 2009 1 次提交
    • X
      perf_event: Fix perf_swevent_hrtimer() variable initialization · 21140f4d
      Xiao Guangrong 提交于
      fix:
      
       [<c0477471>] ? printk+0x1d/0x24
       [<c01c98f9>] ? perf_prepare_sample+0x269/0x280
       [<c0149231>] warn_slowpath_common+0x71/0xd0
       [<c01c98f9>] ? perf_prepare_sample+0x269/0x280
       [<c01492aa>] warn_slowpath_null+0x1a/0x20
       [<c01c98f9>] perf_prepare_sample+0x269/0x280
       [<c016e9f3>] ? cpu_clock+0x53/0x90
       [<c01cc368>] __perf_event_overflow+0x2a8/0x300
       [<c01ccc3b>] perf_event_overflow+0x1b/0x30
       [<c01ccccf>] perf_swevent_hrtimer+0x7f/0x120
      
      This is because 'data.raw' variable not initialize.
      Signed-off-by: NXiao Guangrong <xiaoguangrong@cn.fujitsu.com>
      Acked-by: NPeter Zijlstra <peterz@infradead.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Paul Mackerras <paulus@samba.org>
      LKML-Reference: <4B208E93.1010801@cn.fujitsu.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      21140f4d
  5. 09 12月, 2009 6 次提交
    • F
      tracing/kprobes: Fix field creation's bad error handling · 822a6961
      Frederic Weisbecker 提交于
      When we define the common event fields in kprobe, we invert the error
      handling and return immediately in case of success. Then we omit
      to define specific kprobes fields (ip and nargs), and specific
      kretprobes fields (func, ret_ip, nargs). And we only define them
      when we fail to create common fields.
      
      The most visible consequence is that we can't create filter for
      k(ret)probes specific fields.
      
      This patch re-invert the success/error handling to fix it.
      Reported-by: NLai Jiangshan <laijs@cn.fujitsu.com>
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Acked-by: NMasami Hiramatsu <mhiramat@redhat.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Li Zefan <lizf@cn.fujitsu.com>
      LKML-Reference: <1260263815-5167-1-git-send-regression-fweisbec@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      822a6961
    • X
      perf_event: Cleanup for cpu_clock_perf_event_update() · ec89a06f
      Xiao Guangrong 提交于
      Using atomic64_xchg() instead of atomic64_read() and
      atomic64_set().
      Signed-off-by: NXiao Guangrong <xiaoguangrong@cn.fujitsu.com>
      Reviewed-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Paul Mackerras <paulus@samba.org>
      LKML-Reference: <4B1F19DC.90204@cn.fujitsu.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      ec89a06f
    • X
      perf_event: Allocate children's perf_event_ctxp at the right time · b93f7978
      Xiao Guangrong 提交于
      In current code, children task will allocate memory for
      'child->perf_event_ctxp' if the parent is counted, we can
      do it only if the parent allowed children inherit it.
      
      It can save memory and reduce overhead.
      Signed-off-by: NXiao Guangrong <xiaoguangrong@cn.fujitsu.com>
      Reviewed-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Paul Mackerras <paulus@samba.org>
      LKML-Reference: <4B1F19A8.5040805@cn.fujitsu.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      b93f7978
    • X
      perf_event: Clean up __perf_event_init_context() · aa5452d7
      Xiao Guangrong 提交于
      Clean up the code a bit:
      
       - define 'perf_cpu_context' variable with 'static'
       - use kzalloc() instead of kmalloc() and memset()
      Signed-off-by: NXiao Guangrong <xiaoguangrong@cn.fujitsu.com>
      Reviewed-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Paul Mackerras <paulus@samba.org>
      LKML-Reference: <4B1F194D.7080306@cn.fujitsu.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      aa5452d7
    • F
      hw-breakpoints: Modify breakpoints without unregistering them · 44234adc
      Frederic Weisbecker 提交于
      Currently, when ptrace needs to modify a breakpoint, like disabling
      it, changing its address, type or len, it calls
      modify_user_hw_breakpoint(). This latter will perform the heavy and
      racy task of unregistering the old breakpoint and registering a new
      one.
      
      This is racy as someone else might steal the reserved breakpoint
      slot under us, which is undesired as the breakpoint is only
      supposed to be modified, sometimes in the middle of a debugging
      workflow. We don't want our slot to be stolen in the middle.
      
      So instead of unregistering/registering the breakpoint, just
      disable it while we modify its breakpoint fields and re-enable it
      after if necessary.
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Prasad <prasad@linux.vnet.ibm.com>
      LKML-Reference: <1260347148-5519-1-git-send-regression-fweisbec@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      44234adc
    • M
      trace-kprobe: Support delete probe syntax · a7c312be
      Masami Hiramatsu 提交于
      Support delete probe syntax. The syntax is "-:[group/]event".
      Signed-off-by: NMasami Hiramatsu <mhiramat@redhat.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Jim Keniston <jkenisto@us.ibm.com>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Frank Ch. Eigler <fche@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jason Baron <jbaron@redhat.com>
      Cc: K.Prasad <prasad@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: systemtap <systemtap@sources.redhat.com>
      Cc: DLE <dle-develop@lists.sourceforge.net>
      LKML-Reference: <20091208220316.10142.39192.stgit@dhcp-100-2-132.bos.redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Jim Keniston <jkenisto@us.ibm.com>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Frank Ch. Eigler <fche@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jason Baron <jbaron@redhat.com>
      Cc: K.Prasad <prasad@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      a7c312be
  6. 08 12月, 2009 1 次提交
    • S
      perf: hw_breakpoints: Fix percpu namespace clash · 6ab88863
      Stephen Rothwell 提交于
      Today's linux-next build failed with:
      
        kernel/hw_breakpoint.c:86: error: 'task_bp_pinned' redeclared as different kind of symbol
        ...
      
      Caused by commit dd17c8f7 ("percpu:
      remove per_cpu__ prefix") from the percpu tree interacting with
      commit 56053170 ("hw-breakpoints:
      Fix task-bound breakpoint slot allocation") from the tip tree.
      Signed-off-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Acked-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Christoph Lameter <cl@linux-foundation.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      LKML-Reference: <20091208182515.bb6dda4a.sfr@canb.auug.org.au>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      6ab88863
  7. 07 12月, 2009 1 次提交
    • F
      hw-breakpoints: Fix task-bound breakpoint slot allocation · 56053170
      Frederic Weisbecker 提交于
      Whatever the context nature of a breakpoint, we always perform the
      following constraint checks before allocating it a slot:
      
      - Check the number of pinned breakpoint bound the concerned cpus
      - Check the max number of task-bound breakpoints that are belonging
        to a task.
      - Add both and see if we have a reamining slot for the new breakpoint
      
      This is the right thing to do when we are about to register a cpu-only
      bound breakpoint. But not if we are dealing with a task bound
      breakpoint. What we want in this case is:
      
      - Check the number of pinned breakpoint bound the concerned cpus
      - Check the number of breakpoints that already belong to the task
        in which the breakpoint to register is bound to.
      - Add both
      
      This fixes a regression that makes the "firefox -g" command fail to
      register breakpoints once we deal with a secondary thread.
      Reported-by: NWalt <w41ter@gmail.com>
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Prasad <prasad@linux.vnet.ibm.com>
      56053170
  8. 06 12月, 2009 2 次提交
  9. 02 12月, 2009 8 次提交
  10. 01 12月, 2009 2 次提交
    • X
      perf_event: Initialize data.period in perf_swevent_hrtimer() · 59d069eb
      Xiao Guangrong 提交于
      In current code in perf_swevent_hrtimer(), data.period is not
      initialized, The result is obvious wrong:
      
       # ./perf record -f -e cpu-clock make
       # ./perf report
       # Samples: 1740
       #
       # Overhead   Command                                   ......
       # ........  ........  ..........................................
       #
         1025422183050275328.00%        sh  libc-2.9.90.so ...
         1025422183050275328.00%      perl  libperl.so     ...
         1025422168240043264.00%      perl  [kernel]       ...
         1025422030011210752.00%      perl  [kernel]       ...
      Signed-off-by: NXiao Guangrong <xiaoguangrong@cn.fujitsu.com>
      Acked-by: NPeter Zijlstra <peterz@infradead.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: <stable@kernel.org>
      LKML-Reference: <4B14E220.2050107@cn.fujitsu.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      59d069eb
    • M
      trace_kprobes: Fix a memory leak bug and check kstrdup() return value · ba8665d7
      Masami Hiramatsu 提交于
      Fix a memory leak case in create_trace_probe(). When an argument
      is too long (> MAX_ARGSTR_LEN), it just jumps to error path. In
      that case tp->args[i].name is not released.
      This also fixes a bug to check kstrdup()'s return value.
      Signed-off-by: NMasami Hiramatsu <mhiramat@redhat.com>
      Cc: systemtap <systemtap@sources.redhat.com>
      Cc: DLE <dle-develop@lists.sourceforge.net>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Jim Keniston <jkenisto@us.ibm.com>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Frank Ch. Eigler <fche@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jason Baron <jbaron@redhat.com>
      Cc: K.Prasad <prasad@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <20091201001919.10235.56455.stgit@harusame>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      ba8665d7
  11. 27 11月, 2009 7 次提交
  12. 26 11月, 2009 8 次提交
  13. 25 11月, 2009 1 次提交
    • T
      trace/syscalls: Change ret param in struct syscall_trace_exit to long · 99df5a6a
      Tom Zanussi 提交于
      Commit ee949a86 ("tracing/syscalls:
      Use long for syscall ret format and field definitions") changed the
      syscall exit return type to long, but forgot to change it in the
      struct.
      Signed-off-by: NTom Zanussi <tzanussi@gmail.com>
      Cc: Steven Rostedt <rostedt@goodmis.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: <1259133299-23594-3-git-send-email-tzanussi@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      99df5a6a