Messages in this thread | | | Date | Mon, 07 Dec 2009 01:10:32 +0800 | From | Xiao Guangrong <> | Subject | Re: [PATCH] perf/sched: fix for getting task's execute time |
| |
Peter Zijlstra wrote:
>> We really should not be using these proc files but instead make sure >> this information gets transferred through a tracepoint or similar. >> >> Reading these proc files is too prone to races. > > We can probably get the runtime by grouping a task-clock swcounter with > an appropriate other event. >
Hi Peter,
Thanks your suggestion.
Actually, we can call getrusage(RUSAGE_THREAD, ru) to get current task's execute time, and I think this is a simpler way.
I'll send v2 patch later.
Thanks, Xiao
| |