https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88345

Jan Hubicka <hubicka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hubicka at gcc dot gnu.org

--- Comment #17 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
-falign-functions/-falign-jumps/-falign-labels/-falign-loops are originally are
intended for performance tuning.  Starting function entry close to the end of
page of code cache may lead to wasted code cache space as well as higher
overhead calling the function when CPU fetches page which contains just little
useful information.

As such I would like to keep them affecting only hot code (we should update
documentation for that).  Internally we have FUNCTION_BOUNDARY which specifies
minimal alignment needed by ABI, which is set to 8bits for i386.  My
understanding is that -fpatchable-function-entry requires the alignment to be
64bits in order to make it possible to atomically change the instruction.

So perhaps we want to make FUNCTION_BOUNDARY to be 64 for functions where we
output the patchable entry?
I am also OK with extending the flag syntax or adding -fmin-function-alignment
to specify optional user-defined minimum (increase FUNCTION_BOUNDARY) if that
seems useful, but I think the first one is most consistent way to go with live
patching?

Reply via email to