diff options
author | fche <fche> | 2005-09-02 15:54:18 +0000 |
---|---|---|
committer | fche <fche> | 2005-09-02 15:54:18 +0000 |
commit | a5a5398e240d39cedb7d944edb833d8449da3e11 (patch) | |
tree | f5f615fafadc093c70a6823da2852a698061ef1d /tapset/logging.stp | |
parent | 86333c5231e7f07ae56443a72155a59aa8dd1ddb (diff) | |
download | systemtap-steved-a5a5398e240d39cedb7d944edb833d8449da3e11.tar.gz systemtap-steved-a5a5398e240d39cedb7d944edb833d8449da3e11.tar.xz systemtap-steved-a5a5398e240d39cedb7d944edb833d8449da3e11.zip |
2005-09-02 Frank Ch. Eigler <fche@elastic.org>
* tapset/*.stp: Renamed several files to simplify names.
Diffstat (limited to 'tapset/logging.stp')
-rw-r--r-- | tapset/logging.stp | 47 |
1 files changed, 47 insertions, 0 deletions
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 . "") +} |