I have a function which does just few operations such as increments. I have declared that as inline
and with the __attribute__((hot))
.
Gcc Doc suggests following for hot
attribute:
The hot attribute is used to inform the compiler that a function is a hot spot of the compiled program. The function is optimized more aggressively and on many target it is placed into special subsection of the text section so all hot functions appears close together improving locality.
which can be interpreted as for non inline
hot functions they would be placed in lower address area of the process address map. But inline
functions calls are supposed be literally replaced by their code. So question is how does combination of inline
and hot
really works ?