Taking the timestamp in linux is same as clock cycles in ticks for linux. I know how to get the timestamp but I dont now how to take the clock cycles in ticks. could someone tell me what is the difference between the two ?? could someone give me a small example for clock cycles in ticks ??
采用linux中的時間戳與linux中的時鍾周期相同。我知道如何獲取時間戳,但我現在不知道如何以時鍾周期為單位。誰能告訴我兩者有什么區別?有人可以給我一個小時鍾周期的例子嗎?
Looking forward for your reply.
期待您的回復。
extra : Am trying to add assembly instructions for timing in pisa architecture using simplescalar simulator. For my instructions i should access clock cycles and store it in the register.
額外:我試圖使用simplescalar模擬器在比薩架構中添加組裝指令。根據我的指示,我應該訪問時鍾周期並將其存儲在寄存器中。
1
Well, there are:
嗯,有:
clock_gettime
, nanosecond-resolution, often good enough for everything.If you want to get access to CPU performance registers, you can start with Intel® Performance Counter Monitor inside your programs.
如果要訪問CPU性能寄存器,可以從程序內部的英特爾®性能計數器監視器開始。
本站翻译的文章,版权归属于本站,未经许可禁止转摘,转摘请注明本文地址:https://www.itdaan.com/blog/2014/06/10/309321978110a867ad09685419e72bea.html。