LImiting Mix to certain thread

LImiting Mix to certain thread

If your application used several threads but you knew for instance that you were only interested in thread 1, is there a way to tell mix and/or pin not to collect statistics on the other threads, with the goal of speeding things up?

2 帖子 / 0 全新
最新文章
如需更全面地了解编译器优化,请参阅优化注意事项

Because of the way mix works you don't really save anything by doing just one thread. The algorithm scans each block for events once at JIT-ing time. At runtime we increment one counter per block execution. Then at the end of execution, we multiply the block execution counts by the block event observations from JIT time, and sum everything up and print it out. The block execution counts have to be per-thread. And since they all share the same code-cache there is no way to count for some and not others. It might actually be slower if we had to check for thread ids and count conditionally.

发表评论

登录添加评论。还不是成员?立即加入