/
usr
/
share
/
systemtap
/
tapset
/
/usr/share/systemtap/tapset
mkdir
upload
Name
Size
Mode
Actions
arm/
-
0755
rm
arm64/
-
0755
rm
bpf/
-
0755
rm
dyninst/
-
0755
rm
i386/
-
0755
rm
ia64/
-
0755
rm
linux/
-
0755
rm
mips/
-
0755
rm
powerpc/
-
0755
rm
riscv/
-
0755
rm
s390/
-
0755
rm
x86_64/
-
0755
rm
ansi.stp
4178
0644
edit
dl
rm
argv.stp
2721
0644
edit
dl
rm
choose_defined.stpm
208
0644
edit
dl
rm
container_of.stpm
235
0644
edit
dl
rm
context.stp
6103
0644
edit
dl
rm
errno.stp
9118
0644
edit
dl
rm
floatingpoint.stp
6936
0644
edit
dl
rm
indent-default.stp
59
0644
edit
dl
rm
indent.stp
4590
0644
edit
dl
rm
init.stp
269
0644
edit
dl
rm
input.stp
263
0644
edit
dl
rm
java.stp
1346
0644
edit
dl
rm
libperl5.26.3-64.stp
1339
0644
edit
dl
rm
libpython2.7-64.stp
522
0644
edit
dl
rm
livepatch.stp
3006
0644
edit
dl
rm
logging.stp
4132
0644
edit
dl
rm
macros.stpm
562
0644
edit
dl
rm
null.stp
17
0644
edit
dl
rm
offsetof.stpm
183
0644
edit
dl
rm
oneshot.stp
38
0644
edit
dl
rm
pn.stp
1588
0644
edit
dl
rm
print_stats.stpm
1719
0644
edit
dl
rm
private30.stpm
80
0644
edit
dl
rm
prometheus.stp
129
0644
edit
dl
rm
prometheus.stpm
8380
0644
edit
dl
rm
python.stp
474
0644
edit
dl
rm
python2.stp
29435
0644
edit
dl
rm
python3.stp
36655
0644
edit
dl
rm
queue_stats.stp
9487
0644
edit
dl
rm
random.stp
432
0644
edit
dl
rm
README
371
0644
edit
dl
rm
regex.stp
4107
0644
edit
dl
rm
registers.stp
11081
0644
edit
dl
rm
sizeof.stpm
212
0644
edit
dl
rm
speculative.stp
1746
0644
edit
dl
rm
sreg_arch.stpm
263
0644
edit
dl
rm
stap_staticmarkers.stp
9670
0644
edit
dl
rm
stopwatch.stp
3063
0644
edit
dl
rm
string.stp
7514
0644
edit
dl
rm
switchfile.stp
612
0644
edit
dl
rm
system.stp
593
0644
edit
dl
rm
this.stp
160
0644
edit
dl
rm
timers.stp
924
0644
edit
dl
rm
tls.stp
8099
0644
edit
dl
rm
tokenize.stp
2124
0644
edit
dl
rm
try_assign.stpm
768
0644
edit
dl
rm
type_defined.stpm
374
0644
edit
dl
rm
tzinfo.stp
930
0644
edit
dl
rm
uconversions-guru.stp
6078
0644
edit
dl
rm
uconversions.stp
36640
0644
edit
dl
rm
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. // <tapsetdescription> // 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. // </tapsetdescription> /** * 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; } %}
Save
cmd:
run