|
Server : Apache/2.2.2 (Fedora) System : Linux App1.pathumtani.go.th 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686 User : apache ( 48) PHP Version : 5.2.9 Disable Function : NONE Directory : /usr/share/systemtap/tapset/ |
Upload File : |
// logging tapset
// Copyright (C) 2005, 2006 Red Hat Inc.
//
// This file is part of systemtap, and is free software. You can
// redistribute it and/or modify it under the terms of the GNU General
// Public License (GPL); either version 2, or (at your option) any
// later version.
// send a string out with a newline
function log (msg:string) %{
_stp_printf ("%s\n", THIS->msg);
%}
function warn (msg:string) %{
_stp_warn ("%s", THIS->msg);
%}
// NB: exit() does *not* cause immediate return from current function/probe
function exit () %{
atomic_set (&session_state, STAP_SESSION_STOPPING);
_stp_exit ();
%}
function error (msg:string) %{
/* This is an assignment of a local char[] to a global char*.
It would normally be just as unsafe as returning a pointer to
a local variable from a function. However, the translated
code ensures that upon an error (last_error != NULL), the
context stack is only ever unwound, and not reused, before
the probe-level stp-error call. */
CONTEXT->last_error = THIS->msg;
CONTEXT->last_stmt = NULL;
%}
function stp_print_binary(n:long, arg1:long, arg2:long, arg3:long, arg4:long) %{
_stp_print_binary (THIS->n, THIS->arg1, THIS->arg2, THIS->arg3, THIS->arg4);
%}