<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/kernel/gcov, branch v4.8-rc6</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>gcov: add support for gcc version &gt;= 6</title>
<updated>2016-07-15T05:54:27+00:00</updated>
<author>
<name>Florian Meier</name>
<email>Florian.Meier@informatik.uni-erlangen.de</email>
</author>
<published>2016-07-14T19:07:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d02038f972538b93011d78c068f44514fbde0a8c'/>
<id>d02038f972538b93011d78c068f44514fbde0a8c</id>
<content type='text'>
Link: http://lkml.kernel.org/r/20160701130914.GA23225@styxhp
Signed-off-by: Florian Meier &lt;Florian.Meier@informatik.uni-erlangen.de&gt;
Reviewed-by: Peter Oberparleiter &lt;oberpar@linux.vnet.ibm.com&gt;
Tested-by: Peter Oberparleiter &lt;oberpar@linux.vnet.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Link: http://lkml.kernel.org/r/20160701130914.GA23225@styxhp
Signed-off-by: Florian Meier &lt;Florian.Meier@informatik.uni-erlangen.de&gt;
Reviewed-by: Peter Oberparleiter &lt;oberpar@linux.vnet.ibm.com&gt;
Tested-by: Peter Oberparleiter &lt;oberpar@linux.vnet.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>gcov: disable for COMPILE_TEST</title>
<updated>2016-05-10T15:12:49+00:00</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2016-04-25T15:35:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=cc622420798c4bcf093785d872525087a7798db9'/>
<id>cc622420798c4bcf093785d872525087a7798db9</id>
<content type='text'>
Enabling gcov is counterproductive to compile testing: it significantly
increases the kernel image size, compile time, and it produces lots
of false positive "may be used uninitialized" warnings as the result
of missed optimizations.

This is in line with how UBSAN_SANITIZE_ALL and PROFILE_ALL_BRANCHES
work, both of which have similar problems.

With an ARM allmodconfig kernel, I see the build time drop from
283 minutes CPU time to 225 minutes, and the vmlinux size drops
from 43MB to 26MB.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Acked-by: Peter Oberparleiter &lt;oberpar@linux.vnet.ibm.com&gt;
Signed-off-by: Michal Marek &lt;mmarek@suse.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Enabling gcov is counterproductive to compile testing: it significantly
increases the kernel image size, compile time, and it produces lots
of false positive "may be used uninitialized" warnings as the result
of missed optimizations.

This is in line with how UBSAN_SANITIZE_ALL and PROFILE_ALL_BRANCHES
work, both of which have similar problems.

With an ARM allmodconfig kernel, I see the build time drop from
283 minutes CPU time to 225 minutes, and the vmlinux size drops
from 43MB to 26MB.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Acked-by: Peter Oberparleiter &lt;oberpar@linux.vnet.ibm.com&gt;
Signed-off-by: Michal Marek &lt;mmarek@suse.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>gcov: use within_module() helper.</title>
<updated>2015-12-04T21:46:25+00:00</updated>
<author>
<name>Rusty Russell</name>
<email>rusty@rustcorp.com.au</email>
</author>
<published>2015-11-25T23:13:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c65abf358f211c3f88c8ed714dff25775ab49fc1'/>
<id>c65abf358f211c3f88c8ed714dff25775ab49fc1</id>
<content type='text'>
An exact mapping would be within_module_core(), but at this stage
(MODULE_STATE_GOING) the init section is empty, and this is clearer.

Reviewed-by: Peter Oberparleiter &lt;oberpar@linux.vnet.ibm.com&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
An exact mapping would be within_module_core(), but at this stage
(MODULE_STATE_GOING) the init section is empty, and this is clearer.

