During execution of a program of computer instructions, the execution of branch instructions is detected, and in response, the activity of processing circuitry during execution of instructions following a branch instruction is measured. Respective information about the measured activity is recorded for each of a plurality of branch instructions. The measured activity is later used to adapt the power consumption mode of the processing circuitry after encountering the respective branch instructions.