/usr/share/systemtap/tapset
NameSizeModeActions
arm/-0755rm
arm64/-0755rm
bpf/-0755rm
dyninst/-0755rm
i386/-0755rm
ia64/-0755rm
linux/-0755rm
mips/-0755rm
powerpc/-0755rm
riscv/-0755rm
s390/-0755rm
x86_64/-0755rm
ansi.stp41780644editdlrm
argv.stp27210644editdlrm
choose_defined.stpm2080644editdlrm
container_of.stpm2350644editdlrm
context.stp61030644editdlrm
errno.stp91180644editdlrm
floatingpoint.stp69360644editdlrm
indent-default.stp590644editdlrm
indent.stp45900644editdlrm
init.stp2690644editdlrm
input.stp2630644editdlrm
java.stp13460644editdlrm
libperl5.26.3-64.stp13390644editdlrm
libpython2.7-64.stp5220644editdlrm
livepatch.stp30060644editdlrm
logging.stp41320644editdlrm
macros.stpm5620644editdlrm
null.stp170644editdlrm
offsetof.stpm1830644editdlrm
oneshot.stp380644editdlrm
pn.stp15880644editdlrm
print_stats.stpm17190644editdlrm
private30.stpm800644editdlrm
prometheus.stp1290644editdlrm
prometheus.stpm83800644editdlrm
python.stp4740644editdlrm
python2.stp294350644editdlrm
python3.stp366550644editdlrm
queue_stats.stp94870644editdlrm
random.stp4320644editdlrm
README3710644editdlrm
regex.stp41070644editdlrm
registers.stp110810644editdlrm
sizeof.stpm2120644editdlrm
speculative.stp17460644editdlrm
sreg_arch.stpm2630644editdlrm
stap_staticmarkers.stp96700644editdlrm
stopwatch.stp30630644editdlrm
string.stp75140644editdlrm
switchfile.stp6120644editdlrm
system.stp5930644editdlrm
this.stp1600644editdlrm
timers.stp9240644editdlrm
tls.stp80990644editdlrm
tokenize.stp21240644editdlrm
try_assign.stpm7680644editdlrm
type_defined.stpm3740644editdlrm
tzinfo.stp9300644editdlrm
uconversions-guru.stp60780644editdlrm
uconversions.stp366400644editdlrm
Edit: /usr/share/systemtap/tapset/context.stp (6103B)
// context tapset // Copyright (C) 2005-2011 Red Hat Inc. // Copyright (C) 2006 Intel Corporation. // // 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. // // Context functions provide additional information about where an event occurred. These functions can //provide information such as a backtrace to where the event occurred and the current register values for the //processor. // /** * sfunction print_regs - Print a register dump * * Description: This function prints a register dump. Does nothing if no registers are available for the probe point. */ function print_regs () %{ if (c->user_mode_p && CONTEXT->uregs) { _stp_print_regs (CONTEXT->uregs); } else if (CONTEXT->kregs) { _stp_print_regs (CONTEXT->kregs); } %} function umodbuildid:string (address:long) %{ /* pragma:vma */ void *ubid_struct = NULL; int i,j; struct _stp_module * p; static const char hex[] = "0123456789abcdef"; stap_find_vma_map_info(current, STAP_ARG_address, NULL, NULL, NULL, NULL, &ubid_struct); p = (struct _stp_module*) ubid_struct; if (p == NULL){ STAP_ERROR("umodbuildid 0x%llx unknown\n ", STAP_ARG_address); } for(i=0,j=0; j < p->build_id_len; ++j && i < MAXSTRINGLEN) { unsigned char temp = p->build_id_bits[j]; STAP_RETVALUE[i++] = hex[temp >> 4]; STAP_RETVALUE[i++] = hex[temp & 15]; } %} # Finds the module-relative offset of the given address in the current user process function umodaddr:long (address:long) %{ /* pragma:vma */ long vm_start = -1; stap_find_vma_map_info(current, STAP_ARG_address, &vm_start, NULL, NULL, NULL,NULL); if(vm_start == -1) STAP_ERROR("umodaddr 0x%llx unknown\n ", STAP_ARG_address); STAP_RETURN(STAP_ARG_address - vm_start); %} /** * sfunction pp - Returns the active probe point * * Description: This function returns the fully-resolved probe point * associated with a currently running probe handler, including alias * and wild-card expansion effects. Context: The current probe point. */ function pp:string () %{ /* pure */ /* unprivileged */ /* stable */ strlcpy (STAP_RETVALUE, CONTEXT->probe_point, MAXSTRINGLEN); %} /** * sfunction ppfunc - Returns the function name parsed from pp() * * Description: This returns the function name from the current pp(). * Not all pp() have functions in them, in which case "" is returned. */ function ppfunc:string () %{ /* pure */ /* unprivileged */ /* stable */ char *ptr, *start; /* This is based on the pre-2.0 behavior of probefunc(), but without * the _stp_snprint_addr fallback, so we're purely pp()-based. * * The obsolete inline("...") syntax is dropped, but in its place we'll * look for function names in statement("...") form. */ STAP_RETVALUE[0] = '\0'; start = strstr(CONTEXT->probe_point, "function(\""); ptr = start + 10; if (!start) { start = strstr(CONTEXT->probe_point, "statement(\""); ptr = start + 11; } if (start) { int len = MAXSTRINGLEN; char *dst = STAP_RETVALUE; while (*ptr != '@' && *ptr != '"' && --len > 0 && *ptr) *dst++ = *ptr++; *dst = 0; } %} /** * sfunction probe_type - The low level probe handler type of the current probe. * * Description: Returns a short string describing the low level probe handler * type for the current probe point. This is for informational purposes only. * Depending on the low level probe handler different context functions can * or cannot provide information about the current event (for example some * probe handlers only trigger in user space and have no associated kernel * context). High-level probes might map to the same or different low-level * probes (depending on systemtap version and/or kernel used). */ function probe_type:string() %{ /* pure */ /* unprivileged */ /* stable */ switch (CONTEXT->probe_type) { case stp_probe_type_been: strlcpy (STAP_RETVALUE, "begin_end", MAXSTRINGLEN); break; case stp_probe_type_itrace: strlcpy (STAP_RETVALUE, "itrace", MAXSTRINGLEN); break; case stp_probe_type_marker: strlcpy (STAP_RETVALUE, "kernel_marker", MAXSTRINGLEN); break; case stp_probe_type_perf: strlcpy (STAP_RETVALUE, "perf_event", MAXSTRINGLEN); break; case stp_probe_type_procfs: strlcpy (STAP_RETVALUE, "procfs", MAXSTRINGLEN); break; case stp_probe_type_timer: strlcpy (STAP_RETVALUE, "timer", MAXSTRINGLEN); break; case stp_probe_type_hrtimer: strlcpy (STAP_RETVALUE, "hrtimer", MAXSTRINGLEN); break; case stp_probe_type_profile_timer: strlcpy (STAP_RETVALUE, "profile_timer", MAXSTRINGLEN); break; case stp_probe_type_netfilter: strlcpy (STAP_RETVALUE, "netfilter", MAXSTRINGLEN); break; case stp_probe_type_utrace: strlcpy (STAP_RETVALUE, "utrace", MAXSTRINGLEN); break; case stp_probe_type_utrace_syscall: strlcpy (STAP_RETVALUE, "utrace_syscall", MAXSTRINGLEN); break; case stp_probe_type_kprobe: strlcpy (STAP_RETVALUE, "kprobe", MAXSTRINGLEN); break; case stp_probe_type_kretprobe: strlcpy (STAP_RETVALUE, "kretprobe", MAXSTRINGLEN); break; case stp_probe_type_uprobe: strlcpy (STAP_RETVALUE, "uprobe", MAXSTRINGLEN); break; case stp_probe_type_uretprobe: strlcpy (STAP_RETVALUE, "uretprobe", MAXSTRINGLEN); break; case stp_probe_type_hwbkpt: strlcpy (STAP_RETVALUE, "hardware_data_breakpoint", MAXSTRINGLEN); break; case stp_probe_type_tracepoint: strlcpy (STAP_RETVALUE, "kernel_tracepoint", MAXSTRINGLEN); break; default: /* This should never happen. */ snprintf(CONTEXT->error_buffer, sizeof(CONTEXT->error_buffer), "Unknown probe-type state %d", CONTEXT->probe_type); CONTEXT->last_error = CONTEXT->error_buffer; break; } %}