Reviewed-by: Peter Oberparleiter &lt;oberpar@linux.vnet.ibm.com&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>gcov: add support for GCC 5.1</title>
<updated>2015-07-01T02:44:57+00:00</updated>
<author>
<name>Lorenzo Stoakes</name>
<email>lstoakes@gmail.com</email>
</author>
<published>2015-06-30T21:57:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3e44c471a2dab210f7e9b1e5f7d4d54d52df59eb'/>
<id>3e44c471a2dab210f7e9b1e5f7d4d54d52df59eb</id>
<content type='text'>
Fix kernel gcov support for GCC 5.1.  Similar to commit a992bf836f9
("gcov: add support for GCC 4.9"), this patch takes into account the
existence of a new gcov counter (see gcc's gcc/gcov-counter.def.)

Firstly, it increments GCOV_COUNTERS (to 10), which makes the data
structure struct gcov_info compatible with GCC 5.1.

Secondly, a corresponding counter function __gcov_merge_icall_topn (Top N
value tracking for indirect calls) is included in base.c with the other
gcov counters unused for kernel profiling.

Signed-off-by: Lorenzo Stoakes &lt;lstoakes@gmail.com&gt;
Cc: Andrey Ryabinin &lt;a.ryabinin@samsung.com&gt;
Cc: Yuan Pengfei &lt;coolypf@qq.com&gt;
Tested-by: Peter Oberparleiter &lt;oberpar@linux.vnet.ibm.com&gt;
Reviewed-by: Peter Oberparleiter &lt;oberpar@linux.vnet.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix kernel gcov support for GCC 5.1.  Similar to commit a992bf836f9
("gcov: add support for GCC 4.9"), this patch takes into account the
existence of a new gcov counter (see gcc's gcc/gcov-counter.def.)

Firstly, it increments GCOV_COUNTERS (to 10), which makes the data
structure struct gcov_info compatible with GCC 5.1.

Secondly, a corresponding counter function __gcov_merge_icall_topn (Top N
value tracking for indirect calls) is included in base.c with the other
gcov counters unused for kernel profiling.

Signed-off-by: Lorenzo Stoakes &lt;lstoakes@gmail.com&gt;
Cc: Andrey Ryabinin &lt;a.ryabinin@samsung.com&gt;
Cc: Yuan Pengfei &lt;coolypf@qq.com&gt;
Tested-by: Peter Oberparleiter &lt;oberpar@linux.vnet.ibm.com&gt;
Reviewed-by: Peter Oberparleiter &lt;oberpar@linux.vnet.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>gcov: fix softlockups</title>
<updated>2015-04-17T13:04:08+00:00</updated>
<author>
<name>Andrey Ryabinin</name>
<email>a.ryabinin@samsung.com</email>
</author>
<published>2015-04-16T19:48:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9d796e66230205cd3366f5660387bd9ecca9d336'/>
<id>9d796e66230205cd3366f5660387bd9ecca9d336</id>
<content type='text'>
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): [&lt;ffffffff86e8d10d&gt;] mutex_lock_nested+0x7d9/0x930
  hardirqs last disabled at (22823276): [&lt;ffffffff86e9521d&gt;] apic_timer_interrupt+0x6d/0x80
  softirqs last  enabled at (22823172): [&lt;ffffffff811ed969&gt;] __do_softirq+0x4db/0x729
  softirqs last disabled at (22823167): [&lt;ffffffff811edfcf&gt;] 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: Andrey Ryabinin &lt;a.ryabinin@samsung.com&gt;
Reported-by: Fengguang Wu &lt;fengguang.wu@intel.com&gt;
Cc: Peter Oberparleiter &lt;oberpar@linux.vnet.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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): [&lt;ffffffff86e8d10d&gt;] mutex_lock_nested+0x7d9/0x930
  hardirqs last disabled at (22823276): [&lt;ffffffff86e9521d&gt;] apic_timer_interrupt+0x6d/0x80
  softirqs last  enabled at (22823172): [&lt;ffffffff811ed969&gt;] __do_softirq+0x4db/0x729
  softirqs last disabled at (22823167): [&lt;ffffffff811edfcf&gt;] 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: Andrey Ryabinin &lt;a.ryabinin@samsung.com&gt;
Reported-by: Fengguang Wu &lt;fengguang.wu@intel.com&gt;
Cc: Peter Oberparleiter &lt;oberpar@linux.vnet.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kbuild,gcov: simplify kernel/gcov/Makefile more</title>
<updated>2015-01-09T16:25:44+00:00</updated>
<author>
<name>Masahiro Yamada</name>
<email>yamada.m@jp.panasonic.com</email>
</author>
<published>2014-12-25T05:31:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a75f8b8dab0f73459fa47a1daa10c84c4e8400a8'/>
<id>a75f8b8dab0f73459fa47a1daa10c84c4e8400a8</id>
<content type='text'>
CONFIG_GCOV_FORMAT_3_4 / _4_7 / _AUTODETECT are exclusive.
Compare the CC version only when _AUTODETECT is enabled.

This change should have no impact.

Signed-off-by: Masahiro Yamada &lt;yamada.m@jp.panasonic.com&gt;
Cc: Peter Oberparleiter &lt;oberpar@linux.vnet.ibm.com&gt;
Signed-off-by: Michal Marek &lt;mmarek@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
CONFIG_GCOV_FORMAT_3_4 / _4_7 / _AUTODETECT are exclusive.
Compare the CC version only when _AUTODETECT is enabled.

This change should have no impact.

Signed-off-by: Masahiro Yamada &lt;yamada.m@jp.panasonic.com&gt;
Cc: Peter Oberparleiter &lt;oberpar@linux.vnet.ibm.com&gt;
Signed-off-by: Michal Marek &lt;mmarek@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kbuild,gcov: simplify kernel/gcov/Makefile</title>
<updated>2015-01-09T16:25:44+00:00</updated>
<author>
<name>Masahiro Yamada</name>
<email>yamada.m@jp.panasonic.com</email>
</author>
<published>2014-12-25T05:31:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3df8094727bd1972eb8e231e56ecdbd6e8fb2210'/>
<id>3df8094727bd1972eb8e231e56ecdbd6e8fb2210</id>
<content type='text'>
Kbuild descends into kernel/gcov/ directory only when
CONFIG_GCOV_KERNEL is enabled. (See kernel/Makefile)

CONFIG_GCOV_KERNEL check can be omitted in kernel/gcov/Makefile.

