From a5a5398e240d39cedb7d944edb833d8449da3e11 Mon Sep 17 00:00:00 2001 From: fche Date: Fri, 2 Sep 2005 15:54:18 +0000 Subject: 2005-09-02 Frank Ch. Eigler * tapset/*.stp: Renamed several files to simplify names. --- tapset/builtin_conversions.stp | 14 ------------- tapset/builtin_logging.stp | 47 ------------------------------------------ tapset/conversions.stp | 14 +++++++++++++ tapset/logging.stp | 47 ++++++++++++++++++++++++++++++++++++++++++ tapset/timestamp.stp | 19 +++++++++++++++++ tapset/timestamp_functions.stp | 19 ----------------- 6 files changed, 80 insertions(+), 80 deletions(-) delete mode 100644 tapset/builtin_conversions.stp delete mode 100644 tapset/builtin_logging.stp create mode 100644 tapset/conversions.stp create mode 100644 tapset/logging.stp create mode 100644 tapset/timestamp.stp delete mode 100644 tapset/timestamp_functions.stp (limited to 'tapset') diff --git a/tapset/builtin_conversions.stp b/tapset/builtin_conversions.stp deleted file mode 100644 index 5c0230d4..00000000 --- a/tapset/builtin_conversions.stp +++ /dev/null @@ -1,14 +0,0 @@ -function _hexstring (num) %{ - sprintf (THIS->__retvalue, "0x%llx", (long long) THIS->num); -%} - -function hexstring (num) { - return "" . _hexstring (num + 0) -} -function _string (num) %{ - sprintf (THIS->__retvalue, "%lld", (long long) THIS->num); -%} - -function string (num) { - return "" . _string (num + 0) -} diff --git a/tapset/builtin_logging.stp b/tapset/builtin_logging.stp deleted file mode 100644 index 432d8b1a..00000000 --- a/tapset/builtin_logging.stp +++ /dev/null @@ -1,47 +0,0 @@ -# This file contains simple bridging functions to the runtime - -function _print (msg) %{ - _stp_print (THIS->msg); -%} - -function print (msg) { - _print (msg . "\n") -} - -function _log (msg) %{ - _stp_log (THIS->msg); -%} - -function log (msg) { - _log (msg . "") -} - -function _printk (msg) %{ - printk (KERN_INFO "%s\n", THIS->msg); -%} - -function printk (msg) { - _printk (msg . "") -} - -function _warn (msg) %{ - _stp_warn ("%s", THIS->msg); -%} - -function warn (msg) { - _warn (msg . "") -} - -// NB: exit() does *not* cause immediate return from current function/probe -function exit () %{ - _stp_exit (); -%} - -function _error (msg) %{ - CONTEXT->last_error = "called error()"; /* kill current probe */ - _stp_error ("%s", THIS->msg); /* implies _stp_exit */ -%} - -function error (msg) { - _error (msg . "") -} diff --git a/tapset/conversions.stp b/tapset/conversions.stp new file mode 100644 index 00000000..5c0230d4 --- /dev/null +++ b/tapset/conversions.stp @@ -0,0 +1,14 @@ +function _hexstring (num) %{ + sprintf (THIS->__retvalue, "0x%llx", (long long) THIS->num); +%} + +function hexstring (num) { + return "" . _hexstring (num + 0) +} +function _string (num) %{ + sprintf (THIS->__retvalue, "%lld", (long long) THIS->num); +%} + +function string (num) { + return "" . _string (num + 0) +} diff --git a/tapset/logging.stp b/tapset/logging.stp new file mode 100644 index 00000000..432d8b1a --- /dev/null +++ b/tapset/logging.stp @@ -0,0 +1,47 @@ +# This file contains simple bridging functions to the runtime + +function _print (msg) %{ + _stp_print (THIS->msg); +%} + +function print (msg) { + _print (msg . "\n") +} + +function _log (msg) %{ + _stp_log (THIS->msg); +%} + +function log (msg) { + _log (msg . "") +} + +function _printk (msg) %{ + printk (KERN_INFO "%s\n", THIS->msg); +%} + +function printk (msg) { + _printk (msg . "") +} + +function _warn (msg) %{ + _stp_warn ("%s", THIS->msg); +%} + +function warn (msg) { + _warn (msg . "") +} + +// NB: exit() does *not* cause immediate return from current function/probe +function exit () %{ + _stp_exit (); +%} + +function _error (msg) %{ + CONTEXT->last_error = "called error()"; /* kill current probe */ + _stp_error ("%s", THIS->msg); /* implies _stp_exit */ +%} + +function error (msg) { + _error (msg . "") +} diff --git a/tapset/timestamp.stp b/tapset/timestamp.stp new file mode 100644 index 00000000..f8e1ea4e --- /dev/null +++ b/tapset/timestamp.stp @@ -0,0 +1,19 @@ +%{ +#include +%} + +// return in milliseconds since epoch +function gettimeofday_ms () %{ + struct timeval tm; + do_gettimeofday (& tm); + THIS->__retvalue = (tm.tv_sec * 1000) + (tm.tv_usec / 1000); +%} + +// return in seconds since epoch +function gettimeofday_s () %{ + struct timeval tm; + do_gettimeofday (& tm); + THIS->__retvalue = tm.tv_sec; +%} + +// likewise jiffies, monotonic_clock ... diff --git a/tapset/timestamp_functions.stp b/tapset/timestamp_functions.stp deleted file mode 100644 index f8e1ea4e..00000000 --- a/tapset/timestamp_functions.stp +++ /dev/null @@ -1,19 +0,0 @@ -%{ -#include -%} - -// return in milliseconds since epoch -function gettimeofday_ms () %{ - struct timeval tm; - do_gettimeofday (& tm); - THIS->__retvalue = (tm.tv_sec * 1000) + (tm.tv_usec / 1000); -%} - -// return in seconds since epoch -function gettimeofday_s () %{ - struct timeval tm; - do_gettimeofday (& tm); - THIS->__retvalue = tm.tv_sec; -%} - -// likewise jiffies, monotonic_clock ... -- cgit