A pipeline processor having an exception program counter chain generates a
return address in the exception program counter chain for an executing
instruction. The return address is the point at which instruction
execution should resume after an exception handler routine runs if the
executing instruction incurs an exception. The return address is stored
into a profiling register if and when the corresponding instruction
completes execution. The profiling register is periodically sampled and a
statistical profile is built of instructions executed in the processor by
using the return addresses sampled. A sampled return address is identified
as a branch delay instruction and included in the statistical profile if
the sampled return address is that of a branch instruction which
immediately precedes a branch delay instruction.
Un processeur de canalisation ayant une chaîne de compteur de programme d'exception produit d'une adresse de retour dans la chaîne de compteur de programme d'exception pour une instruction d'exécution. L'adresse de retour est le point auquel l'exécution d'instruction devrait reprendre après qu'une routine de traiteur d'exception fonctionne si l'instruction d'exécution encourt une exception. L'adresse de retour est stockée dans un registre de profilage si et quand l'instruction correspondante accomplit l'exécution. Le registre de profilage est périodiquement prélevé et un profil statistique est établi des instructions exécutées dans le processeur en employant les adresses de retour prélevées. Une adresse de retour prélevée est identifiée pendant qu'une branche retardent l'instruction et inclus dans le profil statistique si l'adresse de retour prélevée est celle d'une instruction de branchement qui précède immédiatement une branche retardez l'instruction.