From 0166f61e34a34ef1138e1de7a7068bf602741a0c Mon Sep 17 00:00:00 2001 From: William Cohen Date: Tue, 25 Nov 2008 11:03:28 -0500 Subject: Add context, timestamp, memory, and networking tapsets. --- tapset/timestamp.stp | 72 ++++++++++++++++++---------------------------------- 1 file changed, 25 insertions(+), 47 deletions(-) (limited to 'tapset/timestamp.stp') diff --git a/tapset/timestamp.stp b/tapset/timestamp.stp index 4c8592a8..29763cb9 100644 --- a/tapset/timestamp.stp +++ b/tapset/timestamp.stp @@ -7,79 +7,57 @@ // Public License (GPL); either version 2, or (at your option) any // later version. -/// -/// Timestamp Functions -/// -/// Each timestamp function returns a value to indicate when -/// the function is executed. -/// Thus, these returned values can be used to indicate -/// when an event occurs, provide an ordering for events, or compute -/// the amount of time elapsed between to time stamps. -/// - %{ #include %} -/// -/// get_cycles:long() -/// get_cycles -/// -/// Return the processor cycle counter value, or 0 if unavailable. -/// -/// +/** + * sfunction get_cycles - Processor cycle count. + * + * Return the processor cycle counter value, or 0 if unavailable. + */ function get_cycles:long () %{ /* pure */ cycles_t c = get_cycles(); THIS->__retvalue = (int64_t) c; %} -/// -/// gettimeofday_ns:long () -/// gettimeofday_ns -/// -/// Return the number of nanoseconds since the UNIX epoch. -/// -/// +/** + * sfunction gettimeofday_ns - Number of nanoseconds since UNIX epoch. + * + * Return the number of nanoseconds since the UNIX epoch. + */ function gettimeofday_ns:long () %{ /* pure */ /* NOTE: we can't use do_gettimeofday because we could be called from a * context where xtime_lock is already held. See bug #2525. */ THIS->__retvalue = _stp_gettimeofday_ns(); %} -/// -/// gettimeofday_us:long () -/// gettimeofday_us -/// -/// Return the number of microseconds since the UNIX epoch. -/// -/// +/** + * sfunction gettimeofday_us - Number of microseconds since UNIX epoch. + * + * Return the number of microseconds since the UNIX epoch. + */ function gettimeofday_us:long () { return gettimeofday_ns() / 1000; } -/// -/// gettimeofday_ms:long () -/// gettimeofday_ms -/// -/// Return the number of milliseconds since the UNIX epoch. -/// -/// +/** + * sfunction gettimeofday_ms - Number of milliseconds since UNIX epoch. + * + * Return the number of milliseconds since the UNIX epoch. + */ function gettimeofday_ms:long () { return gettimeofday_ns() / 1000000; } -/// -/// gettimeofday_s:long () -/// gettimeofday_s -/// -/// Return the number of seconds since the UNIX epoch. -/// -/// +/** + * sfunction gettimeofday_s - Number of seconds since UNIX epoch. + * + * Return the number of seconds since the UNIX epoch. + */ function gettimeofday_s:long () { return gettimeofday_ns() / 1000000000; } // likewise jiffies, monotonic_clock ... - -/// -- cgit