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


On Monday, August 07, 2006 10:24 PM, Li Guanglei wrote:
>> Another question: Does anybody know how to call sched_clock() in a
>> kernel module? insmod complains of unknown symbol of sched_clock

Since there's no EXPORT_SYMBOL, it's not part of the kernel ABI, and
thus the symbol won't be resolved when you insert the module.  One could
probably link it manually, using a function pointer and a kallsyms
lookup.  This goes against the purpose of the ABI and EXPORTs though,
and would make us very bad kernel citizens.  Better to ask for the
export, or improve our own _stp_gettimeofday_us.

We could also add a new function to our runtime for simple timestamps,
inspired by sched_clock, which gives a stable timebase that's not
necessarily sync'ed with gettimeofday.  Most usages are concerned with
relative time anyway, rather than absolute.

Josh


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