首页 > 试题广场 >

Describe how you could obtain

[问答题]
Describe how you could obtain a statistical profile of the amount of time spent by a program executing different sections of its code.Discuss the importance of obtaining such a statistical profile.
推荐
One could issue periodic timer interrupts and monitor what instructions or what sections of code are currently executing when the interrupts are delivered.A statistical profile of which pieces of code were active should be consistent with the time spent by the program in different sections of its code.Once such a statistical profile has been obtained,the programmer could optimize those sections of code that are consuming more of the CPU resources.
发表于 2018-05-05 21:23:58 回复(0)