I have a function that performs just a few operations, such as increments. I stated that both inline
and with __attribute__((hot))
.
Gcc Doc offers the following for the hot
attribute:
The hot attribute is used to inform the compiler that the function is the hot spot of the compiled program. The function is optimized more aggressively and for many purposes is placed in a special subsection of the text section, so all the hot functions are close to each other improving the location.
which can be interpreted as for non-t20> hot functions, they will be placed in the lower address area of โโthe process address card. But inline
function calls are supposed to be literally replaced by their code. So the question is, how does the inline
and hot
combination work?
Jay d source share