[Newbie question] Extracting execution cycles from basic blocks

I need to extract the cycle count for a single MachineBasicBlock (for
MI would be also be great).

I am trying to read this information from the Post-RA Scheduler. To do
so, I tried modifying the PostGenericScheduler::schedNode and similar
functions to get the scheduling results.

The problem is that the scheduler creates specfic regions inside a
MachineBasicBlock (as far as a know) and when interpreting the results
from the scheduled regions I’m still missing the cycle count for some
other MachineInstructions belonging to the MachineBasicBlock.

Am I missing something obvious?