diff options
author | Linus Torvalds <[email protected]> | 2019-03-20 10:26:17 -0700 |
---|---|---|
committer | Steven Rostedt (VMware) <[email protected]> | 2019-05-09 15:25:13 -0400 |
commit | a15fd609ad53a631a927c6680e8fb606f42a712b (patch) | |
tree | f885028fcbbbc46022e69053638c88d984ef9df5 /tools/perf/scripts/python/export-to-sqlite.py | |
parent | b9416997603ef7e17d4de10b6408f19da2feb72c (diff) |
tracing: Simplify "if" macro code
Peter Zijlstra noticed that with CONFIG_PROFILE_ALL_BRANCHES, the "if"
macro converts the conditional to an array index. This can cause GCC
to create horrible code. When there are nested ifs, the generated code
uses register values to encode branching decisions.
Josh Poimboeuf found that replacing the define "if" macro from using
the condition as an array index and incrementing the branch statics
with an if statement itself, reduced the asm complexity and shrinks the
generated code quite a bit.
But this can be simplified even further by replacing the internal if
statement with a ternary operator.
Link: https://lkml.kernel.org/r/20190307174802.46fmpysxyo35hh43@treble
Link: http://lkml.kernel.org/r/CAHk-=wiALN3jRuzARpwThN62iKd476Xj-uom+YnLZ4=eqcz7xQ@mail.gmail.com
Reported-by: Peter Zijlstra (Intel) <[email protected]>
Reported-by: Josh Poimboeuf <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Signed-off-by: Steven Rostedt (VMware) <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions