This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: using get_cycles() to get the real elapsed time


Roland McGrath wrote:
sched_clock is used by the scheduler and POSIX CPU clocks/timers, which
have the same requirements of being accurate and cheap. It returns ns. It can be called from interrupt level. Its implementation is already
hardware-specific and is get_cycles with appropriate adjustments or something else with nice properties for the particular hardware.
I think this is in all likelihood the best interface to use, if the
hrtimer stuff is not.

I tried to call sched_clock() from embedded c codes but failed. insmod give a error of "stap_4265: Unknown symbol sched_clock". I think the reason is that sched_clock() isn't exported by EXPORT_SYMBOL().


- Guanglei


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]