Bug 12925 - __branch_check__ definition in compiler.h makes sparse output unusable
__branch_check__ definition in compiler.h makes sparse output unusable
Status: CLOSED CODE_FIX
Product: Other
Classification: Unclassified
Component: Other
All Linux
: P1 normal
Assigned To: other_other
:
Depends on:
Blocks: 12398
  Show dependency treegraph
 
Reported: 2009-03-24 05:12 UTC by Bart Van Assche
Modified: 2009-04-26 11:25 UTC (History)
1 user (show)

See Also:
Kernel Version: 2.6.29
Tree: Mainline
Regression: Yes


Attachments
Disable branch profiling for sparse. (666 bytes, patch)
2009-03-24 05:44 UTC, Bart Van Assche
Details | Diff
Disable branch profiling for sparse. (831 bytes, patch)
2009-03-24 05:48 UTC, Bart Van Assche
Details | Diff

Description Bart Van Assche 2009-03-24 05:12:16 UTC
Latest working kernel version: 2.6.28.8
Earliest failing kernel version: 2.6.29
Distribution: any
Hardware Environment: any
Software Environment:
Problem Description: enabling TRACE_BRANCH_PROFILING in .config triggers so much sparse warnings that the sparse output becomes unusable.

Steps to reproduce:
* enable CONFIG_TRACE_BRANCH_PROFILING (I enabled this through make allyesconfig)
* run make C=2

Result: a huge number of sparse warnings, e.g.
...
include/linux/cpumask.h:547:2: warning: symbol '______r' shadows an earlier one
include/linux/cpumask.h:547:2: originally declared here
...
/tmp/bva/linux-2.6.29/arch/x86/include/asm/paravirt.h:902:2: warning: symbol '______r' shadows an earlier one
/tmp/bva/linux-2.6.29/arch/x86/include/asm/paravirt.h:902:2: originally declared
here
/tmp/bva/linux-2.6.29/arch/x86/include/asm/paravirt.h:902:2: warning: too many warnings
...

Proposed fix: in include/compiler.h, change

#if defined(CONFIG_TRACE_BRANCH_PROFILING) && !defined(DISABLE_BRANCH_PROFILING)

into

#if defined(CONFIG_TRACE_BRANCH_PROFILING) && !defined(DISABLE_BRANCH_PROFILING) && ! defined(__CHECKER__)
Comment 1 Bart Van Assche 2009-03-24 05:44:17 UTC
Created attachment 20657 [details]
Disable branch profiling for sparse.
Comment 2 Bart Van Assche 2009-03-24 05:48:14 UTC
Created attachment 20658 [details]
Disable branch profiling for sparse.
Comment 3 Bart Van Assche 2009-04-07 06:16:07 UTC
See also http://lkml.org/lkml/2009/4/5/120.
Comment 4 Rafael J. Wysocki 2009-04-26 11:25:09 UTC
Fixed by commit d9ad8bc0ca823705413f75b50c442a88cc518b35 .

Note You need to log in before you can comment on or make changes to this bug.