Signed-off-by: Masahiro Yamada &lt;yamada.m@jp.panasonic.com&gt;
Cc: Peter Oberparleiter &lt;oberpar@linux.vnet.ibm.com&gt;
Signed-off-by: Michal Marek &lt;mmarek@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Kbuild descends into kernel/gcov/ directory only when
CONFIG_GCOV_KERNEL is enabled. (See kernel/Makefile)

CONFIG_GCOV_KERNEL check can be omitted in kernel/gcov/Makefile.

Signed-off-by: Masahiro Yamada &lt;yamada.m@jp.panasonic.com&gt;
Cc: Peter Oberparleiter &lt;oberpar@linux.vnet.ibm.com&gt;
Signed-off-by: Michal Marek &lt;mmarek@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kbuild,gcov: remove unnecessary workaround</title>
<updated>2015-01-09T16:25:44+00:00</updated>
<author>
<name>Masahiro Yamada</name>
<email>yamada.m@jp.panasonic.com</email>
</author>
<published>2014-12-25T05:31:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=842857dedc40df7c86e990b7153a069d0040e552'/>
<id>842857dedc40df7c86e990b7153a069d0040e552</id>
<content type='text'>
Since commit 371fdc77af44 (kbuild: collect shorthands into
scripts/Kbuild.include), scripts/Makefile.clean includes
scripts/Kbuild.include.

The workaround and the comment block in kernel/gcov/Makefile
are no longer necessary.

Signed-off-by: Masahiro Yamada &lt;yamada.m@jp.panasonic.com&gt;
Cc: Peter Oberparleiter &lt;oberpar@linux.vnet.ibm.com&gt;
Signed-off-by: Michal Marek &lt;mmarek@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since commit 371fdc77af44 (kbuild: collect shorthands into
scripts/Kbuild.include), scripts/Makefile.clean includes
scripts/Kbuild.include.

The workaround and the comment block in kernel/gcov/Makefile
are no longer necessary.

Signed-off-by: Masahiro Yamada &lt;yamada.m@jp.panasonic.com&gt;
Cc: Peter Oberparleiter &lt;oberpar@linux.vnet.ibm.com&gt;
Signed-off-by: Michal Marek &lt;mmarek@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kbuild: do not add $(call ...) to invoke cc-version or cc-fullversion</title>
<updated>2015-01-09T16:25:44+00:00</updated>
<author>
<name>Masahiro Yamada</name>
<email>yamada.m@jp.panasonic.com</email>
</author>
<published>2014-12-25T05:31:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=665d92e38f65d70796aad2b8e49e42e80815d4a4'/>
<id>665d92e38f65d70796aad2b8e49e42e80815d4a4</id>
<content type='text'>
The macros cc-version, cc-fullversion and ld-version take no argument.
It is not necessary to add $(call ...) to invoke them.

Signed-off-by: Masahiro Yamada &lt;yamada.m@jp.panasonic.com&gt;
Acked-by: Helge Deller &lt;deller@gmx.de&gt; [parisc]
Signed-off-by: Michal Marek &lt;mmarek@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The macros cc-version, cc-fullversion and ld-version take no argument.
It is not necessary to add $(call ...) to invoke them.

Signed-off-by: Masahiro Yamada &lt;yamada.m@jp.panasonic.com&gt;
Acked-by: Helge Deller &lt;deller@gmx.de&gt; [parisc]
Signed-off-by: Michal Marek &lt;mmarek@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>gcov: enable GCOV_PROFILE_ALL from ARCH Kconfigs</title>
<updated>2014-12-13T20:42:51+00:00</updated>
<author>
<name>Riku Voipio</name>
<email>riku.voipio@linaro.org</email>
</author>
<published>2014-12-13T00:57:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=957e3facd147510f2cf8780e38606f1d707f0e33'/>
<id>957e3facd147510f2cf8780e38606f1d707f0e33</id>
<content type='text'>
Following the suggestions from Andrew Morton and Stephen Rothwell,
Dont expand the ARCH list in kernel/gcov/Kconfig. Instead,
define a ARCH_HAS_GCOV_PROFILE_ALL bool which architectures
can enable.

set ARCH_HAS_GCOV_PROFILE_ALL on Architectures where it was
previously allowed + ARM64 which I tested.

Signed-off-by: Riku Voipio &lt;riku.voipio@linaro.org&gt;
Cc: Peter Oberparleiter &lt;oberpar@linux.vnet.ibm.com&gt;
Cc: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Following the suggestions from Andrew Morton and Stephen Rothwell,
Dont expand the ARCH list in kernel/gcov/Kconfig. Instead,
define a ARCH_HAS_GCOV_PROFILE_ALL bool which architectures
can enable.

set ARCH_HAS_GCOV_PROFILE_ALL on Architectures where it was
previously allowed + ARM64 which I tested.

Signed-off-by: Riku Voipio &lt;riku.voipio@linaro.org&gt;
Cc: Peter Oberparleiter &lt;oberpar@linux.vnet.ibm.com&gt;
Cc: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
