1. 12 May, 2017 1 commit
  2. 04 Dec, 2015 1 commit
  3. 01 Jul, 2015 1 commit
  4. 17 Apr, 2015 1 commit
    • Andrey Ryabinin's avatar
      gcov: fix softlockups · 9d796e66
      Andrey Ryabinin authored
      
      
      gcov profiling if enabled with other heavy compile-time instrumentation
      like KASan could trigger following softlockups:
      
        NMI watchdog: BUG: soft lockup - CPU#0 stuck for 22s! [swapper/0:1]
        Modules linked in:
        irq event stamp: 22823276
        hardirqs last  enabled at (22823275): [<ffffffff86e8d10d>] mutex_lock_nested+0x7d9/0x930
        hardirqs last disabled at (22823276): [<ffffffff86e9521d>] apic_timer_interrupt+0x6d/0x80
        softirqs last  enabled at (22823172): [<ffffffff811ed969>] __do_softirq+0x4db/0x729
        softirqs last disabled at (22823167): [<ffffffff811edfcf>] irq_exit+0x7d/0x15b
        CPU: 0 PID: 1 Comm: swapper/0 Tainted: G        W       3.19.0-05245-gbb33326-dirty #3
        Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.7.5.1-0-g8936dbb-20141113_115728-nilsson.home.kraxel.org 04/01/2014
        task: ffff88006cba8000 ti: ffff88006cbb0000 task.ti: ffff88006cbb0000
        RIP: kasan_mem_to_shadow+0x1e/0x1f
        Call Trace:
          strcmp+0x28/0x70
          get_node_by_name+0x66/0x99
          gcov_event+0x4f/0x69e
          gcov_enable_events+0x54/0x7b
          gcov_fs_init+0xf8/0x134
          do_one_initcall+0x1b2/0x288
          kernel_init_freeable+0x467/0x580
          kernel_init+0x15/0x18b
          ret_from_fork+0x7c/0xb0
        Kernel panic - not syncing: softlockup: hung tasks
      
      Fix this by sticking cond_resched() in gcov_enable_events().
      Signed-off-by: default avatarAndrey Ryabinin <a.ryabinin@samsung.com>
      Reported-by: default avatarFengguang Wu <fengguang.wu@intel.com>
      Cc: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      9d796e66
  5. 10 Jun, 2014 1 commit
  6. 13 Nov, 2013 2 commits
  7. 18 Jun, 2009 1 commit
    • Peter Oberparleiter's avatar
      gcov: add gcov profiling infrastructure · 2521f2c2
      Peter Oberparleiter authored
      Enable the use of GCC's coverage testing tool gcov [1] with the Linux
      kernel.  gcov may be useful for:
      
       * debugging (has this code been reached at all?)
       * test improvement (how do I change my test to cover these lines?)
       * minimizing kernel configurations (do I need this option if the
         associated code is never run?)
      
      The profiling patch incorporates the following changes:
      
       * change kbuild to include profiling flags
       * provide functions needed by profiling code
       * present profiling data as files in debugfs
      
      Note that on some architectures, enabling gcc's profiling option
      "-fprofile-arcs" for the entire kernel may trigger compile/link/
      run-time problems, some of which are caused by toolchain bugs and
      others which require adjustment of architecture code.
      
      For this reason profiling the entire kernel is initially restricted
      to those architectures for which it is known to work without changes.
      This restriction can be lifted once an architecture has been tested
      and found compatible with gcc's profiling. Profiling of single files
      or directories is still available on all platforms (see config help
      text).
      
      [1] http://gcc.gnu.org/onlinedocs/gcc/Gcov.html
      
      Signed-off-by: default avatarPeter Oberparleiter <oberpar@linux.vnet.ibm.com>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: Huang Ying <ying.huang@intel.com>
      Cc: Li Wei <W.Li@Sun.COM>
      Cc: Michael Ellerman <michaele@au1.ibm.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Heiko Carstens <heicars2@linux.vnet.ibm.com>
      Cc: Martin Schwidefsky <mschwid2@linux.vnet.ibm.com>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: WANG Cong <xiyou.wangcong@gmail.com>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      2521f2c2