diff options
author | Peter Oberparleiter <[email protected]> | 2014-02-06 15:58:20 +0100 |
---|---|---|
committer | H. Peter Anvin <[email protected]> | 2014-02-06 07:15:20 -0800 |
commit | 6583327c4dd55acbbf2a6f25e775b28b3abf9a42 (patch) | |
tree | 867fe6fc63d4c1e322802ee56ecec4793cf383fc /tools/perf/util/trace-event-scripting.c | |
parent | 85fc73a2cdf10cf42bc36fb3bca3896b2095a1c2 (diff) |
x86, hweight: Fix BUG when booting with CONFIG_GCOV_PROFILE_ALL=y
Commit d61931d89b, "x86: Add optimized popcnt variants" introduced
compile flag -fcall-saved-rdi for lib/hweight.c. When combined with
options -fprofile-arcs and -O2, this flag causes gcc to generate
broken constructor code. As a result, a 64 bit x86 kernel compiled
with CONFIG_GCOV_PROFILE_ALL=y prints message "gcov: could not create
file" and runs into sproadic BUGs during boot.
The gcc people indicate that these kinds of problems are endemic when
using ad hoc calling conventions. It is therefore best to treat any
file compiled with ad hoc calling conventions as an isolated
environment and avoid things like profiling or coverage analysis,
since those subsystems assume a "normal" calling conventions.
This patch avoids the bug by excluding lib/hweight.o from coverage
profiling.
Reported-by: Meelis Roos <[email protected]>
Cc: Andrew Morton <[email protected]>
Signed-off-by: Peter Oberparleiter <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: H. Peter Anvin <[email protected]>
Cc: <[email protected]>
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions