diff options
author | Josh Poimboeuf <[email protected]> | 2016-04-14 14:52:24 -0500 |
---|---|---|
committer | Ingo Molnar <[email protected]> | 2016-04-15 11:42:13 +0200 |
commit | 7e578441a4a3bba2a79426ca0f709c801210d08e (patch) | |
tree | ba0a5c34fa911f60a86aec77bf36cd39cf40bace /tools/perf/scripts/python/call-graph-from-postgresql.py | |
parent | 806fdcce017dc98c4dbf8ed001750a0d7d2bb0af (diff) |
objtool: Add workaround for GCC switch jump table bug
GCC has a rare quirk, currently only seen in three driver functions in
the kernel, and only with certain obscure non-distro configs, which can
cause objtool to produce "unreachable instruction" false positive
warnings.
As part of an optimization, GCC makes a copy of an existing switch jump
table, modifies it, and then hard-codes the jump (albeit with an
indirect jump) to use a single entry in the table. The rest of the jump
table and some of its jump targets remain as dead code.
In such a case we can just crudely ignore all unreachable instruction
warnings for the entire object file. Ideally we would just ignore them
for the function, but that would require redesigning the code quite a
bit. And honestly that's just not worth doing: unreachable instruction
warnings are of questionable value anyway, and this is a very rare
issue.
kbuild reports:
https://lkml.kernel.org/r/201603231906.LWcVUpxm%[email protected]
https://lkml.kernel.org/r/201603271114.K9i45biy%[email protected]
https://lkml.kernel.org/r/201603291058.zuJ6ben1%[email protected]
GCC bug:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70604
Reported-by: kbuild test robot <[email protected]>
Signed-off-by: Josh Poimboeuf <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Link: http://lkml.kernel.org/r/700fa029bbb0feff34f03ffc69d666a3c3b57a61.1460663532.git.jpoimboe@redhat.com
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/call-graph-from-postgresql.py')
0 files changed, 0 insertions, 0 deletions