summaryrefslogtreecommitdiffstats
path: root/tapset/logging.stp
diff options
context:
space:
mode:
authorfche <fche>2005-09-03 16:52:41 +0000
committerfche <fche>2005-09-03 16:52:41 +0000
commit6a505121fc997e6f21d26f8c8656f99e58faaaab (patch)
treea40bb598454cf046c55c54ddfb46f83492fbdcb9 /tapset/logging.stp
parentd9e1dc7a03b0341bc924ba4a008a31676dbc9510 (diff)
downloadsystemtap-steved-6a505121fc997e6f21d26f8c8656f99e58faaaab.tar.gz
systemtap-steved-6a505121fc997e6f21d26f8c8656f99e58faaaab.tar.xz
systemtap-steved-6a505121fc997e6f21d26f8c8656f99e58faaaab.zip
2005-09-03 Frank Ch. Eigler <fche@elastic.org>
PR 1292, by popular request. * parse.cxx (parse_functiondecl): Allow optional value/param type declarations. * stap.1.in: Document this. * tapset/*.stp: Convert most functions accordingly. * testsuite/parseok/twelve.stp, semok/seven.stp, semko/twenty.stp: Test this.
Diffstat (limited to 'tapset/logging.stp')
-rw-r--r--tapset/logging.stp28
1 files changed, 6 insertions, 22 deletions
diff --git a/tapset/logging.stp b/tapset/logging.stp
index a2abf922..eff7b555 100644
--- a/tapset/logging.stp
+++ b/tapset/logging.stp
@@ -1,44 +1,28 @@
# This file contains simple bridging functions to the runtime
-function _print (msg) %{
+function print (msg:string) %{
_stp_print (THIS->msg);
%}
-function print (msg) {
- _print (msg . "\n")
-}
-
-// same as print
+// almost the same as print
function log (msg) {
- _print (msg . "\n")
+ print (msg . "\n")
}
-function _printk (msg) %{
+function printk (msg:string) %{
printk (KERN_INFO "%s\n", THIS->msg);
%}
-function printk (msg) {
- _printk (msg . "")
-}
-
-function _warn (msg) %{
+function warn (msg:string) %{
_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) %{
+function error (msg:string) %{
CONTEXT->last_error = "called error()"; /* kill current probe */
_stp_error ("%s", THIS->msg); /* implies _stp_exit */
%}
-
-function error (msg) {
- _error (msg . "")
-}