Microsecond accurate (or better) process timing in Linux

后端 未结 8 2461
醉话见心
醉话见心 2020-12-14 04:01

I need a very accurate way to time parts of my program. I could use the regular high-resolution clock for this, but that will return wallclock time, which is not what I need

8条回答
  •  北荒
    北荒 (楼主)
    2020-12-14 04:50

    I think I found the kernel patch I was looking for. Posting it here so I don't forget the link:

    http://user.it.uu.se/~mikpe/linux/perfctr/ http://sourceforge.net/projects/perfctr/

    Edit: It works for my purposes, though not very user-friendly.

提交回复
热议问题