|
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17 System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64 User : nobody ( 99) PHP Version : 5.2.17 Disable Function : NONE Directory : /usr/share/systemtap/tapset/ |
Upload File : |
// User context unwind tapset
// Copyright (C) 2009-2011 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.
/**
* sfunction print_ubacktrace - Print stack back trace for current task.
*
* Equivalent to print_ustack(ubacktrace()), except that deeper stack
* nesting may be supported. Returns nothing.
*
* Note: To get (full) backtraces for user space applications and shared
* shared libraries not mentioned in the current script run stap with
* -d /path/to/exe-or-so and/or add --ldd to load all needed unwind data.
*/
function print_ubacktrace () %{ /* pragma:unwind */ /* pragma:symbols */
/* myproc-unprivileged */ /* pragma:uprobes */ /* pragma:vma */
_stp_stack_user_print(CONTEXT, _STP_SYM_FULL);
%}
/**
* sfunction sprint_ubacktrace - Return stack back trace for current task as string.
*
* Returns a simple backtrace for the current task. One line per
* address. Includes the symbol name (or hex address if symbol
* couldn't be resolved) and module name (if found). Includes the
* offset from the start of the function if found, otherwise the
* offset will be added to the module (if found, between
* brackets). Returns the backtrace as string (each line terminated by
* a newline character). Note that the returned stack will be
* truncated to MAXSTRINGLEN, to print fuller and richer stacks use
* print_ubacktrace(). Equivalent to sprint_ustack(ubacktrace()),
* but more efficient (no need to translate between hex strings and
* final backtrace string).
*
* Note: To get (full) backtraces for user space applications and shared
* shared libraries not mentioned in the current script run stap with
* -d /path/to/exe-or-so and/or add --ldd to load all needed unwind data.
*/
function sprint_ubacktrace:string () %{ /* pragma:unwind */ /* pragma:symbols */
/* pure */ /* myproc-unprivileged */ /* pragma:uprobes */ /* pragma:vma */
_stp_stack_user_sprint (STAP_RETVALUE, MAXSTRINGLEN, CONTEXT,
_STP_SYM_SIMPLE);
%}
/**
* sfunction print_ubacktrace_brief- Print stack back trace for current task.
*
* Equivalent to print_ubacktrace(), but output for each symbol is
* shorter (just name and offset, or just the hex address of no symbol
* could be found).
*
* Note: To get (full) backtraces for user space applications and shared
* shared libraries not mentioned in the current script run stap with
* -d /path/to/exe-or-so and/or add --ldd to load all needed unwind data.
*/
function print_ubacktrace_brief () %{ /* pragma:unwind */ /* pragma:symbols */
/* myproc-unprivileged */ /* pragma:uprobes */ /* pragma:vma */
_stp_stack_user_print(CONTEXT, _STP_SYM_BRIEF);
%}
/**
* sfunction ubacktrace - Hex backtrace of current task stack.
*
* Return a string of hex addresses that are a backtrace of the
* stack of the current task. Output may be truncated as per maximum
* string length. Returns empty string when current probe point cannot
* determine user backtrace.
*
* Note: To get (full) backtraces for user space applications and shared
* shared libraries not mentioned in the current script run stap with
* -d /path/to/exe-or-so and/or add --ldd to load all needed unwind data.
*/
function ubacktrace:string () %{ /* pragma:unwind */
/* pure */ /* myproc-unprivileged */ /* pragma:uprobes */ /* pragma:vma */
_stp_stack_user_sprint (STAP_RETVALUE, MAXSTRINGLEN, CONTEXT,
_STP_SYM_NONE);
%}