The Linux kernel has a jump_label type that is used as part of very rarely satisfied conditions. To optimize the common case, the kernel dynamically specializes its own code by marking what branches to specialize with struct jump_labels and then dynamically patching those branches to be unconditional.
The jump_label mechanism is described here and here.
The Linux kernel has a
jump_label
type that is used as part of very rarely satisfied conditions. To optimize the common case, the kernel dynamically specializes its own code by marking what branches to specialize withstruct jump_label
s and then dynamically patching those branches to be unconditional.The
jump_label
mechanism is described here and here.