作者callisto2 (tte)
站内LinuxDev
标题[问题] 快速 context switch
时间Fri Dec 24 06:00:36 2010
最近在发展 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
1F:→ elpam:maybe tbb? i guess 12/24 12:56