SystemTap Tapset Reference Manual
SystemTap
SystemTap Tapset Reference Manual
by SystemTap
Copyright © 2008-2013 Red Hat, Inc. and others
This documentation is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
For more details see the file COPYING in the source distribution of Linux.
iii
Table of Contents
1. Introduction .................................................................................................................... 1
2. Context Functions ............................................................................................................ 2
function::addr ............................................................................................................. 3
function::asmlinkage .................................................................................................... 4
function::backtrace ...................................................................................................... 5
function::caller ............................................................................................................ 6
function::caller_addr .................................................................................................... 7
function::callers ........................................................................................................... 8
function::cmdline_arg ................................................................................................... 9
function::cmdline_args ................................................................................................ 10
function::cmdline_str .................................................................................................. 11
function::cpu ............................................................................................................. 12
function::cpuid .......................................................................................................... 13
function::egid ............................................................................................................ 14
function::env_var ....................................................................................................... 15
function::euid ............................................................................................................ 16
function::execname .................................................................................................... 17
function::fastcall ........................................................................................................ 18
function::gid ............................................................................................................. 19
function::int_arg ........................................................................................................ 20
function::is_myproc ................................................................................................... 21
function::is_return ...................................................................................................... 22
function::long_arg ...................................................................................................... 23
function::longlong_arg ................................................................................................ 24
function::modname .................................................................................................... 25
function::module_name ............................................................................................... 26
function::pexecname ................................................................................................... 27
function::pgrp ........................................................................................................... 28
function::pid ............................................................................................................. 29
function::pid2execname .............................................................................................. 30
function::pid2task ...................................................................................................... 31
function::pn .............................................................................................................. 32
function::pnlabel ........................................................................................................ 33
function::pointer_arg .................................................................................................. 34
function::pp .............................................................................................................. 35
function::ppfunc ........................................................................................................ 36
function::ppid ............................................................................................................ 37
function::print_backtrace ............................................................................................. 38
function::print_regs .................................................................................................... 39
function::print_stack ................................................................................................... 40
function::print_syms ................................................................................................... 41
function::print_ubacktrace ........................................................................................... 42
function::print_ubacktrace_brief ................................................................................... 43
function::print_ustack ................................................................................................. 44
function::print_usyms ................................................................................................. 45
function::probe_type ................................................................................................... 46
function::probefunc .................................................................................................... 47
function::probemod .................................................................................................... 48
function::pstrace ........................................................................................................ 49
function::register ........................................................................................................ 50
function::registers_valid .............................................................................................. 51
SystemTap Tapset Reference Manual
iv
function::regparm ...................................................................................................... 52
function::remote_id .................................................................................................... 53
function::remote_uri ................................................................................................... 54
function::s32_arg ....................................................................................................... 55
function::s64_arg ....................................................................................................... 56
function::sid .............................................................................................................. 57
function::sprint_backtrace ............................................................................................ 58
function::sprint_stack ................................................................................................. 59
function::sprint_syms ................................................................................................. 60
function::sprint_ubacktrace .......................................................................................... 61
function::sprint_ustack ................................................................................................ 62
function::sprint_usyms ................................................................................................ 63
function::stack ........................................................................................................... 64
function::stack_size .................................................................................................... 65
function::stack_unused ................................................................................................ 66
function::stack_used ................................................................................................... 67
function::stp_pid ........................................................................................................ 68
function::symdata ...................................................................................................... 69
function::symname ..................................................................................................... 70
function::target .......................................................................................................... 71
function::task_ancestry ............................................................................................... 72
function::task_backtrace .............................................................................................. 73
function::task_cpu ...................................................................................................... 74
function::task_current ................................................................................................. 75
function::task_egid ..................................................................................................... 76
function::task_euid ..................................................................................................... 77
function::task_execname ............................................................................................. 78
function::task_gid ...................................................................................................... 79
function::task_max_file_handles ................................................................................... 80
function::task_nice ..................................................................................................... 81
function::task_open_file_handles .................................................................................. 82
function::task_parent .................................................................................................. 83
function::task_pid ...................................................................................................... 84
function::task_prio ..................................................................................................... 85
function::task_state .................................................................................................... 86
function::task_tid ....................................................................................................... 87
function::task_uid ...................................................................................................... 88
function::tid .............................................................................................................. 89
function::u32_arg ....................................................................................................... 90
function::u64_arg ....................................................................................................... 91
function::u_register .................................................................................................... 92
function::uaddr .......................................................................................................... 93
function::ubacktrace ................................................................................................... 94
function::ucallers ....................................................................................................... 95
function::uid ............................................................................................................. 96
function::uint_arg ...................................................................................................... 97
function::ulong_arg .................................................................................................... 98
function::ulonglong_arg .............................................................................................. 99
function::umodname ................................................................................................. 100
function::user_mode ................................................................................................. 101
function::ustack ....................................................................................................... 102
function::usymdata ................................................................................................... 103
function::usymname ................................................................................................. 104
3. Timestamp Functions .................................................................................................... 105
SystemTap Tapset Reference Manual
v
function::HZ ........................................................................................................... 106
function::cpu_clock_ms ............................................................................................. 107
function::cpu_clock_ns .............................................................................................. 108
function::cpu_clock_s ............................................................................................... 109
function::cpu_clock_us .............................................................................................. 110
function::delete_stopwatch ......................................................................................... 111
function::get_cycles .................................................................................................. 112
function::gettimeofday_ms ......................................................................................... 113
function::gettimeofday_ns .......................................................................................... 114
function::gettimeofday_s ........................................................................................... 115
function::gettimeofday_us .......................................................................................... 116
function::jiffies ........................................................................................................ 117
function::local_clock_ms ........................................................................................... 118
function::local_clock_ns ............................................................................................ 119
function::local_clock_s .............................................................................................. 120
function::local_clock_us ............................................................................................ 121
function::read_stopwatch_ms ..................................................................................... 122
function::read_stopwatch_ns ...................................................................................... 123
function::read_stopwatch_s ........................................................................................ 124
function::read_stopwatch_us ...................................................................................... 125
function::start_stopwatch ........................................................................................... 126
function::stop_stopwatch ........................................................................................... 127
4. Time utility functions ................................................................................................... 128
function::ctime ........................................................................................................ 129
function::tz_ctime .................................................................................................... 130
function::tz_gmtoff ................................................................................................... 131
function::tz_name ..................................................................................................... 132
5. Shell command functions ............................................................................................... 133
function::system ....................................................................................................... 134
6. Memory Tapset ............................................................................................................ 135
function::addr_to_node .............................................................................................. 136
function::bytes_to_string ........................................................................................... 137
function::mem_page_size .......................................................................................... 138
function::pages_to_string ........................................................................................... 139
function::proc_mem_data .......................................................................................... 140
function::proc_mem_data_pid .................................................................................... 141
function::proc_mem_rss ............................................................................................ 142
function::proc_mem_rss_pid ...................................................................................... 143
function::proc_mem_shr ............................................................................................ 144
function::proc_mem_shr_pid ...................................................................................... 145
function::proc_mem_size ........................................................................................... 146
function::proc_mem_size_pid ..................................................................................... 147
function::proc_mem_string ........................................................................................ 148
function::proc_mem_string_pid .................................................................................. 149
function::proc_mem_txt ............................................................................................ 150
function::proc_mem_txt_pid ....................................................................................... 151
function::vm_fault_contains ....................................................................................... 152
probe::vm.brk .......................................................................................................... 153
probe::vm.kfree ....................................................................................................... 154
probe::vm.kmalloc .................................................................................................... 155
probe::vm.kmalloc_node ........................................................................................... 156
probe::vm.kmem_cache_alloc ..................................................................................... 157
probe::vm.kmem_cache_alloc_node ............................................................................ 158
probe::vm.kmem_cache_free ...................................................................................... 159