Messages in this thread | | | Date | Mon, 18 Mar 2019 18:37:20 -0500 | From | Josh Poimboeuf <> | Subject | Re: [PATCH 02/25] tracing: Improve "if" macro code generation |
| |
On Mon, Mar 18, 2019 at 04:38:42PM +0100, Peter Zijlstra wrote: > 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. > > Make it easier for GCC to optimize by keeping the conditional as a > conditional rather than converting it to an integer. This shrinks the > generated code quite a bit, and also makes the code sane enough for > objtool to understand. > > Cc: rostedt@goodmis.org > Cc: valentin.schneider@arm.com > Cc: luto@amacapital.net > Cc: brgerst@gmail.com > Cc: catalin.marinas@arm.com > Cc: mingo@kernel.org > Cc: dvlasenk@redhat.com > Cc: will.deacon@arm.com > Cc: julien.thierry@arm.com > Cc: torvalds@linux-foundation.org > Cc: dvyukov@google.com > Cc: bp@alien8.de > Cc: tglx@linutronix.de > Cc: james.morse@arm.com > Cc: luto@kernel.org > Cc: hpa@zytor.com > Reported-by: Peter Zijlstra <peterz@infradead.org> > Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> > Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> > Link: https://lkml.kernel.org/r/20190307174802.46fmpysxyo35hh43@treble
Missing "From" me.
-- Josh
| |