开发者

Collecting information about thread scheduling on Linux

开发者 https://www.devze.com 2023-01-06 19:44 出处:网络
I want to collect information about when my threads are scheduled (and descheduled), and on which CPUs, on Linux.I\'m happy to collect the information and store it in a file for offline analysis later

I want to collect information about when my threads are scheduled (and descheduled), and on which CPUs, on Linux. I'm happy to collect the information and store it in a file for offline analysis later, since I'll need to merge the scheduling information with other event sources generated by my code. Ideally the information would be collected by the program itself, as I plan to be using all the cores on the machine most of the time, and using an external process to do the sampling would disturb the execution 开发者_运维百科I want to measure.

So is this possible on Linux? What are the options?


The Linux perf tool is a general purpose kernel-supported profiling tool. Among other things, it can record events, which includes task scheduling events.

0

精彩评论

暂无评论...
验证码 换一张
取 消