1. 14 Mar, 2011 3 commits
  2. 11 Mar, 2011 5 commits
  3. 10 Mar, 2011 17 commits
    • Steven Rostedt's avatar
      tracing: Fix irqoff selftest expanding max buffer · 4a0b1665
      Steven Rostedt authored
      If the kernel command line declares a tracer "ftrace=sometracer" and
      that tracer is either not defined or is enabled after irqsoff,
      then the irqs off selftest will fail with the following error:
      
      Testing tracer irqsoff:
      ------------[ cut here ]------------
      WARNING: at /home/rostedt/work/autotest/nobackup/linux-test.git/kernel/trace/tra
      ce.c:713 update_max_tr_single+0xfa/0x11b()
      Hardware name:
      Modules linked in:
      Pid: 1, comm: swapper Not tainted 2.6.38-rc8-test #1
      Call Trace:
       [<c0441d9d>] ? warn_slowpath_common+0x65/0x7a
       [<c049adb2>] ? update_max_tr_single+0xfa/0x11b
       [<c0441dc1>] ? warn_slowpath_null+0xf/0x13
       [<c049adb2>] ? update_max_tr_single+0xfa/0x11b
       [<c049e454>] ? stop_critical_timing+0x154/0x204
       [<c049b54b>] ? trace_selftest_startup_irqsoff+0x5b/0xc1
       [<c049b54b>] ? trace_selftest_startup_irqsoff+0x5b/0xc1
       [<c049b54b>] ? trace_selftest_startup_irqsoff+0x5b/0xc1
       [<c049e529>] ? time_hardirqs_on+0x25/0x28
       [<c0468bca>] ? trace_hardirqs_on_caller+0x18/0x12f
       [<c0468cec>] ? trace_hardirqs_on+0xb/0xd
       [<c049b54b>] ? trace_selftest_startup_irqsoff+0x5b/0xc1
       [<c049b6b8>] ? register_tracer+0xf8/0x1a3
       [<c14e93fe>] ? init_irqsoff_tracer+0xd/0x11
       [<c040115e>] ? do_one_initcall+0x71/0x121
       [<c14e93f1>] ? init_irqsoff_tracer+0x0/0x11
       [<c14ce3a9>] ? kernel_init+0x13a/0x1b6
       [<c14ce26f>] ? kernel_init+0x0/0x1b6
       [<c0403842>] ? kernel_thread_helper+0x6/0x10
      ---[ end trace e93713a9d40cd06c ]---
      .. no entries found ..FAILED!
      
      What happens is the "ftrace=..." will expand the ring buffer to its
      default size (from its minimum size) but it will not expand the
      max ring buffer (the ring buffer to store maximum latencies).
      When the irqsoff test runs, it will call the ring buffer swap routine
      that checks if the max ring buffer is the same size as the normal
      ring buffer, and will fail if it is not. This causes the test to fail.
      
      The solution is to expand the max ring buffer before running the self
      test if the max ring buffer is used by that tracer and the normal ring
      buffer is expanded. The max ring buffer should be shrunk again after
      the test is done to save space.
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      4a0b1665
    • Steven Rostedt's avatar
      tracing: Align 4 byte ints together in struct tracer · 9a24470b
      Steven Rostedt authored
      Move elements in struct tracer for better alignment.
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      9a24470b
    • Yuanhan Liu's avatar
      tracing: Export trace_set_clr_event() · 56355b83
      Yuanhan Liu authored
      Trace events belonging to a module only exists when the module is
      loaded. Well, we can use trace_set_clr_event funtion to enable some
      trace event at the module init routine, so that we will not miss
      something while loading then module.
      
      So, Export the trace_set_clr_event function so that module can use it.
      Signed-off-by: default avatarYuanhan Liu <yuanhan.liu@linux.intel.com>
      LKML-Reference: <1289196312-25323-1-git-send-email-yuanhan.liu@linux.intel.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      56355b83
    • Jiri Olsa's avatar
      tracing: Explain about unstable clock on resume with ring buffer warning · 31274d72
      Jiri Olsa authored
      The "Delta way too big" warning might appear on a system with a
      unstable shed clock right after the system is resumed and tracing
      was enabled at time of suspend.
      
      Since it's not realy a bug, and the unstable sched clock is working
      fast and reliable otherwise, Steven suggested to keep using the
      sched clock in any case and just to make note in the warning itself.
      
      v2 changes:
      - added #ifdef CONFIG_HAVE_UNSTABLE_SCHED_CLOCK
      Signed-off-by: default avatarJiri Olsa <jolsa@redhat.com>
      LKML-Reference: <20110218145219.GD2604@jolsa.brq.redhat.com>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      31274d72
    • Steven Rostedt's avatar
      ftrace/graph: Trace function entry before updating index · 722b3c74
      Steven Rostedt authored
      Currently the index to the ret_stack is updated and the real return address
      is saved in the ret_stack. Then we call the trace function. The trace
      function could decide that it doesn't want to trace this function
      (ex. set_graph_function does not match) and it will return 0 which means
      not to trace this call.
      
      The normal function graph tracer has this code:
      
      	if (!(trace->depth || ftrace_graph_addr(trace->func)) ||
      	      ftrace_graph_ignore_irqs())
      		return 0;
      
      What this states is, if the trace depth (which is curr_ret_stack)
      is zero (top of nested functions) then test if we want to trace this
      function. If this function is not to be traced, then return  0 and
      the rest of the function graph tracer logic will not trace this function.
      
      The problem arises when an interrupt comes in after we updated the
      curr_ret_stack. The next function that gets called will have a trace->depth
      of 1. Which fools this trace code into thinking that we are in a nested
      function, and that we should trace. This causes interrupts to be traced
      when they should not be.
      
      The solution is to trace the function first and then update the ret_stack.
      Reported-by: default avatarzhiping zhong <xzhong86@163.com>
      Reported-by: default avatarwu zhangjin <wuzhangjin@gmail.com>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      722b3c74
    • Steven Rostedt's avatar
      ftrace: Add .ref.text as one of the safe areas to trace · 1274a9c2
      Steven Rostedt authored
      The section .ref.text will not go away unexpectedly and is
      safe to trace. Add it to the safe list of sections to allow
      tracing.
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      1274a9c2
    • David Sharp's avatar
      tracing: Adjust conditional expression latency formatting. · 10da37a6
      David Sharp authored
      Formatting change only to improve code readability. No code changes except to
      introduce intermediate variables.
      Signed-off-by: default avatarDavid Sharp <dhsharp@google.com>
      LKML-Reference: <1291421609-14665-13-git-send-email-dhsharp@google.com>
      
      [ Keep variable declarations and assignment separate ]
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      10da37a6
    • David Sharp's avatar
      tracing: Fix event alignment: skb:kfree_skb · ca9da2dd
      David Sharp authored
      Acked-by: default avatarNeil Horman <nhorman@tuxdriver.com>
      Signed-off-by: default avatarDavid Sharp <dhsharp@google.com>
      LKML-Reference: <1291421609-14665-10-git-send-email-dhsharp@google.com>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      ca9da2dd
    • David Sharp's avatar
      tracing: Fix event alignment: mce:mce_record · ad440ad6
      David Sharp authored
      Signed-off-by: default avatarDavid Sharp <dhsharp@google.com>
      LKML-Reference: <1291421609-14665-9-git-send-email-dhsharp@google.com>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      ad440ad6
    • David Sharp's avatar
      tracing: Fix event alignment: kvm:kvm_hv_hypercall · d5bf2ff0
      David Sharp authored
      Acked-by: default avatarAvi Kivity <avi@redhat.com>
      Signed-off-by: default avatarDavid Sharp <dhsharp@google.com>
      LKML-Reference: <1291421609-14665-8-git-send-email-dhsharp@google.com>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      d5bf2ff0
    • David Sharp's avatar
      tracing: Fix event alignment: module:module_request · b5e3008e
      David Sharp authored
      Acked-by: default avatarLi Zefan <lizf@cn.fujitsu.com>
      Signed-off-by: default avatarDavid Sharp <dhsharp@google.com>
      LKML-Reference: <1291421609-14665-7-git-send-email-dhsharp@google.com>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      b5e3008e
    • David Sharp's avatar
      tracing: Fix event alignment: ftrace:context_switch and ftrace:wakeup · 140e4f2d
      David Sharp authored
      Signed-off-by: default avatarDavid Sharp <dhsharp@google.com>
      LKML-Reference: <1291421609-14665-6-git-send-email-dhsharp@google.com>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      140e4f2d
    • Steven Rostedt's avatar
      tracing: Remove lock_depth from event entry · e6e1e259
      Steven Rostedt authored
      The lock_depth field in the event headers was added as a temporary
      data point for help in removing the BKL. Now that the BKL is pretty
      much been removed, we can remove this field.
      
      This in turn changes the header from 12 bytes to 8 bytes,
      removing the 4 byte buffer that gcc would insert if the first field
      in the data load was 8 bytes in size.
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      e6e1e259
    • Arnaldo Carvalho de Melo's avatar
      perf header: Stop using 'self' · 1c0b04d1
      Arnaldo Carvalho de Melo authored
      Stop using this python/OOP convention, doesn't really helps. Will do
      more from time to time till we get it cleaned up in all of tools/perf.
      Suggested-by: default avatarThomas Gleixner <tglx@linutronix.de>
      LKML-Reference: <new-submission>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      1c0b04d1
    • Arnaldo Carvalho de Melo's avatar
      perf session: Use evlist/evsel for managing perf.data attributes · a91e5431
      Arnaldo Carvalho de Melo authored
      So that we can reuse things like the id to attr lookup routine
      (perf_evlist__id2evsel) that uses a hash table instead of the linear
      lookup done in the older perf_header_attr routines, etc.
      
      Also to make evsels/evlist more pervasive an API, simplyfing using the
      emerging perf lib.
      
      cc: Arun Sharma <arun@sharma-home.net>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      a91e5431
    • Jiri Olsa's avatar
      perf top: Don't let events to eat up whole header line · 65472503
      Jiri Olsa authored
      Passing multiple events might force out information about pid/tid/cpu.
      Attached patch leaves 30 characters for this info at the expense of the
      events' names.
      
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Han Pingtian <phan@redhat.com>
      LKML-Reference: <1299528821-17521-3-git-send-email-jolsa@redhat.com>
      Signed-off-by: default avatarJiri Olsa <jolsa@redhat.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      65472503
    • Jiri Olsa's avatar
      perf top: Fix events overflow in top command · b9a46bba
      Jiri Olsa authored
      The snprintf function returns number of printed characters even if it
      cross the size parameter. So passing enough events via '-e' parameter
      will cause segmentation fault.
      
      It's reproduced by following command:
      
      perf top -e `perf list | grep Tracepoint | awk -F'[' '\
      {gsub(/[[:space:]]+/,"",$1);array[FNR]=$1}END{outputs=array[1];\
      for (i=2;i<=FNR;i++){ outputs=outputs "," array[i];};print outputs}'`
      
      Attached patch is adding SNPRINTF macro that provides the overflow check
      and returns actuall number of printed characters.
      Reported-by: default avatarHan Pingtian <phan@redhat.com>
      Cc: Han Pingtian <phan@redhat.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      LKML-Reference: <1299528821-17521-2-git-send-email-jolsa@redhat.com>
      Signed-off-by: default avatarJiri Olsa <jolsa@redhat.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      b9a46bba
  4. 09 Mar, 2011 2 commits
  5. 08 Mar, 2011 8 commits
    • Jiri Olsa's avatar
      kprobes: Disabling optimized kprobes for entry text section · 2a8247a2
      Jiri Olsa authored
      You can crash the kernel (with root/admin privileges) using kprobe tracer by running:
      
       echo "p system_call_after_swapgs" > ./kprobe_events
       echo 1 > ./events/kprobes/enable
      
      The reason is that at the system_call_after_swapgs label, the
      kernel stack is not set up. If optimized kprobes are enabled,
      the user space stack is being used in this case (see optimized
      kprobe template) and this might result in a crash.
      
      There are several places like this over the entry code
      (entry_$BIT). As it seems there's no any reasonable/maintainable
      way to disable only those places where the stack is not ready, I
      switched off the whole entry code from kprobe optimizing.
      Signed-off-by: default avatarJiri Olsa <jolsa@redhat.com>
      Acked-by: default avatarMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: acme@redhat.com
      Cc: fweisbec@gmail.com
      Cc: ananth@in.ibm.com
      Cc: davem@davemloft.net
      Cc: a.p.zijlstra@chello.nl
      Cc: eric.dumazet@gmail.com
      Cc: 2nddept-manager@sdl.hitachi.co.jp
      LKML-Reference: <1298298313-5980-3-git-send-email-jolsa@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      2a8247a2
    • Jiri Olsa's avatar
      x86: Separate out entry text section · ea714547
      Jiri Olsa authored
      Put x86 entry code into a separate link section: .entry.text.
      
      Separating the entry text section seems to have performance
      benefits - caused by more efficient instruction cache usage.
      
      Running hackbench with perf stat --repeat showed that the change
      compresses the icache footprint. The icache load miss rate went
      down by about 15%:
      
       before patch:
               19417627  L1-icache-load-misses      ( +-   0.147% )
      
       after patch:
               16490788  L1-icache-load-misses      ( +-   0.180% )
      
      The motivation of the patch was to fix a particular kprobes
      bug that relates to the entry text section, the performance
      advantage was discovered accidentally.
      
      Whole perf output follows:
      
       - results for current tip tree:
      
        Performance counter stats for './hackbench/hackbench 10' (500 runs):
      
               19417627  L1-icache-load-misses      ( +-   0.147% )
             2676914223  instructions             #      0.497 IPC     ( +- 0.079% )
             5389516026  cycles                     ( +-   0.144% )
      
            0.206267711  seconds time elapsed   ( +-   0.138% )
      
       - results for current tip tree with the patch applied:
      
        Performance counter stats for './hackbench/hackbench 10' (500 runs):
      
               16490788  L1-icache-load-misses      ( +-   0.180% )
             2717734941  instructions             #      0.502 IPC     ( +- 0.079% )
             5414756975  cycles                     ( +-   0.148% )
      
            0.206747566  seconds time elapsed   ( +-   0.137% )
      Signed-off-by: default avatarJiri Olsa <jolsa@redhat.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Nick Piggin <npiggin@kernel.dk>
      Cc: Eric Dumazet <eric.dumazet@gmail.com>
      Cc: masami.hiramatsu.pt@hitachi.com
      Cc: ananth@in.ibm.com
      Cc: davem@davemloft.net
      Cc: 2nddept-manager@sdl.hitachi.co.jp
      LKML-Reference: <20110307181039.GB15197@jolsa.redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      ea714547
    • Ingo Molnar's avatar
      Merge commit 'v2.6.38-rc8' into perf/core · 86cb2ec7
      Ingo Molnar authored
      Merge reason: Merge latest fixes.
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      86cb2ec7
    • Linus Torvalds's avatar
      Linux 2.6.38-rc8 · a5abba98
      Linus Torvalds authored
      a5abba98
    • Linus Torvalds's avatar
      Merge branch 's5p-fixes-for-linus' of... · 715695ca
      Linus Torvalds authored
      Merge branch 's5p-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung
      
      * 's5p-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
        ARM: S3C64XX: Update regulator names for debugfs compatiblity on SMDK6410
        ARM: S3C64XX: Fix build with WM1190 disabled and WM1192 enabled on SMDK6410
        ARM: S3C64XX: Reduce output of s3c64xx_dma_init1()
        ARM: S3C64XX: Tone down SDHCI debugging
        ARM: S3C64XX: Add clock for i2c1
        ARM: S3C64XX: Staticise non-exported GPIO to interrupt functions
        ARM: SAMSUNG: Include devs.h in dev-uart.c to prototype devices
        ARM: S3C64XX: Fix keypad setup to configure correct number of rows
        ARM: S3C2440: Fix usage gpio bank j pin definitions on GTA02
        ARM: S5P64X0: Fix number of GPIO lines in Bank F
        ARM: S3C2440: Select missing S3C_DEV_USB_HOST on GTA02
      715695ca
    • Linus Torvalds's avatar
      Merge branch 'fixes' of master.kernel.org:/home/rmk/linux-2.6-arm · 34d4ade7
      Linus Torvalds authored
      * 'fixes' of master.kernel.org:/home/rmk/linux-2.6-arm:
        davinci: cpufreq: fix section mismatch warning
        DaVinci: fix compilation warnings in <mach/clkdev.h>
        davinci: tnetv107x: fix register indexing for GPIOs numbers > 31
        davinci: da8xx/omap-l1x: add platform device for davinci-pcm-audio
        ARM: pxa/tosa: register wm9712 codec device
        ARM: pxa: enable pxa-pcm-audio on pxa210/pxa25x platform
        ARM: pxa/colibri: don't register pxa2xx-pcmcia nodes on non-colibri platforms
        ARM: pxa/tosa: drop setting LED trigger name, as it's unsupported now
        ARM: 6762/1: Update number of VIC for S5P6442 and S5PC100
        ARM: 6761/1: Update number of VIC for S5PV210
        ARM: 6768/1: hw_breakpoint: ensure debug logic is powered up on v7 cores
        ARM: 6767/1: ptrace: fix register indexing in GETHBPREGS request
        ARM: 6765/1: remove obsolete comment from asm/mach/arch.h
        ARM: 6757/1: fix tlb.h induced linux/swap.h build failure
      34d4ade7
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc · 1a345303
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc:
        mmc: sdio: Allow sdio operations in other threads during sdio_add_func()
      1a345303
    • Linus Torvalds's avatar
      Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 · b44a53d1
      Linus Torvalds authored
      * 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
        drm: index i shadowed in 2nd loop
        drm/nv50-nvc0: prevent multiple vm/bar flushes occuring simultanenously
        drm/nouveau: fix regression causing ttm to not be able to evict vram
        drm/i915: Rebind the buffer if its alignment constraints changes with tiling
        drm/i915: Disable GPU semaphores by default
        drm/i915: Do not overflow the MMADDR write FIFO
        Revert "drm/i915: fix corruptions on i8xx due to relaxed fencing"
      b44a53d1
  6. 07 Mar, 2011 5 commits