[問題] 快速 context switch
最近在發展 performance analysis tool, 需要對 multithreaded program 做分析.
需要的功能是每個 instruction 做一次 context switch, 也就是每個 thread 執行
一個 instruction 後, 就會暫停, 然後換下一個 thread 執行一個 instruction.
因為 thread 的數目大於 256 個, 所以沒辦法用一般的 CPU + vtune 來分析效能.
目前我是用 Intel 的 pin tool 加上 semaphore 可以做到我要的功能,
可是非常的慢. 也有用過 Futex, 可是並沒有快多少,
不知道還有沒有什麼方法我可以試的? 先謝謝了?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 129.2.94.48
→
12/24 12:56, , 1F
12/24 12:56, 1F