Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- naresh@Linaro:~$ ssh root@192.168.1.63
- root@192.168.1.63's password:
- Welcome to Linaro 13.08 (GNU/Linux 3.11.0-rc5 armv7l)
- * Documentation: https://wiki.linaro.org/
- Last login: Tue Sep 17 10:17:32 2013 from 192.168.1.16
- root@linaro-developer:~# cd systemtap-2.2.1/testsuite/
- root@linaro-developer:~/systemtap-2.2.1/testsuite# cat .systemtap-root/cache/fc/stap_fca23709d51b27106ac4a61f1461494f_15128.c
- #define STAP_MSG_RUNTIME_H_01 "myproc-unprivileged tapset function called without is_myproc checking for pid %d (euid %d)"
- #define STAP_MSG_LOC2C_01 "read fault [man error::fault] at 0x%p (%s)"
- #define STAP_MSG_LOC2C_02 "write fault [man error::fault] at 0x%p (%s)"
- #define STAP_MSG_LOC2C_03 "divide by zero in DWARF operand (%s)"
- #define STAP_VERSION(a, b) ( ((a) << 8) + (b) )
- #ifndef STAP_COMPAT_VERSION
- #define STAP_COMPAT_VERSION STAP_VERSION(2, 2)
- #endif
- #include "runtime_defines.h"
- #include "linux/perf_read.h"
- #define STP_PR_STAPUSR 0x2
- #define STP_PR_STAPSYS 0x4
- #define STP_PR_STAPDEV 0x8
- #define STP_PRIVILEGE 0x8
- int stp_required_privilege __attribute__ ((section (".stap_privilege"))) = STP_PRIVILEGE;
- #ifndef MAXNESTING
- #define MAXNESTING 6
- #endif
- #define STP_SKIP_BADVARS 0
- #define STP_PROBE_COUNT 80
- #include "runtime.h"
- #include <linux/version.h>
- #include <linux/file.h>
- #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,25)
- #include <linux/fdtable.h>
- #endif
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0)
- #include <linux/sched/rt.h>
- #endif
- #ifndef STAPCONF_TASK_UID
- #include <linux/cred.h>
- #endif
- #define __STP_GET_USER(t, warn) \
- do { \
- __label__ deref_fault; \
- t *_ptr = (t*) (intptr_t) STAP_ARG_addr; \
- STAP_RETVALUE = uread (_ptr); \
- if (0) { \
- deref_fault: \
- STAP_RETVALUE = 0; \
- CONTEXT->last_error = NULL; \
- if (warn) { \
- snprintf(CONTEXT->error_buffer, \
- sizeof(CONTEXT->error_buffer), \
- "user %s copy fault %p", #t, _ptr); \
- _stp_warn(CONTEXT->error_buffer); \
- } \
- } \
- } while (0)
- #define STP_GET_USER(t) __STP_GET_USER(t, 0)
- #define STP_GET_USER_WARN(t) __STP_GET_USER(t, 1)
- #define STAP_NEED_CONTEXT_TOKENIZE 1
- #define STAP_NEED_GETTIMEOFDAY 1
- struct context {
- #include "common_probe_context.h"
- union {
- struct probe_2026_locals {
- union {
- struct {
- int64_t __tmp0;
- int64_t __tmp2;
- };
- };
- } probe_2026;
- struct probe_2027_locals {
- union {
- struct {
- int64_t __tmp0;
- };
- struct {
- int64_t __tmp1;
- };
- };
- } probe_2027;
- struct probe_2028_locals {
- } probe_2028;
- struct probe_2067_locals {
- int64_t __tmp0;
- } probe_2067;
- } probe_locals;
- union {
- struct function___indent_timestamp_locals {
- int64_t __retvalue;
- } function___indent_timestamp;
- struct function__generic_indent_locals {
- int64_t l_ts;
- int64_t l_x;
- int64_t l_idx;
- string_t l_desc;
- int64_t l_delta;
- union {
- struct {
- int64_t __tmp0;
- };
- struct {
- int64_t __tmp2;
- int64_t __tmp3;
- int64_t __tmp4;
- int64_t __tmp5;
- int64_t __tmp6;
- };
- struct {
- int64_t __tmp8;
- int64_t __tmp10;
- int64_t __tmp11;
- };
- struct {
- int64_t __tmp12;
- int64_t __tmp13;
- int64_t __tmp14;
- };
- struct {
- int64_t __tmp16;
- int64_t __tmp17;
- int64_t __tmp18;
- string_t __tmp19;
- int64_t __tmp20;
- string_t __tmp22;
- };
- };
- string_t __retvalue;
- } function__generic_indent;
- struct function_addr_locals {
- int64_t __retvalue;
- } function_addr;
- struct function_execname_locals {
- string_t __retvalue;
- } function_execname;
- struct function_gettimeofday_ns_locals {
- int64_t __retvalue;
- } function_gettimeofday_ns;
- struct function_gettimeofday_us_locals {
- int64_t __tmp0;
- int64_t __retvalue;
- } function_gettimeofday_us;
- struct function_pid_locals {
- int64_t __retvalue;
- } function_pid;
- struct function_probefunc_locals {
- int64_t __tmp0;
- int64_t __tmp1;
- string_t __retvalue;
- } function_probefunc;
- struct function_stp_pid_locals {
- int64_t __retvalue;
- } function_stp_pid;
- struct function_symname_locals {
- int64_t l_addr;
- string_t __retvalue;
- } function_symname;
- struct function_thread_indent_locals {
- int64_t l_delta;
- int64_t __tmp0;
- string_t __tmp1;
- string_t __tmp2;
- int64_t __tmp3;
- string_t __tmp4;
- int64_t __tmp5;
- string_t __retvalue;
- } function_thread_indent;
- struct function_tid_locals {
- int64_t __retvalue;
- } function_tid;
- struct function_trace_locals {
- int64_t l_entry_p;
- int64_t __tmp0;
- int64_t __tmp1;
- string_t __tmp2;
- int64_t __tmp3;
- string_t __tmp4;
- string_t __tmp5;
- /* no return value */
- } function_trace;
- struct function_uaddr_locals {
- int64_t __retvalue;
- } function_uaddr;
- struct function_user_mode_locals {
- int64_t __retvalue;
- } function_user_mode;
- struct function_usymname_locals {
- int64_t l_addr;
- string_t __retvalue;
- } function_usymname;
- } locals [MAXNESTING+1];
- #if MAXNESTING < 0
- #error "MAXNESTING must be positive"
- #endif
- #ifndef STP_LEGACY_PRINT
- union {
- struct stp_sprintf_2_locals {
- int64_t arg0;
- const char* arg1;
- int64_t arg2;
- const char* arg3;
- char * __retvalue;
- } stp_sprintf_2;
- struct stp_sprintf_3_locals {
- const char* arg0;
- int64_t arg1;
- char * __retvalue;
- } stp_sprintf_3;
- struct stp_printf_4_locals {
- const char* arg0;
- const char* arg1;
- const char* arg2;
- } stp_printf_4;
- } printf_locals;
- #endif // STP_LEGACY_PRINT
- };
- #include "runtime_context.h"
- #include "alloc.c"
- #define VALUE_TYPE INT64
- #define KEY1_TYPE INT64
- #include "map-gen.c"
- #undef MAP_DO_PMAP
- #undef VALUE_TYPE
- #undef KEY1_TYPE
- #include "map.c"
- #ifndef STP_LEGACY_PRINT
- static void stp_sprintf_2 (struct context* __restrict__ c) {
- struct stp_sprintf_2_locals * __restrict__ l = & c->printf_locals.stp_sprintf_2;
- char *str = NULL, *end = NULL;
- const char *src;
- int width;
- int precision;
- unsigned long ptr_value;
- int num_bytes;
- (void) width;
- (void) precision;
- (void) ptr_value;
- (void) num_bytes;
- str = l->__retvalue;
- end = str + MAXSTRINGLEN - 1;
- if (str && str <= end) {
- width = clamp_t(int, 6, 0, end - str + 1);
- precision = -1;
- str = number(str, end, l->arg0, 10, width, precision, 2);
- src = " ";
- while (*src && str <= end)
- *str++ = *src++;
- width = -1;
- precision = -1;
- str = _stp_vsprint_memory(str, end, l->arg1, width, precision, 's', 0);
- src = ":";
- while (*src && str <= end)
- *str++ = *src++;
- width = clamp_t(int, l->arg2, 0, end - str + 1);
- precision = -1;
- str = _stp_vsprint_memory(str, end, l->arg3, width, precision, 's', 16);
- if (str <= end)
- *str = '\0';
- else
- *end = '\0';
- }
- }
- static void stp_sprintf_3 (struct context* __restrict__ c) {
- struct stp_sprintf_3_locals * __restrict__ l = & c->printf_locals.stp_sprintf_3;
- char *str = NULL, *end = NULL;
- const char *src;
- int width;
- int precision;
- unsigned long ptr_value;
- int num_bytes;
- (void) width;
- (void) precision;
- (void) ptr_value;
- (void) num_bytes;
- str = l->__retvalue;
- end = str + MAXSTRINGLEN - 1;
- if (str && str <= end) {
- width = -1;
- precision = -1;
- str = _stp_vsprint_memory(str, end, l->arg0, width, precision, 's', 0);
- src = "(";
- while (*src && str <= end)
- *str++ = *src++;
- width = -1;
- precision = -1;
- str = number(str, end, l->arg1, 10, width, precision, 2);
- src = ")";
- while (*src && str <= end)
- *str++ = *src++;
- if (str <= end)
- *str = '\0';
- else
- *end = '\0';
- }
- }
- static void stp_printf_4 (struct context* __restrict__ c) {
- struct stp_printf_4_locals * __restrict__ l = & c->printf_locals.stp_printf_4;
- char *str = NULL, *end = NULL;
- const char *src;
- int width;
- int precision;
- unsigned long ptr_value;
- int num_bytes;
- (void) width;
- (void) precision;
- (void) ptr_value;
- (void) num_bytes;
- num_bytes = 0;
- width = -1;
- precision = -1;
- num_bytes += _stp_vsprint_memory_size(l->arg0, width, precision, 's', 0);
- width = -1;
- precision = -1;
- num_bytes += _stp_vsprint_memory_size(l->arg1, width, precision, 's', 0);
- width = -1;
- precision = -1;
- num_bytes += _stp_vsprint_memory_size(l->arg2, width, precision, 's', 0);
- num_bytes += sizeof("\n") - 1;
- num_bytes = clamp(num_bytes, 0, STP_BUFFER_SIZE);
- str = (char*)_stp_reserve_bytes(num_bytes);
- end = str ? str + num_bytes - 1 : 0;
- if (str && str <= end) {
- width = -1;
- precision = -1;
- str = _stp_vsprint_memory(str, end, l->arg0, width, precision, 's', 0);
- width = -1;
- precision = -1;
- str = _stp_vsprint_memory(str, end, l->arg1, width, precision, 's', 0);
- width = -1;
- precision = -1;
- str = _stp_vsprint_memory(str, end, l->arg2, width, precision, 's', 0);
- src = "\n";
- while (*src && str <= end)
- *str++ = *src++;
- }
- }
- #endif // STP_LEGACY_PRINT
- struct stp_globals {
- MAP s_trace;
- rwlock_t s_trace_lock;
- #ifdef STP_TIMING
- atomic_t s_trace_lock_skip_count;
- #endif
- MAP s__indent_counters;
- rwlock_t s__indent_counters_lock;
- #ifdef STP_TIMING
- atomic_t s__indent_counters_lock_skip_count;
- #endif
- MAP s__indent_timestamps;
- rwlock_t s__indent_timestamps_lock;
- #ifdef STP_TIMING
- atomic_t s__indent_timestamps_lock_skip_count;
- #endif
- };
- static struct stp_globals stp_global = {
- };
- #include "common_session_state.h"
- #include "probe_lock.h"
- #ifdef STAP_NEED_GETTIMEOFDAY
- #include "time.c"
- #endif
- static void function___indent_timestamp (struct context * __restrict__ c);
- static void function__generic_indent (struct context * __restrict__ c);
- static void function_addr (struct context * __restrict__ c);
- static void function_execname (struct context * __restrict__ c);
- static void function_gettimeofday_ns (struct context * __restrict__ c);
- static void function_gettimeofday_us (struct context * __restrict__ c);
- static void function_pid (struct context * __restrict__ c);
- static void function_probefunc (struct context * __restrict__ c);
- static void function_stp_pid (struct context * __restrict__ c);
- static void function_symname (struct context * __restrict__ c);
- static void function_thread_indent (struct context * __restrict__ c);
- static void function_tid (struct context * __restrict__ c);
- static void function_trace (struct context * __restrict__ c);
- static void function_uaddr (struct context * __restrict__ c);
- static void function_user_mode (struct context * __restrict__ c);
- static void function_usymname (struct context * __restrict__ c);
- static void function___indent_timestamp (struct context* __restrict__ c) {
- __label__ out;
- struct function___indent_timestamp_locals * __restrict__ l = & c->locals[c->nesting+1].function___indent_timestamp;
- (void) l;
- #define CONTEXT c
- #define THIS l
- #define STAP_RETVALUE THIS->__retvalue
- c->last_stmt = "identifier '__indent_timestamp' at /usr/local/share/systemtap/tapset/indent-default.stp:1:10";
- if (unlikely (c->nesting+1 >= MAXNESTING)) {
- c->last_error = "MAXNESTING exceeded";
- return;
- } else {
- c->nesting ++;
- }
- l->__retvalue = 0;
- #define return goto out
- l->__retvalue =
- ({
- function_gettimeofday_us (c);
- if (unlikely(c->last_error)) goto out;
- c->locals[c->nesting+1].function_gettimeofday_us.__retvalue;
- });
- c->actionremaining -= 1;
- if (unlikely (c->actionremaining <= 0)) {
- c->last_error = "MAXACTION exceeded";
- c->last_stmt = "keyword at /usr/local/share/systemtap/tapset/indent-default.stp:1:33";
- goto out;
- }
- goto out;
- #undef return
- out:
- if (0) goto out;
- c->nesting --;
- #undef CONTEXT
- #undef THIS
- #undef STAP_RETVALUE
- }
- static void function__generic_indent (struct context* __restrict__ c) {
- __label__ out;
- struct function__generic_indent_locals * __restrict__ l = & c->locals[c->nesting+1].function__generic_indent;
- (void) l;
- #define CONTEXT c
- #define THIS l
- #define STAP_ARG_idx THIS->l_idx
- #define STAP_ARG_desc THIS->l_desc
- #define STAP_ARG_delta THIS->l_delta
- #define STAP_ARG_ts THIS->l_ts
- #define STAP_ARG_x THIS->l_x
- #define STAP_RETVALUE THIS->__retvalue
- c->last_stmt = "identifier '_generic_indent' at /usr/local/share/systemtap/tapset/indent.stp:10:10";
- if (unlikely (c->nesting+1 >= MAXNESTING)) {
- c->last_error = "MAXNESTING exceeded";
- return;
- } else {
- c->nesting ++;
- }
- l->l_ts = 0;
- l->l_x = 0;
- l->__retvalue[0] = '\0';
- #define return goto out
- {
- (void)
- ({
- l->__tmp0 =
- ({
- function___indent_timestamp (c);
- if (unlikely(c->last_error)) goto out;
- c->locals[c->nesting+1].function___indent_timestamp.__retvalue;
- });
- l->l_ts = l->__tmp0;
- l->__tmp0;
- });
- c->actionremaining -= 2;
- if (unlikely (c->actionremaining <= 0)) {
- c->last_error = "MAXACTION exceeded";
- c->last_stmt = "keyword at /usr/local/share/systemtap/tapset/indent.stp:13:3";
- goto out;
- }
- if ((! (
- ({
- l->__tmp2 = l->l_idx;
- l->__tmp3 = _stp_map_get_ii (global(s__indent_counters), l->__tmp2);
- l->__tmp3;
- })))) {
- (void)
- ({
- l->__tmp4 = l->l_idx;
- l->__tmp5 = l->l_ts;
- c->last_stmt = "identifier '_indent_timestamps' at /usr/local/share/systemtap/tapset/indent.stp:13:32";
- l->__tmp6 = l->__tmp5;
- { int rc = _stp_map_set_ii (global(s__indent_timestamps), l->__tmp4, l->__tmp6); if (unlikely(rc)) { c->last_error = "Array overflow, check MAXMAPENTRIES"; goto out; }};
- l->__tmp5;
- });
- c->actionremaining -= 1;
- if (unlikely (c->actionremaining <= 0)) {
- c->last_error = "MAXACTION exceeded";
- c->last_stmt = "identifier '_indent_timestamps' at /usr/local/share/systemtap/tapset/indent.stp:13:32";
- goto out;
- }
- }
- (void)
- ({
- l->__tmp8 = ((
- ({
- l->__tmp10 = l->l_idx;
- l->__tmp11 = _stp_map_get_ii (global(s__indent_counters), l->__tmp10);
- l->__tmp11;
- })) + ((((((l->l_delta) > (((int64_t)0LL))))) ? (l->l_delta) : (((int64_t)0LL)))));
- l->l_x = l->__tmp8;
- l->__tmp8;
- });
- (void)
- ({
- l->__tmp12 = l->l_idx;
- l->__tmp13 = l->l_delta;
- c->last_stmt = "identifier '_indent_counters' at /usr/local/share/systemtap/tapset/indent.stp:17:3";
- l->__tmp14 = _stp_map_get_ii (global(s__indent_counters), l->__tmp12);
- l->__tmp14 += l->__tmp13;
- { int rc = _stp_map_set_ii (global(s__indent_counters), l->__tmp12, l->__tmp14); if (unlikely(rc)) { c->last_error = "Array overflow, check MAXMAPENTRIES"; goto out; }};
- l->__tmp14;
- });
- strlcpy (l->__retvalue,
- ({
- l->__tmp16 = ((l->l_ts) - (
- ({
- l->__tmp17 = l->l_idx;
- l->__tmp18 = _stp_map_get_ii (global(s__indent_timestamps), l->__tmp17);
- l->__tmp18;
- })));
- strlcpy (l->__tmp19, l->l_desc, MAXSTRINGLEN);
- l->__tmp20 = (((((l->l_x) > (((int64_t)0LL))))) ? (((l->l_x) - (((int64_t)1LL)))) : (((int64_t)0LL)));
- #ifndef STP_LEGACY_PRINT
- c->printf_locals.stp_sprintf_2.arg0 = l->__tmp16;
- c->printf_locals.stp_sprintf_2.arg1 = l->__tmp19;
- c->printf_locals.stp_sprintf_2.arg2 = l->__tmp20;
- c->printf_locals.stp_sprintf_2.arg3 = "";
- c->printf_locals.stp_sprintf_2.__retvalue = l->__tmp22;
- stp_sprintf_2 (c);
- #else // STP_LEGACY_PRINT
- _stp_snprintf (l->__tmp22, MAXSTRINGLEN, "%6lld %s:%-*s", l->__tmp16, l->__tmp19, (int)l->__tmp20, "");
- #endif // STP_LEGACY_PRINT
- if (unlikely(c->last_error)) goto out;
- l->__tmp22;
- }), MAXSTRINGLEN);
- c->actionremaining -= 3;
- if (unlikely (c->actionremaining <= 0)) {
- c->last_error = "MAXACTION exceeded";
- c->last_stmt = "keyword at /usr/local/share/systemtap/tapset/indent.stp:19:3";
- goto out;
- }
- goto out;
- }
- #undef return
- out:
- if (0) goto out;
- c->nesting --;
- #undef CONTEXT
- #undef THIS
- #undef STAP_ARG_idx
- #undef STAP_ARG_desc
- #undef STAP_ARG_delta
- #undef STAP_ARG_ts
- #undef STAP_ARG_x
- #undef STAP_RETVALUE
- }
- static void function_addr (struct context* __restrict__ c) {
- __label__ out;
- struct function_addr_locals * __restrict__ l = & c->locals[c->nesting+1].function_addr;
- (void) l;
- #define CONTEXT c
- #define THIS l
- #define STAP_RETVALUE THIS->__retvalue
- c->last_stmt = "identifier 'addr' at /usr/local/share/systemtap/tapset/linux/context.stp:354:10";
- if (unlikely (c->nesting+1 >= MAXNESTING)) {
- c->last_error = "MAXNESTING exceeded";
- return;
- } else {
- c->nesting ++;
- }
- l->__retvalue = 0;
- #define return goto out
- {
- /* pure */
- if (CONTEXT->user_mode_p) {
- STAP_RETVALUE = (intptr_t)(CONTEXT->uregs ? REG_IP(CONTEXT->uregs) : 0);
- } else {
- STAP_RETVALUE = (intptr_t)(CONTEXT->kregs ? REG_IP(CONTEXT->kregs) : 0);
- }
- }
- #undef return
- out:
- if (0) goto out;
- c->nesting --;
- #undef CONTEXT
- #undef THIS
- #undef STAP_RETVALUE
- }
- static void function_execname (struct context* __restrict__ c) {
- __label__ out;
- struct function_execname_locals * __restrict__ l = & c->locals[c->nesting+1].function_execname;
- (void) l;
- #define CONTEXT c
- #define THIS l
- #define STAP_RETVALUE THIS->__retvalue
- c->last_stmt = "identifier 'execname' at /usr/local/share/systemtap/tapset/linux/context.stp:17:10";
- if (unlikely (c->nesting+1 >= MAXNESTING)) {
- c->last_error = "MAXNESTING exceeded";
- return;
- } else {
- c->nesting ++;
- }
- l->__retvalue[0] = '\0';
- #define return goto out
- {
- /* pure */ /* unprivileged */
- strlcpy (STAP_RETVALUE, current->comm, MAXSTRINGLEN);
- }
- #undef return
- out:
- if (0) goto out;
- c->nesting --;
- #undef CONTEXT
- #undef THIS
- #undef STAP_RETVALUE
- }
- static void function_gettimeofday_ns (struct context* __restrict__ c) {
- __label__ out;
- struct function_gettimeofday_ns_locals * __restrict__ l = & c->locals[c->nesting+1].function_gettimeofday_ns;
- (void) l;
- #define CONTEXT c
- #define THIS l
- #define STAP_RETVALUE THIS->__retvalue
- c->last_stmt = "identifier 'gettimeofday_ns' at /usr/local/share/systemtap/tapset/linux/timestamp_gtod.stp:21:10";
- if (unlikely (c->nesting+1 >= MAXNESTING)) {
- c->last_error = "MAXNESTING exceeded";
- return;
- } else {
- c->nesting ++;
- }
- l->__retvalue = 0;
- #define return goto out
- {
- /* pure */ /* unprivileged */
- /* NOTE: we can't use do_gettimeofday because we could be called from a
- * context where xtime_lock is already held. See bug #2525. */
- STAP_RETVALUE = _stp_gettimeofday_ns();
- if (STAP_RETVALUE < 0)
- CONTEXT->last_error = "gettimeofday not initialized";
- }
- #undef return
- out:
- if (0) goto out;
- c->nesting --;
- #undef CONTEXT
- #undef THIS
- #undef STAP_RETVALUE
- }
- static void function_gettimeofday_us (struct context* __restrict__ c) {
- __label__ out;
- struct function_gettimeofday_us_locals * __restrict__ l = & c->locals[c->nesting+1].function_gettimeofday_us;
- (void) l;
- #define CONTEXT c
- #define THIS l
- #define STAP_RETVALUE THIS->__retvalue
- c->last_stmt = "identifier 'gettimeofday_us' at /usr/local/share/systemtap/tapset/linux/timestamp_gtod.stp:35:10";
- if (unlikely (c->nesting+1 >= MAXNESTING)) {
- c->last_error = "MAXNESTING exceeded";
- return;
- } else {
- c->nesting ++;
- }
- l->__retvalue = 0;
- #define return goto out
- l->__retvalue = ({
- l->__tmp0 =
- ({
- function_gettimeofday_ns (c);
- if (unlikely(c->last_error)) goto out;
- c->locals[c->nesting+1].function_gettimeofday_ns.__retvalue;
- });
- if (unlikely(!((int64_t)1000LL))) {
- c->last_error = "division by 0";
- c->last_stmt = "operator '/' at /usr/local/share/systemtap/tapset/linux/timestamp_gtod.stp:36:28";
- goto out;
- }
- _stp_div64 (NULL, l->__tmp0, ((int64_t)1000LL));
- });
- c->actionremaining -= 1;
- if (unlikely (c->actionremaining <= 0)) {
- c->last_error = "MAXACTION exceeded";
- c->last_stmt = "keyword at /usr/local/share/systemtap/tapset/linux/timestamp_gtod.stp:36:3";
- goto out;
- }
- goto out;
- #undef return
- out:
- if (0) goto out;
- c->nesting --;
- #undef CONTEXT
- #undef THIS
- #undef STAP_RETVALUE
- }
- static void function_pid (struct context* __restrict__ c) {
- __label__ out;
- struct function_pid_locals * __restrict__ l = & c->locals[c->nesting+1].function_pid;
- (void) l;
- #define CONTEXT c
- #define THIS l
- #define STAP_RETVALUE THIS->__retvalue
- c->last_stmt = "identifier 'pid' at /usr/local/share/systemtap/tapset/linux/context.stp:27:10";
- if (unlikely (c->nesting+1 >= MAXNESTING)) {
- c->last_error = "MAXNESTING exceeded";
- return;
- } else {
- c->nesting ++;
- }
- l->__retvalue = 0;
- #define return goto out
- {
- /* pure */ /* unprivileged */
- STAP_RETVALUE = current->tgid;
- }
- #undef return
- out:
- if (0) goto out;
- c->nesting --;
- #undef CONTEXT
- #undef THIS
- #undef STAP_RETVALUE
- }
- static void function_probefunc (struct context* __restrict__ c) {
- __label__ out;
- struct function_probefunc_locals * __restrict__ l = & c->locals[c->nesting+1].function_probefunc;
- (void) l;
- #define CONTEXT c
- #define THIS l
- #define STAP_RETVALUE THIS->__retvalue
- c->last_stmt = "identifier 'probefunc' at /usr/local/share/systemtap/tapset/linux/context-symbols.stp:99:10";
- if (unlikely (c->nesting+1 >= MAXNESTING)) {
- c->last_error = "MAXNESTING exceeded";
- return;
- } else {
- c->nesting ++;
- }
- l->__retvalue[0] = '\0';
- #define return goto out
- strlcpy (l->__retvalue, ((
- ({
- function_user_mode (c);
- if (unlikely(c->last_error)) goto out;
- c->locals[c->nesting+1].function_user_mode.__retvalue;
- })) ? (
- ({
- l->__tmp0 =
- ({
- function_uaddr (c);
- if (unlikely(c->last_error)) goto out;
- c->locals[c->nesting+1].function_uaddr.__retvalue;
- });
- c->locals[c->nesting+1].function_usymname.l_addr = l->__tmp0;
- function_usymname (c);
- if (unlikely(c->last_error)) goto out;
- c->locals[c->nesting+1].function_usymname.__retvalue;
- })) : (
- ({
- l->__tmp1 =
- ({
- function_addr (c);
- if (unlikely(c->last_error)) goto out;
- c->locals[c->nesting+1].function_addr.__retvalue;
- });
- c->locals[c->nesting+1].function_symname.l_addr = l->__tmp1;
- function_symname (c);
- if (unlikely(c->last_error)) goto out;
- c->locals[c->nesting+1].function_symname.__retvalue;
- }))), MAXSTRINGLEN);
- c->actionremaining -= 1;
- if (unlikely (c->actionremaining <= 0)) {
- c->last_error = "MAXACTION exceeded";
- c->last_stmt = "keyword at /usr/local/share/systemtap/tapset/linux/context-symbols.stp:133:5";
- goto out;
- }
- goto out;
- #undef return
- out:
- if (0) goto out;
- c->nesting --;
- #undef CONTEXT
- #undef THIS
- #undef STAP_RETVALUE
- }
- static void function_stp_pid (struct context* __restrict__ c) {
- __label__ out;
- struct function_stp_pid_locals * __restrict__ l = & c->locals[c->nesting+1].function_stp_pid;
- (void) l;
- #define CONTEXT c
- #define THIS l
- #define STAP_RETVALUE THIS->__retvalue
- c->last_stmt = "identifier 'stp_pid' at /usr/local/share/systemtap/tapset/linux/context.stp:277:10";
- if (unlikely (c->nesting+1 >= MAXNESTING)) {
- c->last_error = "MAXNESTING exceeded";
- return;
- } else {
- c->nesting ++;
- }
- l->__retvalue = 0;
- #define return goto out
- {
- /* pure */
- STAP_RETVALUE = _stp_pid;
- }
- #undef return
- out:
- if (0) goto out;
- c->nesting --;
- #undef CONTEXT
- #undef THIS
- #undef STAP_RETVALUE
- }
- static void function_symname (struct context* __restrict__ c) {
- __label__ out;
- struct function_symname_locals * __restrict__ l = & c->locals[c->nesting+1].function_symname;
- (void) l;
- #define CONTEXT c
- #define THIS l
- #define STAP_ARG_addr THIS->l_addr
- #define STAP_RETVALUE THIS->__retvalue
- c->last_stmt = "identifier 'symname' at /usr/local/share/systemtap/tapset/linux/context-symbols.stp:225:10";
- if (unlikely (c->nesting+1 >= MAXNESTING)) {
- c->last_error = "MAXNESTING exceeded";
- return;
- } else {
- c->nesting ++;
- }
- l->__retvalue[0] = '\0';
- #define return goto out
- {
- /* pure */ /* pragma:symbols */
- _stp_snprint_addr(STAP_RETVALUE, MAXSTRINGLEN, STAP_ARG_addr,
- _STP_SYM_SYMBOL, NULL);
- }
- #undef return
- out:
- if (0) goto out;
- c->nesting --;
- #undef CONTEXT
- #undef THIS
- #undef STAP_ARG_addr
- #undef STAP_RETVALUE
- }
- static void function_thread_indent (struct context* __restrict__ c) {
- __label__ out;
- struct function_thread_indent_locals * __restrict__ l = & c->locals[c->nesting+1].function_thread_indent;
- (void) l;
- #define CONTEXT c
- #define THIS l
- #define STAP_ARG_delta THIS->l_delta
- #define STAP_RETVALUE THIS->__retvalue
- c->last_stmt = "identifier 'thread_indent' at /usr/local/share/systemtap/tapset/indent.stp:34:10";
- if (unlikely (c->nesting+1 >= MAXNESTING)) {
- c->last_error = "MAXNESTING exceeded";
- return;
- } else {
- c->nesting ++;
- }
- l->__retvalue[0] = '\0';
- #define return goto out
- strlcpy (l->__retvalue,
- ({
- l->__tmp0 =
- ({
- function_tid (c);
- if (unlikely(c->last_error)) goto out;
- c->locals[c->nesting+1].function_tid.__retvalue;
- });
- strlcpy (l->__tmp1,
- ({
- strlcpy (l->__tmp2,
- ({
- function_execname (c);
- if (unlikely(c->last_error)) goto out;
- c->locals[c->nesting+1].function_execname.__retvalue;
- }), MAXSTRINGLEN);
- l->__tmp3 =
- ({
- function_tid (c);
- if (unlikely(c->last_error)) goto out;
- c->locals[c->nesting+1].function_tid.__retvalue;
- });
- #ifndef STP_LEGACY_PRINT
- c->printf_locals.stp_sprintf_3.arg0 = l->__tmp2;
- c->printf_locals.stp_sprintf_3.arg1 = l->__tmp3;
- c->printf_locals.stp_sprintf_3.__retvalue = l->__tmp4;
- stp_sprintf_3 (c);
- #else // STP_LEGACY_PRINT
- _stp_snprintf (l->__tmp4, MAXSTRINGLEN, "%s(%lld)", l->__tmp2, l->__tmp3);
- #endif // STP_LEGACY_PRINT
- if (unlikely(c->last_error)) goto out;
- l->__tmp4;
- }), MAXSTRINGLEN);
- l->__tmp5 = l->l_delta;
- c->locals[c->nesting+1].function__generic_indent.l_idx = l->__tmp0;
- strlcpy (c->locals[c->nesting+1].function__generic_indent.l_desc, l->__tmp1, MAXSTRINGLEN);
- c->locals[c->nesting+1].function__generic_indent.l_delta = l->__tmp5;
- function__generic_indent (c);
- if (unlikely(c->last_error)) goto out;
- c->locals[c->nesting+1].function__generic_indent.__retvalue;
- }), MAXSTRINGLEN);
- c->actionremaining -= 1;
- if (unlikely (c->actionremaining <= 0)) {
- c->last_error = "MAXACTION exceeded";
- c->last_stmt = "keyword at /usr/local/share/systemtap/tapset/indent.stp:36:3";
- goto out;
- }
- goto out;
- #undef return
- out:
- if (0) goto out;
- c->nesting --;
- #undef CONTEXT
- #undef THIS
- #undef STAP_ARG_delta
- #undef STAP_RETVALUE
- }
- static void function_tid (struct context* __restrict__ c) {
- __label__ out;
- struct function_tid_locals * __restrict__ l = & c->locals[c->nesting+1].function_tid;
- (void) l;
- #define CONTEXT c
- #define THIS l
- #define STAP_RETVALUE THIS->__retvalue
- c->last_stmt = "identifier 'tid' at /usr/local/share/systemtap/tapset/linux/context.stp:37:10";
- if (unlikely (c->nesting+1 >= MAXNESTING)) {
- c->last_error = "MAXNESTING exceeded";
- return;
- } else {
- c->nesting ++;
- }
- l->__retvalue = 0;
- #define return goto out
- {
- /* pure */ /* unprivileged */
- STAP_RETVALUE = current->pid;
- }
- #undef return
- out:
- if (0) goto out;
- c->nesting --;
- #undef CONTEXT
- #undef THIS
- #undef STAP_RETVALUE
- }
- static void function_trace (struct context* __restrict__ c) {
- __label__ out;
- struct function_trace_locals * __restrict__ l = & c->locals[c->nesting+1].function_trace;
- (void) l;
- #define CONTEXT c
- #define THIS l
- #define STAP_ARG_entry_p THIS->l_entry_p
- c->last_stmt = "identifier 'trace' at ./systemtap.base/pr10854.stp:1:10";
- if (unlikely (c->nesting+1 >= MAXNESTING)) {
- c->last_error = "MAXNESTING exceeded";
- return;
- } else {
- c->nesting ++;
- }
- #define return goto out
- c->actionremaining -= 1;
- if (unlikely (c->actionremaining <= 0)) {
- c->last_error = "MAXACTION exceeded";
- c->last_stmt = "keyword at ./systemtap.base/pr10854.stp:2:4";
- goto out;
- }
- if (
- ({
- l->__tmp0 =
- ({
- function_tid (c);
- if (unlikely(c->last_error)) goto out;
- c->locals[c->nesting+1].function_tid.__retvalue;
- });
- l->__tmp1 = _stp_map_exists_ii (global(s_trace), l->__tmp0);
- l->__tmp1;
- })) {
- (void)
- ({
- strlcpy (l->__tmp2,
- ({
- l->__tmp3 = l->l_entry_p;
- c->locals[c->nesting+1].function_thread_indent.l_delta = l->__tmp3;
- function_thread_indent (c);
- if (unlikely(c->last_error)) goto out;
- c->locals[c->nesting+1].function_thread_indent.__retvalue;
- }), MAXSTRINGLEN);
- strlcpy (l->__tmp4, (((((l->l_entry_p) > (((int64_t)0LL))))) ? ("->") : ("<-")), MAXSTRINGLEN);
- strlcpy (l->__tmp5,
- ({
- function_probefunc (c);
- if (unlikely(c->last_error)) goto out;
- c->locals[c->nesting+1].function_probefunc.__retvalue;
- }), MAXSTRINGLEN);
- #ifndef STP_LEGACY_PRINT
- c->printf_locals.stp_printf_4.arg0 = l->__tmp2;
- c->printf_locals.stp_printf_4.arg1 = l->__tmp4;
- c->printf_locals.stp_printf_4.arg2 = l->__tmp5;
- stp_printf_4 (c);
- #else // STP_LEGACY_PRINT
- _stp_printf ("%s%s%s\n", l->__tmp2, l->__tmp4, l->__tmp5);
- #endif // STP_LEGACY_PRINT
- if (unlikely(c->last_error)) goto out;
- ((int64_t)0LL);
- });
- c->actionremaining -= 1;
- if (unlikely (c->actionremaining <= 0)) {
- c->last_error = "MAXACTION exceeded";
- c->last_stmt = "identifier 'printf' at ./systemtap.base/pr10854.stp:3:8";
- goto out;
- }
- }
- #undef return
- out:
- if (0) goto out;
- c->nesting --;
- #undef CONTEXT
- #undef THIS
- #undef STAP_ARG_entry_p
- #undef STAP_RETVALUE
- }
- static void function_uaddr (struct context* __restrict__ c) {
- __label__ out;
- struct function_uaddr_locals * __restrict__ l = & c->locals[c->nesting+1].function_uaddr;
- (void) l;
- #define CONTEXT c
- #define THIS l
- #define STAP_RETVALUE THIS->__retvalue
- c->last_stmt = "identifier 'uaddr' at /usr/local/share/systemtap/tapset/linux/context.stp:373:10";
- if (unlikely (c->nesting+1 >= MAXNESTING)) {
- c->last_error = "MAXNESTING exceeded";
- return;
- } else {
- c->nesting ++;
- }
- l->__retvalue = 0;
- #define return goto out
- assert_is_myproc();
- {
- /* pure */ /* myproc-unprivileged */
- struct pt_regs *uregs;
- if (CONTEXT->user_mode_p)
- uregs = CONTEXT->uregs;
- else
- uregs = _stp_current_pt_regs();
- if (uregs)
- STAP_RETVALUE = (int64_t) REG_IP(uregs);
- else
- STAP_RETVALUE = 0;
- }
- #undef return
- out:
- if (0) goto out;
- c->nesting --;
- #undef CONTEXT
- #undef THIS
- #undef STAP_RETVALUE
- }
- static void function_user_mode (struct context* __restrict__ c) {
- __label__ out;
- struct function_user_mode_locals * __restrict__ l = & c->locals[c->nesting+1].function_user_mode;
- (void) l;
- #define CONTEXT c
- #define THIS l
- #define STAP_RETVALUE THIS->__retvalue
- c->last_stmt = "identifier 'user_mode' at /usr/local/share/systemtap/tapset/linux/context.stp:218:10";
- if (unlikely (c->nesting+1 >= MAXNESTING)) {
- c->last_error = "MAXNESTING exceeded";
- return;
- } else {
- c->nesting ++;
- }
- l->__retvalue = 0;
- #define return goto out
- {
- /* pure */ /* unprivileged */
- STAP_RETVALUE = CONTEXT->user_mode_p ? 1 : 0;
- }
- #undef return
- out:
- if (0) goto out;
- c->nesting --;
- #undef CONTEXT
- #undef THIS
- #undef STAP_RETVALUE
- }
- static void function_usymname (struct context* __restrict__ c) {
- __label__ out;
- struct function_usymname_locals * __restrict__ l = & c->locals[c->nesting+1].function_usymname;
- (void) l;
- #define CONTEXT c
- #define THIS l
- #define STAP_ARG_addr THIS->l_addr
- #define STAP_RETVALUE THIS->__retvalue
- c->last_stmt = "identifier 'usymname' at /usr/local/share/systemtap/tapset/linux/ucontext-symbols.stp:57:10";
- if (unlikely (c->nesting+1 >= MAXNESTING)) {
- c->last_error = "MAXNESTING exceeded";
- return;
- } else {
- c->nesting ++;
- }
- l->__retvalue[0] = '\0';
- #define return goto out
- assert_is_myproc();
- {
- /* pure */ /* myproc-unprivileged */ /* pragma:vma */ /* pragma:symbols */
- _stp_snprint_addr(STAP_RETVALUE, MAXSTRINGLEN, STAP_ARG_addr,
- _STP_SYM_SYMBOL, current);
- }
- #undef return
- out:
- if (0) goto out;
- c->nesting --;
- #undef CONTEXT
- #undef THIS
- #undef STAP_ARG_addr
- #undef STAP_RETVALUE
- }
- static void probe_2026 (struct context * __restrict__ c) {
- __label__ out;
- static const struct stp_probe_lock locks[] = {
- {
- .lock = global_lock(s_trace),
- .write_p = 1,
- #ifdef STP_TIMING
- .skipped = global_skipped(s_trace),
- #endif
- },
- {
- .lock = global_lock(s__indent_counters),
- .write_p = 1,
- #ifdef STP_TIMING
- .skipped = global_skipped(s__indent_counters),
- #endif
- },
- {
- .lock = global_lock(s__indent_timestamps),
- .write_p = 1,
- #ifdef STP_TIMING
- .skipped = global_skipped(s__indent_timestamps),
- #endif
- },
- };
- struct probe_2026_locals * __restrict__ l = & c->probe_locals.probe_2026;
- (void) l;
- #if ! STP_PRIVILEGE_CONTAINS (STP_PRIVILEGE, STP_PR_STAPDEV) && \
- ! STP_PRIVILEGE_CONTAINS (STP_PRIVILEGE, STP_PR_STAPSYS)
- #error Internal Error: Probe kernel.function("SyS_read@fs/read_write.c:501").call generated in --unprivileged mode
- #endif
- if (!stp_lock_probe(locks, ARRAY_SIZE(locks)))
- return;
- {
- c->actionremaining -= 1;
- if (unlikely (c->actionremaining <= 0)) {
- c->last_error = "MAXACTION exceeded";
- c->last_stmt = "keyword at ./systemtap.base/pr10854.stp:10:4";
- goto out;
- }
- if ((((
- ({
- function_pid (c);
- if (unlikely(c->last_error)) goto out;
- c->locals[c->nesting+1].function_pid.__retvalue;
- })) == (
- ({
- function_stp_pid (c);
- if (unlikely(c->last_error)) goto out;
- c->locals[c->nesting+1].function_stp_pid.__retvalue;
- }))))) {
- c->actionremaining -= 1;
- if (unlikely (c->actionremaining <= 0)) {
- c->last_error = "MAXACTION exceeded";
- c->last_stmt = "keyword at ./systemtap.base/pr10854.stp:10:28";
- goto out;
- }
- goto out;
- }
- (void)
- ({
- l->__tmp0 =
- ({
- function_tid (c);
- if (unlikely(c->last_error)) goto out;
- c->locals[c->nesting+1].function_tid.__retvalue;
- });
- c->last_stmt = "identifier 'trace' at ./systemtap.base/pr10854.stp:11:4";
- l->__tmp2 = ((int64_t)1LL);
- { int rc = _stp_map_set_ii (global(s_trace), l->__tmp0, l->__tmp2); if (unlikely(rc)) { c->last_error = "Array overflow, check MAXMAPENTRIES"; goto out; }};
- ((int64_t)1LL);
- });
- (void)
- ({
- c->locals[c->nesting+1].function_trace.l_entry_p = ((int64_t)1LL);
- function_trace (c);
- if (unlikely(c->last_error)) goto out;
- (void) 0;
- });
- }
- c->actionremaining -= 2;
- if (unlikely (c->actionremaining <= 0)) {
- c->last_error = "MAXACTION exceeded";
- c->last_stmt = "operator '{' at ./systemtap.base/pr10854.stp:9:32";
- goto out;
- }
- out:
- stp_unlock_probe(locks, ARRAY_SIZE(locks));
- _stp_print_flush();
- }
- static void probe_2027 (struct context * __restrict__ c) {
- __label__ out;
- static const struct stp_probe_lock locks[] = {
- {
- .lock = global_lock(s_trace),
- .write_p = 1,
- #ifdef STP_TIMING
- .skipped = global_skipped(s_trace),
- #endif
- },
- {
- .lock = global_lock(s__indent_counters),
- .write_p = 1,
- #ifdef STP_TIMING
- .skipped = global_skipped(s__indent_counters),
- #endif
- },
- {
- .lock = global_lock(s__indent_timestamps),
- .write_p = 1,
- #ifdef STP_TIMING
- .skipped = global_skipped(s__indent_timestamps),
- #endif
- },
- };
- struct probe_2027_locals * __restrict__ l = & c->probe_locals.probe_2027;
- (void) l;
- #if ! STP_PRIVILEGE_CONTAINS (STP_PRIVILEGE, STP_PR_STAPDEV) && \
- ! STP_PRIVILEGE_CONTAINS (STP_PRIVILEGE, STP_PR_STAPSYS)
- #error Internal Error: Probe kernel.function("SyS_read@fs/read_write.c:501").return generated in --unprivileged mode
- #endif
- if (!stp_lock_probe(locks, ARRAY_SIZE(locks)))
- return;
- {
- c->actionremaining -= 1;
- if (unlikely (c->actionremaining <= 0)) {
- c->last_error = "MAXACTION exceeded";
- c->last_stmt = "keyword at ./systemtap.base/pr10854.stp:15:4";
- goto out;
- }
- if ((((
- ({
- function_pid (c);
- if (unlikely(c->last_error)) goto out;
- c->locals[c->nesting+1].function_pid.__retvalue;
- })) == (
- ({
- function_stp_pid (c);
- if (unlikely(c->last_error)) goto out;
- c->locals[c->nesting+1].function_stp_pid.__retvalue;
- }))))) {
- c->actionremaining -= 1;
- if (unlikely (c->actionremaining <= 0)) {
- c->last_error = "MAXACTION exceeded";
- c->last_stmt = "keyword at ./systemtap.base/pr10854.stp:15:28";
- goto out;
- }
- goto out;
- }
- (void)
- ({
- l->__tmp0 = ((int64_t)-1LL);
- c->locals[c->nesting+1].function_trace.l_entry_p = l->__tmp0;
- function_trace (c);
- if (unlikely(c->last_error)) goto out;
- (void) 0;
- });
- l->__tmp1 =
- ({
- function_tid (c);
- if (unlikely(c->last_error)) goto out;
- c->locals[c->nesting+1].function_tid.__retvalue;
- });
- _stp_map_del_ii (global(s_trace), l->__tmp1);
- }
- c->actionremaining -= 2;
- if (unlikely (c->actionremaining <= 0)) {
- c->last_error = "MAXACTION exceeded";
- c->last_stmt = "operator '{' at ./systemtap.base/pr10854.stp:14:34";
- goto out;
- }
- out:
- stp_unlock_probe(locks, ARRAY_SIZE(locks));
- _stp_print_flush();
- }
- static void probe_2028 (struct context * __restrict__ c) {
- __label__ out;
- static const struct stp_probe_lock locks[] = {
- {
- .lock = global_lock(s_trace),
- .write_p = 0,
- #ifdef STP_TIMING
- .skipped = global_skipped(s_trace),
- #endif
- },
- {
- .lock = global_lock(s__indent_counters),
- .write_p = 1,
- #ifdef STP_TIMING
- .skipped = global_skipped(s__indent_counters),
- #endif
- },
- {
- .lock = global_lock(s__indent_timestamps),
- .write_p = 1,
- #ifdef STP_TIMING
- .skipped = global_skipped(s__indent_timestamps),
- #endif
- },
- };
- struct probe_2028_locals * __restrict__ l = & c->probe_locals.probe_2028;
- (void) l;
- #if ! STP_PRIVILEGE_CONTAINS (STP_PRIVILEGE, STP_PR_STAPDEV) && \
- ! STP_PRIVILEGE_CONTAINS (STP_PRIVILEGE, STP_PR_STAPSYS)
- #error Internal Error: Probe kernel.function("vfs_truncate@fs/open.c:65").call generated in --unprivileged mode
- #endif
- if (!stp_lock_probe(locks, ARRAY_SIZE(locks)))
- return;
- (void)
- ({
- c->locals[c->nesting+1].function_trace.l_entry_p = ((int64_t)1LL);
- function_trace (c);
- if (unlikely(c->last_error)) goto out;
- (void) 0;
- });
- c->actionremaining -= 1;
- if (unlikely (c->actionremaining <= 0)) {
- c->last_error = "MAXACTION exceeded";
- c->last_stmt = "identifier 'trace' at ./systemtap.base/pr10854.stp:20:34";
- goto out;
- }
- out:
- stp_unlock_probe(locks, ARRAY_SIZE(locks));
- _stp_print_flush();
- }
- static void probe_2067 (struct context * __restrict__ c) {
- __label__ out;
- static const struct stp_probe_lock locks[] = {
- {
- .lock = global_lock(s_trace),
- .write_p = 0,
- #ifdef STP_TIMING
- .skipped = global_skipped(s_trace),
- #endif
- },
- {
- .lock = global_lock(s__indent_counters),
- .write_p = 1,
- #ifdef STP_TIMING
- .skipped = global_skipped(s__indent_counters),
- #endif
- },
- {
- .lock = global_lock(s__indent_timestamps),
- .write_p = 1,
- #ifdef STP_TIMING
- .skipped = global_skipped(s__indent_timestamps),
- #endif
- },
- };
- struct probe_2067_locals * __restrict__ l = & c->probe_locals.probe_2067;
- (void) l;
- #if ! STP_PRIVILEGE_CONTAINS (STP_PRIVILEGE, STP_PR_STAPDEV) && \
- ! STP_PRIVILEGE_CONTAINS (STP_PRIVILEGE, STP_PR_STAPSYS)
- #error Internal Error: Probe kernel.function("vfs_truncate@fs/open.c:65").return generated in --unprivileged mode
- #endif
- if (!stp_lock_probe(locks, ARRAY_SIZE(locks)))
- return;
- (void)
- ({
- l->__tmp0 = ((int64_t)-1LL);
- c->locals[c->nesting+1].function_trace.l_entry_p = l->__tmp0;
- function_trace (c);
- if (unlikely(c->last_error)) goto out;
- (void) 0;
- });
- c->actionremaining -= 1;
- if (unlikely (c->actionremaining <= 0)) {
- c->last_error = "MAXACTION exceeded";
- c->last_stmt = "identifier 'trace' at ./systemtap.base/pr10854.stp:21:36";
- goto out;
- }
- out:
- stp_unlock_probe(locks, ARRAY_SIZE(locks));
- _stp_print_flush();
- }
- struct stap_probe {
- size_t index;
- void (* const ph) (struct context*);
- #if defined(STP_TIMING) || defined(STP_ALIBI)
- const char location[36];
- const char derivation[49];
- #define STAP_PROBE_INIT_TIMING(L, D) .location=(L), .derivation=(D),
- #else
- #define STAP_PROBE_INIT_TIMING(L, D)
- #endif
- const char pp[64];
- #ifdef STP_NEED_PROBE_NAME
- const char pn[64];
- #define STAP_PROBE_INIT_NAME(PN) .pn=(PN),
- #else
- #define STAP_PROBE_INIT_NAME(PN)
- #endif
- #define STAP_PROBE_INIT(I, PH, PP, PN, L, D) { .index=(I), .ph=(PH), .pp=(PP), STAP_PROBE_INIT_NAME(PN) STAP_PROBE_INIT_TIMING(L, D) }
- } static const stap_probes[] = {
- STAP_PROBE_INIT(0, &probe_2026, "kernel.function(\"SyS_read@fs/read_write.c:501\").call", "kernel.function(\"SyS_read@fs/read_write.c:501\").call", "./systemtap.base/pr10854.stp:9:1", " from: kernel.function(\"sys_read\").call"),
- STAP_PROBE_INIT(1, &probe_2027, "kernel.function(\"SyS_read@fs/read_write.c:501\").return", "kernel.function(\"SyS_read@fs/read_write.c:501\").return", "./systemtap.base/pr10854.stp:14:1", " from: kernel.function(\"sys_read\").return"),
- STAP_PROBE_INIT(2, &probe_2028, "kernel.function(\"vfs_truncate@fs/open.c:65\").call", "kernel.function(\"vfs_truncate@fs/open.c:65\").call", "./systemtap.base/pr10854.stp:20:1", " from: kernel.function(\"vfs*@fs/*.c\").call"),
- STAP_PROBE_INIT(3, &probe_2028, "kernel.function(\"vfs_readv@fs/read_write.c:779\").call", "kernel.function(\"vfs_readv@fs/read_write.c:779\").call", "./systemtap.base/pr10854.stp:20:1", " from: kernel.function(\"vfs*@fs/*.c\").call"),
- STAP_PROBE_INIT(4, &probe_2028, "kernel.function(\"vfs_write@fs/read_write.c:459\").call", "kernel.function(\"vfs_write@fs/read_write.c:459\").call", "./systemtap.base/pr10854.stp:20:1", " from: kernel.function(\"vfs*@fs/*.c\").call"),
- STAP_PROBE_INIT(5, &probe_2028, "kernel.function(\"vfs_setpos@fs/read_write.c:56\").call", "kernel.function(\"vfs_setpos@fs/read_write.c:56\").call", "./systemtap.base/pr10854.stp:20:1", " from: kernel.function(\"vfs*@fs/*.c\").call"),
- STAP_PROBE_INIT(6, &probe_2028, "kernel.function(\"vfs_read@fs/read_write.c:382\").call", "kernel.function(\"vfs_read@fs/read_write.c:382\").call", "./systemtap.base/pr10854.stp:20:1", " from: kernel.function(\"vfs*@fs/*.c\").call"),
- STAP_PROBE_INIT(7, &probe_2028, "kernel.function(\"vfs_llseek@fs/read_write.c:254\").call", "kernel.function(\"vfs_llseek@fs/read_write.c:254\").call", "./systemtap.base/pr10854.stp:20:1", " from: kernel.function(\"vfs*@fs/*.c\").call"),
- STAP_PROBE_INIT(8, &probe_2028, "kernel.function(\"vfs_writev@fs/read_write.c:792\").call", "kernel.function(\"vfs_writev@fs/read_write.c:792\").call", "./systemtap.base/pr10854.stp:20:1", " from: kernel.function(\"vfs*@fs/*.c\").call"),
- STAP_PROBE_INIT(9, &probe_2028, "kernel.function(\"vfs_stat@fs/stat.c:102\").call", "kernel.function(\"vfs_stat@fs/stat.c:102\").call", "./systemtap.base/pr10854.stp:20:1", " from: kernel.function(\"vfs*@fs/*.c\").call"),
- STAP_PROBE_INIT(10, &probe_2028, "kernel.function(\"vfs_lstat@fs/stat.c:108\").call", "kernel.function(\"vfs_lstat@fs/stat.c:108\").call", "./systemtap.base/pr10854.stp:20:1", " from: kernel.function(\"vfs*@fs/*.c\").call"),
- STAP_PROBE_INIT(11, &probe_2028, "kernel.function(\"vfs_getattr@fs/stat.c:40\").call", "kernel.function(\"vfs_getattr@fs/stat.c:40\").call", "./systemtap.base/pr10854.stp:20:1", " from: kernel.function(\"vfs*@fs/*.c\").call"),
- STAP_PROBE_INIT(12, &probe_2028, "kernel.function(\"vfs_fstatat@fs/stat.c:71\").call", "kernel.function(\"vfs_fstatat@fs/stat.c:71\").call", "./systemtap.base/pr10854.stp:20:1", " from: kernel.function(\"vfs*@fs/*.c\").call"),
- STAP_PROBE_INIT(13, &probe_2028, "kernel.function(\"vfs_fstat@fs/stat.c:58\").call", "kernel.function(\"vfs_fstat@fs/stat.c:58\").call", "./systemtap.base/pr10854.stp:20:1", " from: kernel.function(\"vfs*@fs/*.c\").call"),
- STAP_PROBE_INIT(14, &probe_2028, "kernel.function(\"vfs_mknod@fs/namei.c:3165\").call", "kernel.function(\"vfs_mknod@fs/namei.c:3165\").call", "./systemtap.base/pr10854.stp:20:1", " from: kernel.function(\"vfs*@fs/*.c\").call"),
- STAP_PROBE_INIT(15, &probe_2028, "kernel.function(\"vfs_symlink@fs/namei.c:3548\").call", "kernel.function(\"vfs_symlink@fs/namei.c:3548\").call", "./systemtap.base/pr10854.stp:20:1", " from: kernel.function(\"vfs*@fs/*.c\").call"),
- STAP_PROBE_INIT(16, &probe_2028, "kernel.function(\"vfs_readlink@fs/namei.c:3984\").call", "kernel.function(\"vfs_readlink@fs/namei.c:3984\").call", "./systemtap.base/pr10854.stp:20:1", " from: kernel.function(\"vfs*@fs/*.c\").call"),
- STAP_PROBE_INIT(17, &probe_2028, "kernel.function(\"vfs_link@fs/namei.c:3604\").call", "kernel.function(\"vfs_link@fs/namei.c:3604\").call", "./systemtap.base/pr10854.stp:20:1", " from: kernel.function(\"vfs*@fs/*.c\").call"),
- STAP_PROBE_INIT(18, &probe_2028, "kernel.function(\"vfs_rmdir@fs/namei.c:3335\").call", "kernel.function(\"vfs_rmdir@fs/namei.c:3335\").call", "./systemtap.base/pr10854.stp:20:1", " from: kernel.function(\"vfs*@fs/*.c\").call"),
- STAP_PROBE_INIT(19, &probe_2028, "kernel.function(\"vfs_follow_link@fs/namei.c:4023\").call", "kernel.function(\"vfs_follow_link@fs/namei.c:4023\").call", "./systemtap.base/pr10854.stp:20:1", " from: kernel.function(\"vfs*@fs/*.c\").call"),
- STAP_PROBE_INIT(20, &probe_2028, "kernel.function(\"vfs_rename@fs/namei.c:3834\").call", "kernel.function(\"vfs_rename@fs/namei.c:3834\").call", "./systemtap.base/pr10854.stp:20:1", " from: kernel.function(\"vfs*@fs/*.c\").call"),
- STAP_PROBE_INIT(21, &probe_2028, "kernel.function(\"vfs_create@fs/namei.c:2314\").call", "kernel.function(\"vfs_create@fs/namei.c:2314\").call", "./systemtap.base/pr10854.stp:20:1", " from: kernel.function(\"vfs*@fs/*.c\").call"),
- STAP_PROBE_INIT(22, &probe_2028, "kernel.function(\"vfs_path_lookup@fs/namei.c:2057\").call", "kernel.function(\"vfs_path_lookup@fs/namei.c:2057\").call", "./systemtap.base/pr10854.stp:20:1", " from: kernel.function(\"vfs*@fs/*.c\").call"),
- STAP_PROBE_INIT(23, &probe_2028, "kernel.function(\"vfs_path_lookup@fs/namei.c:2057\").call", "kernel.function(\"vfs_path_lookup@fs/namei.c:2057\").call", "./systemtap.base/pr10854.stp:20:1", " from: kernel.function(\"vfs*@fs/*.c\").call"),
- STAP_PROBE_INIT(24, &probe_2028, "kernel.function(\"vfs_mkdir@fs/namei.c:3256\").call", "kernel.function(\"vfs_mkdir@fs/namei.c:3256\").call", "./systemtap.base/pr10854.stp:20:1", " from: kernel.function(\"vfs*@fs/*.c\").call"),
- STAP_PROBE_INIT(25, &probe_2028, "kernel.function(\"vfs_unlink@fs/namei.c:3434\").call", "kernel.function(\"vfs_unlink@fs/namei.c:3434\").call", "./systemtap.base/pr10854.stp:20:1", " from: kernel.function(\"vfs*@fs/*.c\").call"),
- STAP_PROBE_INIT(26, &probe_2028, "kernel.function(\"vfs_kern_mount@fs/namespace.c:775\").call", "kernel.function(\"vfs_kern_mount@fs/namespace.c:775\").call", "./systemtap.base/pr10854.stp:20:1", " from: kernel.function(\"vfs*@fs/*.c\").call"),
- STAP_PROBE_INIT(27, &probe_2028, "kernel.function(\"vfs_setxattr@fs/xattr.c:122\").call", "kernel.function(\"vfs_setxattr@fs/xattr.c:122\").call", "./systemtap.base/pr10854.stp:20:1", " from: kernel.function(\"vfs*@fs/*.c\").call"),
- STAP_PROBE_INIT(28, &probe_2028, "kernel.function(\"vfs_listxattr@fs/xattr.c:267\").call", "kernel.function(\"vfs_listxattr@fs/xattr.c:267\").call", "./systemtap.base/pr10854.stp:20:1", " from: kernel.function(\"vfs*@fs/*.c\").call"),
- STAP_PROBE_INIT(29, &probe_2028, "kernel.function(\"vfs_xattr_cmp@fs/xattr.c:212\").call", "kernel.function(\"vfs_xattr_cmp@fs/xattr.c:212\").call", "./systemtap.base/pr10854.stp:20:1", " from: kernel.function(\"vfs*@fs/*.c\").call"),
- STAP_PROBE_INIT(30, &probe_2028, "kernel.function(\"vfs_getxattr@fs/xattr.c:231\").call", "kernel.function(\"vfs_getxattr@fs/xattr.c:231\").call", "./systemtap.base/pr10854.stp:20:1", " from: kernel.function(\"vfs*@fs/*.c\").call"),
- STAP_PROBE_INIT(31, &probe_2028, "kernel.function(\"vfs_removexattr@fs/xattr.c:287\").call", "kernel.function(\"vfs_removexattr@fs/xattr.c:287\").call", "./systemtap.base/pr10854.stp:20:1", " from: kernel.function(\"vfs*@fs/*.c\").call"),
- STAP_PROBE_INIT(32, &probe_2028, "kernel.function(\"vfs_getxattr_alloc@fs/xattr.c:181\").call", "kernel.function(\"vfs_getxattr_alloc@fs/xattr.c:181\").call", "./systemtap.base/pr10854.stp:20:1", " from: kernel.function(\"vfs*@fs/*.c\").call"),
- STAP_PROBE_INIT(33, &probe_2028, "kernel.function(\"vfs_fsync@fs/sync.c:194\").call", "kernel.function(\"vfs_fsync@fs/sync.c:194\").call", "./systemtap.base/pr10854.stp:20:1", " from: kernel.function(\"vfs*@fs/*.c\").call"),
- STAP_PROBE_INIT(34, &probe_2028, "kernel.function(\"vfs_fsync_range@fs/sync.c:178\").call", "kernel.function(\"vfs_fsync_range@fs/sync.c:178\").call", "./systemtap.base/pr10854.stp:20:1", " from: kernel.function(\"vfs*@fs/*.c\").call"),
- STAP_PROBE_INIT(35, &probe_2028, "kernel.function(\"vfs_statfs@fs/statfs.c:66\").call", "kernel.function(\"vfs_statfs@fs/statfs.c:66\").call", "./systemtap.base/pr10854.stp:20:1", " from: kernel.function(\"vfs*@fs/*.c\").call"),
- STAP_PROBE_INIT(36, &probe_2028, "kernel.function(\"vfs_ustat@fs/statfs.c:216\").call", "kernel.function(\"vfs_ustat@fs/statfs.c:216\").call", "./systemtap.base/pr10854.stp:20:1", " from: kernel.function(\"vfs*@fs/*.c\").call"),
- STAP_PROBE_INIT(37, &probe_2028, "kernel.function(\"vfs_setlease@fs/locks.c:1615\").call", "kernel.function(\"vfs_setlease@fs/locks.c:1615\").call", "./systemtap.base/pr10854.stp:20:1", " from: kernel.function(\"vfs*@fs/*.c\").call"),
- STAP_PROBE_INIT(38, &probe_2028, "kernel.function(\"vfs_lock_file@fs/locks.c:1910\").call", "kernel.function(\"vfs_lock_file@fs/locks.c:1910\").call", "./systemtap.base/pr10854.stp:20:1", " from: kernel.function(\"vfs*@fs/*.c\").call"),
- STAP_PROBE_INIT(39, &probe_2028, "kernel.function(\"vfs_cancel_lock@fs/locks.c:2247\").call", "kernel.function(\"vfs_cancel_lock@fs/locks.c:2247\").call", "./systemtap.base/pr10854.stp:20:1", " from: kernel.function(\"vfs*@fs/*.c\").call"),
- STAP_PROBE_INIT(40, &probe_2028, "kernel.function(\"vfs_test_lock@fs/locks.c:1798\").call", "kernel.function(\"vfs_test_lock@fs/locks.c:1798\").call", "./systemtap.base/pr10854.stp:20:1", " from: kernel.function(\"vfs*@fs/*.c\").call"),
- STAP_PROBE_INIT(41, &probe_2067, "kernel.function(\"vfs_truncate@fs/open.c:65\").return", "kernel.function(\"vfs_truncate@fs/open.c:65\").return", "./systemtap.base/pr10854.stp:21:1", " from: kernel.function(\"vfs*@fs/*.c\").return"),
- STAP_PROBE_INIT(42, &probe_2067, "kernel.function(\"vfs_readv@fs/read_write.c:779\").return", "kernel.function(\"vfs_readv@fs/read_write.c:779\").return", "./systemtap.base/pr10854.stp:21:1", " from: kernel.function(\"vfs*@fs/*.c\").return"),
- STAP_PROBE_INIT(43, &probe_2067, "kernel.function(\"vfs_write@fs/read_write.c:459\").return", "kernel.function(\"vfs_write@fs/read_write.c:459\").return", "./systemtap.base/pr10854.stp:21:1", " from: kernel.function(\"vfs*@fs/*.c\").return"),
- STAP_PROBE_INIT(44, &probe_2067, "kernel.function(\"vfs_setpos@fs/read_write.c:56\").return", "kernel.function(\"vfs_setpos@fs/read_write.c:56\").return", "./systemtap.base/pr10854.stp:21:1", " from: kernel.function(\"vfs*@fs/*.c\").return"),
- STAP_PROBE_INIT(45, &probe_2067, "kernel.function(\"vfs_read@fs/read_write.c:382\").return", "kernel.function(\"vfs_read@fs/read_write.c:382\").return", "./systemtap.base/pr10854.stp:21:1", " from: kernel.function(\"vfs*@fs/*.c\").return"),
- STAP_PROBE_INIT(46, &probe_2067, "kernel.function(\"vfs_llseek@fs/read_write.c:254\").return", "kernel.function(\"vfs_llseek@fs/read_write.c:254\").return", "./systemtap.base/pr10854.stp:21:1", " from: kernel.function(\"vfs*@fs/*.c\").return"),
- STAP_PROBE_INIT(47, &probe_2067, "kernel.function(\"vfs_writev@fs/read_write.c:792\").return", "kernel.function(\"vfs_writev@fs/read_write.c:792\").return", "./systemtap.base/pr10854.stp:21:1", " from: kernel.function(\"vfs*@fs/*.c\").return"),
- STAP_PROBE_INIT(48, &probe_2067, "kernel.function(\"vfs_stat@fs/stat.c:102\").return", "kernel.function(\"vfs_stat@fs/stat.c:102\").return", "./systemtap.base/pr10854.stp:21:1", " from: kernel.function(\"vfs*@fs/*.c\").return"),
- STAP_PROBE_INIT(49, &probe_2067, "kernel.function(\"vfs_lstat@fs/stat.c:108\").return", "kernel.function(\"vfs_lstat@fs/stat.c:108\").return", "./systemtap.base/pr10854.stp:21:1", " from: kernel.function(\"vfs*@fs/*.c\").return"),
- STAP_PROBE_INIT(50, &probe_2067, "kernel.function(\"vfs_getattr@fs/stat.c:40\").return", "kernel.function(\"vfs_getattr@fs/stat.c:40\").return", "./systemtap.base/pr10854.stp:21:1", " from: kernel.function(\"vfs*@fs/*.c\").return"),
- STAP_PROBE_INIT(51, &probe_2067, "kernel.function(\"vfs_fstatat@fs/stat.c:71\").return", "kernel.function(\"vfs_fstatat@fs/stat.c:71\").return", "./systemtap.base/pr10854.stp:21:1", " from: kernel.function(\"vfs*@fs/*.c\").return"),
- STAP_PROBE_INIT(52, &probe_2067, "kernel.function(\"vfs_fstat@fs/stat.c:58\").return", "kernel.function(\"vfs_fstat@fs/stat.c:58\").return", "./systemtap.base/pr10854.stp:21:1", " from: kernel.function(\"vfs*@fs/*.c\").return"),
- STAP_PROBE_INIT(53, &probe_2067, "kernel.function(\"vfs_mknod@fs/namei.c:3165\").return", "kernel.function(\"vfs_mknod@fs/namei.c:3165\").return", "./systemtap.base/pr10854.stp:21:1", " from: kernel.function(\"vfs*@fs/*.c\").return"),
- STAP_PROBE_INIT(54, &probe_2067, "kernel.function(\"vfs_symlink@fs/namei.c:3548\").return", "kernel.function(\"vfs_symlink@fs/namei.c:3548\").return", "./systemtap.base/pr10854.stp:21:1", " from: kernel.function(\"vfs*@fs/*.c\").return"),
- STAP_PROBE_INIT(55, &probe_2067, "kernel.function(\"vfs_readlink@fs/namei.c:3984\").return", "kernel.function(\"vfs_readlink@fs/namei.c:3984\").return", "./systemtap.base/pr10854.stp:21:1", " from: kernel.function(\"vfs*@fs/*.c\").return"),
- STAP_PROBE_INIT(56, &probe_2067, "kernel.function(\"vfs_link@fs/namei.c:3604\").return", "kernel.function(\"vfs_link@fs/namei.c:3604\").return", "./systemtap.base/pr10854.stp:21:1", " from: kernel.function(\"vfs*@fs/*.c\").return"),
- STAP_PROBE_INIT(57, &probe_2067, "kernel.function(\"vfs_rmdir@fs/namei.c:3335\").return", "kernel.function(\"vfs_rmdir@fs/namei.c:3335\").return", "./systemtap.base/pr10854.stp:21:1", " from: kernel.function(\"vfs*@fs/*.c\").return"),
- STAP_PROBE_INIT(58, &probe_2067, "kernel.function(\"vfs_follow_link@fs/namei.c:4023\").return", "kernel.function(\"vfs_follow_link@fs/namei.c:4023\").return", "./systemtap.base/pr10854.stp:21:1", " from: kernel.function(\"vfs*@fs/*.c\").return"),
- STAP_PROBE_INIT(59, &probe_2067, "kernel.function(\"vfs_rename@fs/namei.c:3834\").return", "kernel.function(\"vfs_rename@fs/namei.c:3834\").return", "./systemtap.base/pr10854.stp:21:1", " from: kernel.function(\"vfs*@fs/*.c\").return"),
- STAP_PROBE_INIT(60, &probe_2067, "kernel.function(\"vfs_create@fs/namei.c:2314\").return", "kernel.function(\"vfs_create@fs/namei.c:2314\").return", "./systemtap.base/pr10854.stp:21:1", " from: kernel.function(\"vfs*@fs/*.c\").return"),
- STAP_PROBE_INIT(61, &probe_2067, "kernel.function(\"vfs_path_lookup@fs/namei.c:2057\").return", "kernel.function(\"vfs_path_lookup@fs/namei.c:2057\").return", "./systemtap.base/pr10854.stp:21:1", " from: kernel.function(\"vfs*@fs/*.c\").return"),
- STAP_PROBE_INIT(62, &probe_2067, "kernel.function(\"vfs_path_lookup@fs/namei.c:2057\").return", "kernel.function(\"vfs_path_lookup@fs/namei.c:2057\").return", "./systemtap.base/pr10854.stp:21:1", " from: kernel.function(\"vfs*@fs/*.c\").return"),
- STAP_PROBE_INIT(63, &probe_2067, "kernel.function(\"vfs_mkdir@fs/namei.c:3256\").return", "kernel.function(\"vfs_mkdir@fs/namei.c:3256\").return", "./systemtap.base/pr10854.stp:21:1", " from: kernel.function(\"vfs*@fs/*.c\").return"),
- STAP_PROBE_INIT(64, &probe_2067, "kernel.function(\"vfs_unlink@fs/namei.c:3434\").return", "kernel.function(\"vfs_unlink@fs/namei.c:3434\").return", "./systemtap.base/pr10854.stp:21:1", " from: kernel.function(\"vfs*@fs/*.c\").return"),
- STAP_PROBE_INIT(65, &probe_2067, "kernel.function(\"vfs_kern_mount@fs/namespace.c:775\").return", "kernel.function(\"vfs_kern_mount@fs/namespace.c:775\").return", "./systemtap.base/pr10854.stp:21:1", " from: kernel.function(\"vfs*@fs/*.c\").return"),
- STAP_PROBE_INIT(66, &probe_2067, "kernel.function(\"vfs_setxattr@fs/xattr.c:122\").return", "kernel.function(\"vfs_setxattr@fs/xattr.c:122\").return", "./systemtap.base/pr10854.stp:21:1", " from: kernel.function(\"vfs*@fs/*.c\").return"),
- STAP_PROBE_INIT(67, &probe_2067, "kernel.function(\"vfs_listxattr@fs/xattr.c:267\").return", "kernel.function(\"vfs_listxattr@fs/xattr.c:267\").return", "./systemtap.base/pr10854.stp:21:1", " from: kernel.function(\"vfs*@fs/*.c\").return"),
- STAP_PROBE_INIT(68, &probe_2067, "kernel.function(\"vfs_xattr_cmp@fs/xattr.c:212\").return", "kernel.function(\"vfs_xattr_cmp@fs/xattr.c:212\").return", "./systemtap.base/pr10854.stp:21:1", " from: kernel.function(\"vfs*@fs/*.c\").return"),
- STAP_PROBE_INIT(69, &probe_2067, "kernel.function(\"vfs_getxattr@fs/xattr.c:231\").return", "kernel.function(\"vfs_getxattr@fs/xattr.c:231\").return", "./systemtap.base/pr10854.stp:21:1", " from: kernel.function(\"vfs*@fs/*.c\").return"),
- STAP_PROBE_INIT(70, &probe_2067, "kernel.function(\"vfs_removexattr@fs/xattr.c:287\").return", "kernel.function(\"vfs_removexattr@fs/xattr.c:287\").return", "./systemtap.base/pr10854.stp:21:1", " from: kernel.function(\"vfs*@fs/*.c\").return"),
- STAP_PROBE_INIT(71, &probe_2067, "kernel.function(\"vfs_getxattr_alloc@fs/xattr.c:181\").return", "kernel.function(\"vfs_getxattr_alloc@fs/xattr.c:181\").return", "./systemtap.base/pr10854.stp:21:1", " from: kernel.function(\"vfs*@fs/*.c\").return"),
- STAP_PROBE_INIT(72, &probe_2067, "kernel.function(\"vfs_fsync@fs/sync.c:194\").return", "kernel.function(\"vfs_fsync@fs/sync.c:194\").return", "./systemtap.base/pr10854.stp:21:1", " from: kernel.function(\"vfs*@fs/*.c\").return"),
- STAP_PROBE_INIT(73, &probe_2067, "kernel.function(\"vfs_fsync_range@fs/sync.c:178\").return", "kernel.function(\"vfs_fsync_range@fs/sync.c:178\").return", "./systemtap.base/pr10854.stp:21:1", " from: kernel.function(\"vfs*@fs/*.c\").return"),
- STAP_PROBE_INIT(74, &probe_2067, "kernel.function(\"vfs_statfs@fs/statfs.c:66\").return", "kernel.function(\"vfs_statfs@fs/statfs.c:66\").return", "./systemtap.base/pr10854.stp:21:1", " from: kernel.function(\"vfs*@fs/*.c\").return"),
- STAP_PROBE_INIT(75, &probe_2067, "kernel.function(\"vfs_ustat@fs/statfs.c:216\").return", "kernel.function(\"vfs_ustat@fs/statfs.c:216\").return", "./systemtap.base/pr10854.stp:21:1", " from: kernel.function(\"vfs*@fs/*.c\").return"),
- STAP_PROBE_INIT(76, &probe_2067, "kernel.function(\"vfs_setlease@fs/locks.c:1615\").return", "kernel.function(\"vfs_setlease@fs/locks.c:1615\").return", "./systemtap.base/pr10854.stp:21:1", " from: kernel.function(\"vfs*@fs/*.c\").return"),
- STAP_PROBE_INIT(77, &probe_2067, "kernel.function(\"vfs_lock_file@fs/locks.c:1910\").return", "kernel.function(\"vfs_lock_file@fs/locks.c:1910\").return", "./systemtap.base/pr10854.stp:21:1", " from: kernel.function(\"vfs*@fs/*.c\").return"),
- STAP_PROBE_INIT(78, &probe_2067, "kernel.function(\"vfs_cancel_lock@fs/locks.c:2247\").return", "kernel.function(\"vfs_cancel_lock@fs/locks.c:2247\").return", "./systemtap.base/pr10854.stp:21:1", " from: kernel.function(\"vfs*@fs/*.c\").return"),
- STAP_PROBE_INIT(79, &probe_2067, "kernel.function(\"vfs_test_lock@fs/locks.c:1798\").return", "kernel.function(\"vfs_test_lock@fs/locks.c:1798\").return", "./systemtap.base/pr10854.stp:21:1", " from: kernel.function(\"vfs*@fs/*.c\").return"),
- };
- /* ---- dwarf probes ---- */
- #if ! defined(CONFIG_KPROBES)
- #error "Need CONFIG_KPROBES!"
- #endif
- #ifndef KRETACTIVE
- #define KRETACTIVE (max(15,6*(int)num_possible_cpus()))
- #endif
- #include "linux/kprobes-common.h"
- static int enter_kprobe_probe (struct kprobe *inst, struct pt_regs *regs);
- static int enter_kretprobe_probe (struct kretprobe_instance *inst, struct pt_regs *regs);
- #if defined(STAPCONF_UNREGISTER_KPROBES)
- static void * stap_unreg_kprobes[80];
- #endif
- static struct stap_dwarf_kprobe stap_dwarf_kprobes[80];
- static struct stap_dwarf_probe {
- const unsigned return_p:1;
- const unsigned maxactive_p:1;
- const unsigned optional_p:1;
- unsigned registered_p:1;
- const unsigned short maxactive_val;
- const unsigned short saved_longs;
- const unsigned short saved_strings;
- const char module[7];
- const char section[7];
- const unsigned long address;
- const struct stap_probe * const probe;
- const struct stap_probe * const entry_probe;
- } stap_dwarf_probes[] = {
- { .address=(unsigned long)0xf43e8ULL, .module="kernel", .section="_stext", .probe=(&stap_probes[0]), },
- { .return_p=1, .address=(unsigned long)0xf43e8ULL, .module="kernel", .section="_stext", .probe=(&stap_probes[1]), },
- { .address=(unsigned long)0xf22ecULL, .module="kernel", .section="_stext", .probe=(&stap_probes[2]), },
- { .address=(unsigned long)0xf4a2cULL, .module="kernel", .section="_stext", .probe=(&stap_probes[3]), },
- { .address=(unsigned long)0xf4004ULL, .module="kernel", .section="_stext", .probe=(&stap_probes[4]), },
- { .address=(unsigned long)0xf3348ULL, .module="kernel", .section="_stext", .probe=(&stap_probes[5]), },
- { .address=(unsigned long)0xf419cULL, .module="kernel", .section="_stext", .probe=(&stap_probes[6]), },
- { .address=(unsigned long)0xf33f4ULL, .module="kernel", .section="_stext", .probe=(&stap_probes[7]), },
- { .address=(unsigned long)0xf49acULL, .module="kernel", .section="_stext", .probe=(&stap_probes[8]), },
- { .address=(unsigned long)0xf8860ULL, .module="kernel", .section="_stext", .probe=(&stap_probes[9]), },
- { .address=(unsigned long)0xf8834ULL, .module="kernel", .section="_stext", .probe=(&stap_probes[10]), },
- { .address=(unsigned long)0xf86dcULL, .module="kernel", .section="_stext", .probe=(&stap_probes[11]), },
- { .address=(unsigned long)0xf8790ULL, .module="kernel", .section="_stext", .probe=(&stap_probes[12]), },
- { .address=(unsigned long)0xf872cULL, .module="kernel", .section="_stext", .probe=(&stap_probes[13]), },
- { .address=(unsigned long)0xff378ULL, .module="kernel", .section="_stext", .probe=(&stap_probes[14]), },
- { .address=(unsigned long)0xfe7c8ULL, .module="kernel", .section="_stext", .probe=(&stap_probes[15]), },
- { .address=(unsigned long)0xfdc44ULL, .module="kernel", .section="_stext", .probe=(&stap_probes[16]), },
- { .address=(unsigned long)0xff1d0ULL, .module="kernel", .section="_stext", .probe=(&stap_probes[17]), },
- { .address=(unsigned long)0x100718ULL, .module="kernel", .section="_stext", .probe=(&stap_probes[18]), },
- { .address=(unsigned long)0xff0fcULL, .module="kernel", .section="_stext", .probe=(&stap_probes[19]), },
- { .address=(unsigned long)0x100980ULL, .module="kernel", .section="_stext", .probe=(&stap_probes[20]), },
- { .address=(unsigned long)0xfe624ULL, .module="kernel", .section="_stext", .probe=(&stap_probes[21]), },
- { .address=(unsigned long)0x448460ULL, .module="kernel", .section="_stext", .probe=(&stap_probes[22]), },
- { .address=(unsigned long)0x10029cULL, .module="kernel", .section="_stext", .probe=(&stap_probes[23]), },
- { .address=(unsigned long)0xfe6e8ULL, .module="kernel", .section="_stext", .probe=(&stap_probes[24]), },
- { .address=(unsigned long)0x100478ULL, .module="kernel", .section="_stext", .probe=(&stap_probes[25]), },
- { .address=(unsigned long)0x11035cULL, .module="kernel", .section="_stext", .probe=(&stap_probes[26]), },
- { .address=(unsigned long)0x115910ULL, .module="kernel", .section="_stext", .probe=(&stap_probes[27]), },
- { .address=(unsigned long)0x114f70ULL, .module="kernel", .section="_stext", .probe=(&stap_probes[28]), },
- { .address=(unsigned long)0x115c40ULL, .module="kernel", .section="_stext", .probe=(&stap_probes[29]), },
- { .address=(unsigned long)0x1154f0ULL, .module="kernel", .section="_stext", .probe=(&stap_probes[30]), },
- { .address=(unsigned long)0x1156d4ULL, .module="kernel", .section="_stext", .probe=(&stap_probes[31]), },
- { .address=(unsigned long)0x115b4cULL, .module="kernel", .section="_stext", .probe=(&stap_probes[32]), },
- { .address=(unsigned long)0x11f7b0ULL, .module="kernel", .section="_stext", .probe=(&stap_probes[33]), },
- { .address=(unsigned long)0x11f75cULL, .module="kernel", .section="_stext", .probe=(&stap_probes[34]), },
- { .address=(unsigned long)0x120cf8ULL, .module="kernel", .section="_stext", .probe=(&stap_probes[35]), },
- { .address=(unsigned long)0x120f88ULL, .module="kernel", .section="_stext", .probe=(&stap_probes[36]), },
- { .address=(unsigned long)0x13bfccULL, .module="kernel", .section="_stext", .probe=(&stap_probes[37]), },
- { .address=(unsigned long)0x13b95cULL, .module="kernel", .section="_stext", .probe=(&stap_probes[38]), },
- { .address=(unsigned long)0x139ff0ULL, .module="kernel", .section="_stext", .probe=(&stap_probes[39]), },
- { .address=(unsigned long)0x13af5cULL, .module="kernel", .section="_stext", .probe=(&stap_probes[40]), },
- { .return_p=1, .address=(unsigned long)0xf22ecULL, .module="kernel", .section="_stext", .probe=(&stap_probes[41]), },
- { .return_p=1, .address=(unsigned long)0xf4a2cULL, .module="kernel", .section="_stext", .probe=(&stap_probes[42]), },
- { .return_p=1, .address=(unsigned long)0xf4004ULL, .module="kernel", .section="_stext", .probe=(&stap_probes[43]), },
- { .return_p=1, .address=(unsigned long)0xf3348ULL, .module="kernel", .section="_stext", .probe=(&stap_probes[44]), },
- { .return_p=1, .address=(unsigned long)0xf419cULL, .module="kernel", .section="_stext", .probe=(&stap_probes[45]), },
- { .return_p=1, .address=(unsigned long)0xf33f4ULL, .module="kernel", .section="_stext", .probe=(&stap_probes[46]), },
- { .return_p=1, .address=(unsigned long)0xf49acULL, .module="kernel", .section="_stext", .probe=(&stap_probes[47]), },
- { .return_p=1, .address=(unsigned long)0xf8860ULL, .module="kernel", .section="_stext", .probe=(&stap_probes[48]), },
- { .return_p=1, .address=(unsigned long)0xf8834ULL, .module="kernel", .section="_stext", .probe=(&stap_probes[49]), },
- { .return_p=1, .address=(unsigned long)0xf86dcULL, .module="kernel", .section="_stext", .probe=(&stap_probes[50]), },
- { .return_p=1, .address=(unsigned long)0xf8790ULL, .module="kernel", .section="_stext", .probe=(&stap_probes[51]), },
- { .return_p=1, .address=(unsigned long)0xf872cULL, .module="kernel", .section="_stext", .probe=(&stap_probes[52]), },
- { .return_p=1, .address=(unsigned long)0xff378ULL, .module="kernel", .section="_stext", .probe=(&stap_probes[53]), },
- { .return_p=1, .address=(unsigned long)0xfe7c8ULL, .module="kernel", .section="_stext", .probe=(&stap_probes[54]), },
- { .return_p=1, .address=(unsigned long)0xfdc44ULL, .module="kernel", .section="_stext", .probe=(&stap_probes[55]), },
- { .return_p=1, .address=(unsigned long)0xff1d0ULL, .module="kernel", .section="_stext", .probe=(&stap_probes[56]), },
- { .return_p=1, .address=(unsigned long)0x100718ULL, .module="kernel", .section="_stext", .probe=(&stap_probes[57]), },
- { .return_p=1, .address=(unsigned long)0xff0fcULL, .module="kernel", .section="_stext", .probe=(&stap_probes[58]), },
- { .return_p=1, .address=(unsigned long)0x100980ULL, .module="kernel", .section="_stext", .probe=(&stap_probes[59]), },
- { .return_p=1, .address=(unsigned long)0xfe624ULL, .module="kernel", .section="_stext", .probe=(&stap_probes[60]), },
- { .return_p=1, .address=(unsigned long)0x448460ULL, .module="kernel", .section="_stext", .probe=(&stap_probes[61]), },
- { .return_p=1, .address=(unsigned long)0x10029cULL, .module="kernel", .section="_stext", .probe=(&stap_probes[62]), },
- { .return_p=1, .address=(unsigned long)0xfe6e8ULL, .module="kernel", .section="_stext", .probe=(&stap_probes[63]), },
- { .return_p=1, .address=(unsigned long)0x100478ULL, .module="kernel", .section="_stext", .probe=(&stap_probes[64]), },
- { .return_p=1, .address=(unsigned long)0x11035cULL, .module="kernel", .section="_stext", .probe=(&stap_probes[65]), },
- { .return_p=1, .address=(unsigned long)0x115910ULL, .module="kernel", .section="_stext", .probe=(&stap_probes[66]), },
- { .return_p=1, .address=(unsigned long)0x114f70ULL, .module="kernel", .section="_stext", .probe=(&stap_probes[67]), },
- { .return_p=1, .address=(unsigned long)0x115c40ULL, .module="kernel", .section="_stext", .probe=(&stap_probes[68]), },
- { .return_p=1, .address=(unsigned long)0x1154f0ULL, .module="kernel", .section="_stext", .probe=(&stap_probes[69]), },
- { .return_p=1, .address=(unsigned long)0x1156d4ULL, .module="kernel", .section="_stext", .probe=(&stap_probes[70]), },
- { .return_p=1, .address=(unsigned long)0x115b4cULL, .module="kernel", .section="_stext", .probe=(&stap_probes[71]), },
- { .return_p=1, .address=(unsigned long)0x11f7b0ULL, .module="kernel", .section="_stext", .probe=(&stap_probes[72]), },
- { .return_p=1, .address=(unsigned long)0x11f75cULL, .module="kernel", .section="_stext", .probe=(&stap_probes[73]), },
- { .return_p=1, .address=(unsigned long)0x120cf8ULL, .module="kernel", .section="_stext", .probe=(&stap_probes[74]), },
- { .return_p=1, .address=(unsigned long)0x120f88ULL, .module="kernel", .section="_stext", .probe=(&stap_probes[75]), },
- { .return_p=1, .address=(unsigned long)0x13bfccULL, .module="kernel", .section="_stext", .probe=(&stap_probes[76]), },
- { .return_p=1, .address=(unsigned long)0x13b95cULL, .module="kernel", .section="_stext", .probe=(&stap_probes[77]), },
- { .return_p=1, .address=(unsigned long)0x139ff0ULL, .module="kernel", .section="_stext", .probe=(&stap_probes[78]), },
- { .return_p=1, .address=(unsigned long)0x13af5cULL, .module="kernel", .section="_stext", .probe=(&stap_probes[79]), },
- };
- static int enter_kprobe_probe (struct kprobe *inst, struct pt_regs *regs) {
- int kprobe_idx = ((uintptr_t)inst-(uintptr_t)stap_dwarf_kprobes)/sizeof(struct stap_dwarf_kprobe);
- struct stap_dwarf_probe *sdp = &stap_dwarf_probes[((kprobe_idx >= 0 && kprobe_idx < 80)?kprobe_idx:0)];
- #ifdef STP_ALIBI
- atomic_inc(probe_alibi(sdp->probe->index));
- #else
- struct context* __restrict__ c;
- #if !INTERRUPTIBLE
- unsigned long flags;
- #endif
- #ifdef STP_TIMING
- Stat stat = probe_timing(sdp->probe->index);
- #endif
- #if defined(STP_TIMING) || defined(STP_OVERLOAD)
- cycles_t cycles_atstart = get_cycles ();
- #endif
- #if INTERRUPTIBLE
- preempt_disable ();
- #else
- local_irq_save (flags);
- #endif
- if (unlikely ((((unsigned long) (& c)) & (THREAD_SIZE-1))
- < (MINSTACKSPACE + sizeof (struct thread_info)))) {
- atomic_inc (skipped_count());
- #ifdef STP_TIMING
- atomic_inc (skipped_count_lowstack());
- #endif
- goto probe_epilogue;
- }
- if (atomic_read (session_state()) != STAP_SESSION_RUNNING)
- goto probe_epilogue;
- c = _stp_runtime_entryfn_get_context();
- if (atomic_inc_return (& c->busy) != 1) {
- #if !INTERRUPTIBLE
- atomic_inc (skipped_count());
- #endif
- #ifdef STP_TIMING
- atomic_inc (skipped_count_reentrant());
- #ifdef DEBUG_REENTRANCY
- _stp_warn ("Skipped %s due to %s residency on cpu %u\n", sdp->probe->pp, c->probe_point ?: "?", smp_processor_id());
- #endif
- #endif
- atomic_dec (& c->busy);
- goto probe_epilogue;
- }
- c->last_stmt = 0;
- c->last_error = 0;
- c->nesting = -1;
- c->uregs = 0;
- c->kregs = 0;
- #if defined __ia64__
- c->unwaddr = 0;
- #endif
- c->probe_point = sdp->probe->pp;
- #ifdef STP_NEED_PROBE_NAME
- c->probe_name = sdp->probe->pn;
- #endif
- c->probe_type = stp_probe_type_kprobe;
- memset(&c->ips, 0, sizeof(c->ips));
- c->user_mode_p = 0; c->full_uregs_p = 0;
- #ifdef STAP_NEED_REGPARM
- c->regparm = 0;
- #endif
- #if INTERRUPTIBLE
- c->actionremaining = MAXACTION_INTERRUPTIBLE;
- #else
- c->actionremaining = MAXACTION;
- #endif
- #if defined(STP_NEED_UNWIND_DATA)
- c->uwcache_user.state = uwcache_uninitialized;
- c->uwcache_kernel.state = uwcache_uninitialized;
- #endif
- c->kregs = regs;
- {
- unsigned long kprobes_ip = REG_IP(c->kregs);
- SET_REG_IP(regs, (unsigned long) inst->addr);
- (*sdp->probe->ph) (c);
- SET_REG_IP(regs, kprobes_ip);
- }
- #if defined(STP_TIMING) || defined(STP_OVERLOAD)
- {
- cycles_t cycles_atend = get_cycles ();
- int32_t cycles_elapsed = ((int32_t)cycles_atend > (int32_t)cycles_atstart)
- ? ((int32_t)cycles_atend - (int32_t)cycles_atstart)
- : (~(int32_t)0) - (int32_t)cycles_atstart + (int32_t)cycles_atend + 1;
- #ifdef STP_TIMING
- if (likely (stat)) _stp_stat_add(stat, cycles_elapsed);
- #endif
- #ifdef STP_OVERLOAD
- {
- cycles_t interval = (cycles_atend > c->cycles_base)
- ? (cycles_atend - c->cycles_base)
- : (STP_OVERLOAD_INTERVAL + 1);
- c->cycles_sum += cycles_elapsed;
- if (interval > STP_OVERLOAD_INTERVAL) {
- if (c->cycles_sum > STP_OVERLOAD_THRESHOLD) {
- _stp_error ("probe overhead exceeded threshold");
- atomic_set (session_state(), STAP_SESSION_ERROR);
- atomic_inc (error_count());
- }
- c->cycles_base = cycles_atend;
- c->cycles_sum = 0;
- }
- }
- #endif
- }
- #endif
- c->probe_point = 0;
- #ifdef STP_NEED_PROBE_NAME
- c->probe_name = 0;
- #endif
- c->probe_type = 0;
- if (unlikely (c->last_error && c->last_error[0])) {
- if (c->last_stmt != NULL)
- _stp_softerror ("%s near %s", c->last_error, c->last_stmt);
- else
- _stp_softerror ("%s", c->last_error);
- atomic_inc (error_count());
- if (atomic_read (error_count()) > MAXERRORS) {
- atomic_set (session_state(), STAP_SESSION_ERROR);
- _stp_exit ();
- }
- }
- atomic_dec (&c->busy);
- probe_epilogue:
- _stp_runtime_entryfn_put_context();
- if (unlikely (atomic_read (skipped_count()) > MAXSKIPPED)) {
- if (unlikely (pseudo_atomic_cmpxchg(session_state(), STAP_SESSION_RUNNING, STAP_SESSION_ERROR) == STAP_SESSION_RUNNING))
- _stp_error ("Skipped too many probes, check MAXSKIPPED or try again with stap -t for more details.");
- }
- #if INTERRUPTIBLE
- preempt_enable_no_resched ();
- #else
- local_irq_restore (flags);
- #endif
- #endif // STP_ALIBI
- return 0;
- }
- static int enter_kretprobe_common (struct kretprobe_instance *inst, struct pt_regs *regs, int entry) {
- struct kretprobe *krp = inst->rp;
- int kprobe_idx = ((uintptr_t)krp-(uintptr_t)stap_dwarf_kprobes)/sizeof(struct stap_dwarf_kprobe);
- struct stap_dwarf_probe *sdp = &stap_dwarf_probes[((kprobe_idx >= 0 && kprobe_idx < 80)?kprobe_idx:0)];
- const struct stap_probe *sp = entry ? sdp->entry_probe : sdp->probe;
- if (sp) {
- #ifdef STP_ALIBI
- atomic_inc(probe_alibi(sp->index));
- #else
- struct context* __restrict__ c;
- #if !INTERRUPTIBLE
- unsigned long flags;
- #endif
- #ifdef STP_TIMING
- Stat stat = probe_timing(sp->index);
- #endif
- #if defined(STP_TIMING) || defined(STP_OVERLOAD)
- cycles_t cycles_atstart = get_cycles ();
- #endif
- #if INTERRUPTIBLE
- preempt_disable ();
- #else
- local_irq_save (flags);
- #endif
- if (unlikely ((((unsigned long) (& c)) & (THREAD_SIZE-1))
- < (MINSTACKSPACE + sizeof (struct thread_info)))) {
- atomic_inc (skipped_count());
- #ifdef STP_TIMING
- atomic_inc (skipped_count_lowstack());
- #endif
- goto probe_epilogue;
- }
- if (atomic_read (session_state()) != STAP_SESSION_RUNNING)
- goto probe_epilogue;
- c = _stp_runtime_entryfn_get_context();
- if (atomic_inc_return (& c->busy) != 1) {
- #if !INTERRUPTIBLE
- atomic_inc (skipped_count());
- #endif
- #ifdef STP_TIMING
- atomic_inc (skipped_count_reentrant());
- #ifdef DEBUG_REENTRANCY
- _stp_warn ("Skipped %s due to %s residency on cpu %u\n", sp->pp, c->probe_point ?: "?", smp_processor_id());
- #endif
- #endif
- atomic_dec (& c->busy);
- goto probe_epilogue;
- }
- c->last_stmt = 0;
- c->last_error = 0;
- c->nesting = -1;
- c->uregs = 0;
- c->kregs = 0;
- #if defined __ia64__
- c->unwaddr = 0;
- #endif
- c->probe_point = sp->pp;
- #ifdef STP_NEED_PROBE_NAME
- c->probe_name = sp->pn;
- #endif
- c->probe_type = stp_probe_type_kretprobe;
- memset(&c->ips, 0, sizeof(c->ips));
- c->user_mode_p = 0; c->full_uregs_p = 0;
- #ifdef STAP_NEED_REGPARM
- c->regparm = 0;
- #endif
- #if INTERRUPTIBLE
- c->actionremaining = MAXACTION_INTERRUPTIBLE;
- #else
- c->actionremaining = MAXACTION;
- #endif
- #if defined(STP_NEED_UNWIND_DATA)
- c->uwcache_user.state = uwcache_uninitialized;
- c->uwcache_kernel.state = uwcache_uninitialized;
- #endif
- c->kregs = regs;
- c->ips.krp.pi = inst;
- c->ips.krp.pi_longs = sdp->saved_longs;
- {
- unsigned long kprobes_ip = REG_IP(c->kregs);
- if (entry)
- SET_REG_IP(regs, (unsigned long) inst->rp->kp.addr);
- else
- SET_REG_IP(regs, (unsigned long)inst->ret_addr);
- (sp->ph) (c);
- SET_REG_IP(regs, kprobes_ip);
- }
- #if defined(STP_TIMING) || defined(STP_OVERLOAD)
- {
- cycles_t cycles_atend = get_cycles ();
- int32_t cycles_elapsed = ((int32_t)cycles_atend > (int32_t)cycles_atstart)
- ? ((int32_t)cycles_atend - (int32_t)cycles_atstart)
- : (~(int32_t)0) - (int32_t)cycles_atstart + (int32_t)cycles_atend + 1;
- #ifdef STP_TIMING
- if (likely (stat)) _stp_stat_add(stat, cycles_elapsed);
- #endif
- #ifdef STP_OVERLOAD
- {
- cycles_t interval = (cycles_atend > c->cycles_base)
- ? (cycles_atend - c->cycles_base)
- : (STP_OVERLOAD_INTERVAL + 1);
- c->cycles_sum += cycles_elapsed;
- if (interval > STP_OVERLOAD_INTERVAL) {
- if (c->cycles_sum > STP_OVERLOAD_THRESHOLD) {
- _stp_error ("probe overhead exceeded threshold");
- atomic_set (session_state(), STAP_SESSION_ERROR);
- atomic_inc (error_count());
- }
- c->cycles_base = cycles_atend;
- c->cycles_sum = 0;
- }
- }
- #endif
- }
- #endif
- c->probe_point = 0;
- #ifdef STP_NEED_PROBE_NAME
- c->probe_name = 0;
- #endif
- c->probe_type = 0;
- if (unlikely (c->last_error && c->last_error[0])) {
- if (c->last_stmt != NULL)
- _stp_softerror ("%s near %s", c->last_error, c->last_stmt);
- else
- _stp_softerror ("%s", c->last_error);
- atomic_inc (error_count());
- if (atomic_read (error_count()) > MAXERRORS) {
- atomic_set (session_state(), STAP_SESSION_ERROR);
- _stp_exit ();
- }
- }
- atomic_dec (&c->busy);
- probe_epilogue:
- _stp_runtime_entryfn_put_context();
- if (unlikely (atomic_read (skipped_count()) > MAXSKIPPED)) {
- if (unlikely (pseudo_atomic_cmpxchg(session_state(), STAP_SESSION_RUNNING, STAP_SESSION_ERROR) == STAP_SESSION_RUNNING))
- _stp_error ("Skipped too many probes, check MAXSKIPPED or try again with stap -t for more details.");
- }
- #if INTERRUPTIBLE
- preempt_enable_no_resched ();
- #else
- local_irq_restore (flags);
- #endif
- #endif // STP_ALIBI
- }
- return 0;
- }
- static int enter_kretprobe_probe (struct kretprobe_instance *inst, struct pt_regs *regs) {
- return enter_kretprobe_common(inst, regs, 0);
- }
- static int enter_kretprobe_entry_probe (struct kretprobe_instance *inst, struct pt_regs *regs) {
- return enter_kretprobe_common(inst, regs, 1);
- }
- static int systemtap_module_init (void) {
- int rc = 0;
- int cpu;
- int i=0, j=0;
- const char *probe_point = "";
- {
- const char* release = UTS_RELEASE;
- #ifdef STAPCONF_GENERATED_COMPILE
- const char* version = UTS_VERSION;
- #endif
- if (strcmp (release, "3.11.0-rc5")) {
- _stp_error ("module release mismatch (%s vs %s)", release, "3.11.0-rc5");
- rc = -EINVAL;
- }
- #ifdef STAPCONF_GENERATED_COMPILE
- if (strcmp (utsname()->version, version)) {
- _stp_error ("module version mismatch (%s vs %s), release %s", version, utsname()->version, release);
- rc = -EINVAL;
- }
- #endif
- if (_stp_module_check()) rc = -EINVAL;
- if (_stp_privilege_credentials == 0) {
- if (STP_PRIVILEGE_CONTAINS(STP_PRIVILEGE, STP_PR_STAPDEV) ||
- STP_PRIVILEGE_CONTAINS(STP_PRIVILEGE, STP_PR_STAPUSR)) {
- _stp_privilege_credentials = STP_PRIVILEGE;
- #ifdef DEBUG_PRIVILEGE
- _dbug("User's privilege credentials default to %s\n",
- privilege_to_text(_stp_privilege_credentials));
- #endif
- }
- else {
- _stp_error ("Unable to verify that you have the required privilege credentials to run this module (%s required). You must use staprun version 1.7 or higher.",
- privilege_to_text(STP_PRIVILEGE));
- rc = -EINVAL;
- }
- }
- else {
- #ifdef DEBUG_PRIVILEGE
- _dbug("User's privilege credentials provided as %s\n",
- privilege_to_text(_stp_privilege_credentials));
- #endif
- if (! STP_PRIVILEGE_CONTAINS(_stp_privilege_credentials, STP_PRIVILEGE)) {
- _stp_error ("Your privilege credentials (%s) are insufficient to run this module (%s required).",
- privilege_to_text(_stp_privilege_credentials), privilege_to_text(STP_PRIVILEGE));
- rc = -EINVAL;
- }
- }
- }
- if (rc) goto out;
- rc = stp_session_init();
- if (rc) {
- _stp_error ("couldn't initialize the main session (rc %d)", rc);
- goto out;
- }
- #ifdef STAP_NEED_GETTIMEOFDAY
- rc = _stp_init_time();
- if (rc) {
- _stp_error ("couldn't initialize gettimeofday");
- goto out;
- }
- #endif
- (void) probe_point;
- (void) i;
- (void) j;
- atomic_set (session_state(), STAP_SESSION_STARTING);
- rc = _stp_runtime_contexts_alloc();
- if (rc != 0)
- goto out;
- global_set(s_trace, _stp_map_new_ii (MAXMAPENTRIES, 0)); if (global(s_trace) == NULL) rc = -ENOMEM;
- if (rc) {
- _stp_error ("global variable 'trace' allocation failed");
- goto out;
- }
- global_lock_init(s_trace);
- #ifdef STP_TIMING
- atomic_set(global_skipped(s_trace), 0);
- #endif
- global_set(s__indent_counters, _stp_map_new_ii (MAXMAPENTRIES, 0)); if (global(s__indent_counters) == NULL) rc = -ENOMEM;
- if (rc) {
- _stp_error ("global variable '_indent_counters' allocation failed");
- goto out;
- }
- global_lock_init(s__indent_counters);
- #ifdef STP_TIMING
- atomic_set(global_skipped(s__indent_counters), 0);
- #endif
- global_set(s__indent_timestamps, _stp_map_new_ii (MAXMAPENTRIES, 0)); if (global(s__indent_timestamps) == NULL) rc = -ENOMEM;
- if (rc) {
- _stp_error ("global variable '_indent_timestamps' allocation failed");
- goto out;
- }
- global_lock_init(s__indent_timestamps);
- #ifdef STP_TIMING
- atomic_set(global_skipped(s__indent_timestamps), 0);
- #endif
- _stp_print_kernel_info("2.2.1/0.155", (num_online_cpus() * sizeof(struct context)), 80);
- for (i=0; i<80; i++) {
- struct stap_dwarf_probe *sdp = & stap_dwarf_probes[i];
- struct stap_dwarf_kprobe *kp = & stap_dwarf_kprobes[i];
- unsigned long relocated_addr = _stp_kmodule_relocate (sdp->module, sdp->section, sdp->address);
- if (relocated_addr == 0) continue;
- probe_point = sdp->probe->pp;
- if (sdp->return_p) {
- kp->u.krp.kp.addr = (void *) relocated_addr;
- if (sdp->maxactive_p) {
- kp->u.krp.maxactive = sdp->maxactive_val;
- } else {
- kp->u.krp.maxactive = KRETACTIVE;
- }
- kp->u.krp.handler = &enter_kretprobe_probe;
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25)
- if (sdp->entry_probe) {
- kp->u.krp.entry_handler = &enter_kretprobe_entry_probe;
- kp->u.krp.data_size = sdp->saved_longs * sizeof(int64_t) +
- sdp->saved_strings * MAXSTRINGLEN;
- }
- #endif
- #ifdef __ia64__
- kp->dummy.addr = kp->u.krp.kp.addr;
- kp->dummy.pre_handler = NULL;
- rc = register_kprobe (& kp->dummy);
- if (rc == 0) {
- rc = register_kretprobe (& kp->u.krp);
- if (rc != 0)
- unregister_kprobe (& kp->dummy);
- }
- #else
- rc = register_kretprobe (& kp->u.krp);
- #endif
- } else {
- kp->u.kp.addr = (void *) relocated_addr;
- kp->u.kp.pre_handler = &enter_kprobe_probe;
- #ifdef __ia64__
- kp->dummy.addr = kp->u.kp.addr;
- kp->dummy.pre_handler = NULL;
- rc = register_kprobe (& kp->dummy);
- if (rc == 0) {
- rc = register_kprobe (& kp->u.kp);
- if (rc != 0)
- unregister_kprobe (& kp->dummy);
- }
- #else
- rc = register_kprobe (& kp->u.kp);
- #endif
- }
- if (rc) {
- sdp->registered_p = 0;
- if (!sdp->optional_p)
- _stp_warn ("probe %s (address 0x%lx) registration error (rc %d)", probe_point, (unsigned long) relocated_addr, rc);
- rc = 0;
- }
- else sdp->registered_p = 1;
- }
- if (rc) {
- if (probe_point)
- _stp_error ("probe %s registration error (rc %d)", probe_point, rc);
- atomic_set (session_state(), STAP_SESSION_ERROR);
- goto out;
- }
- /* ---- vma tracker ---- */
- rc = _stp_vma_init();
- /* ---- task finder ---- */
- if (rc == 0) {
- rc = stap_start_task_finder();
- if (rc) {
- stap_stop_task_finder();
- }
- }
- if (rc) {
- if (probe_point)
- _stp_error ("probe %s registration error (rc %d)", probe_point, rc);
- atomic_set (session_state(), STAP_SESSION_ERROR);
- #if defined(STAPCONF_UNREGISTER_KPROBES)
- j = 0;
- for (i=0; i<80; i++) {
- struct stap_dwarf_probe *sdp = & stap_dwarf_probes[i];
- struct stap_dwarf_kprobe *kp = & stap_dwarf_kprobes[i];
- if (! sdp->registered_p) continue;
- if (!sdp->return_p)
- stap_unreg_kprobes[j++] = &kp->u.kp;
- }
- unregister_kprobes((struct kprobe **)stap_unreg_kprobes, j);
- j = 0;
- for (i=0; i<80; i++) {
- struct stap_dwarf_probe *sdp = & stap_dwarf_probes[i];
- struct stap_dwarf_kprobe *kp = & stap_dwarf_kprobes[i];
- if (! sdp->registered_p) continue;
- if (sdp->return_p)
- stap_unreg_kprobes[j++] = &kp->u.krp;
- }
- unregister_kretprobes((struct kretprobe **)stap_unreg_kprobes, j);
- #ifdef __ia64__
- j = 0;
- for (i=0; i<80; i++) {
- struct stap_dwarf_probe *sdp = & stap_dwarf_probes[i];
- struct stap_dwarf_kprobe *kp = & stap_dwarf_kprobes[i];
- if (! sdp->registered_p) continue;
- stap_unreg_kprobes[j++] = &kp->dummy;
- }
- unregister_kprobes((struct kprobe **)stap_unreg_kprobes, j);
- #endif
- #endif
- for (i=0; i<80; i++) {
- struct stap_dwarf_probe *sdp = & stap_dwarf_probes[i];
- struct stap_dwarf_kprobe *kp = & stap_dwarf_kprobes[i];
- if (! sdp->registered_p) continue;
- if (sdp->return_p) {
- #if !defined(STAPCONF_UNREGISTER_KPROBES)
- unregister_kretprobe (&kp->u.krp);
- #endif
- atomic_add (kp->u.krp.nmissed, skipped_count());
- #ifdef STP_TIMING
- if (kp->u.krp.nmissed)
- _stp_warn ("Skipped due to missed kretprobe/1 on '%s': %d\n", sdp->probe->pp, kp->u.krp.nmissed);
- #endif
- atomic_add (kp->u.krp.kp.nmissed, skipped_count());
- #ifdef STP_TIMING
- if (kp->u.krp.kp.nmissed)
- _stp_warn ("Skipped due to missed kretprobe/2 on '%s': %lu\n", sdp->probe->pp, kp->u.krp.kp.nmissed);
- #endif
- } else {
- #if !defined(STAPCONF_UNREGISTER_KPROBES)
- unregister_kprobe (&kp->u.kp);
- #endif
- atomic_add (kp->u.kp.nmissed, skipped_count());
- #ifdef STP_TIMING
- if (kp->u.kp.nmissed)
- _stp_warn ("Skipped due to missed kprobe on '%s': %lu\n", sdp->probe->pp, kp->u.kp.nmissed);
- #endif
- }
- #if !defined(STAPCONF_UNREGISTER_KPROBES) && defined(__ia64__)
- unregister_kprobe (&kp->dummy);
- #endif
- sdp->registered_p = 0;
- }
- goto out;
- }
- if (atomic_read (session_state()) == STAP_SESSION_STARTING)
- atomic_set (session_state(), STAP_SESSION_RUNNING);
- /* ---- task finder ---- */
- stap_task_finder_post_init();
- return 0;
- out:
- _stp_map_del (global(s_trace));
- _stp_map_del (global(s__indent_counters));
- _stp_map_del (global(s__indent_timestamps));
- atomic_set (session_state(), STAP_SESSION_STOPPED);
- #ifdef STAPCONF_SYNCHRONIZE_SCHED
- synchronize_sched();
- #endif
- #ifdef STAP_NEED_GETTIMEOFDAY
- _stp_kill_time();
- #endif
- _stp_runtime_contexts_free();
- return rc;
- }
- static void systemtap_module_refresh (void) {
- int i=0, j=0;
- (void) i;
- (void) j;
- for (i=0; i<80; i++) {
- struct stap_dwarf_probe *sdp = & stap_dwarf_probes[i];
- struct stap_dwarf_kprobe *kp = & stap_dwarf_kprobes[i];
- unsigned long relocated_addr = _stp_kmodule_relocate (sdp->module, sdp->section, sdp->address);
- int rc;
- if (sdp->registered_p == 0 && relocated_addr != 0) {
- if (sdp->return_p) {
- kp->u.krp.kp.addr = (void *) relocated_addr;
- if (sdp->maxactive_p) {
- kp->u.krp.maxactive = sdp->maxactive_val;
- } else {
- kp->u.krp.maxactive = KRETACTIVE;
- }
- kp->u.krp.handler = &enter_kretprobe_probe;
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25)
- if (sdp->entry_probe) {
- kp->u.krp.entry_handler = &enter_kretprobe_entry_probe;
- kp->u.krp.data_size = sdp->saved_longs * sizeof(int64_t) +
- sdp->saved_strings * MAXSTRINGLEN;
- }
- #endif
- #ifdef __ia64__
- kp->dummy.addr = kp->u.krp.kp.addr;
- kp->dummy.pre_handler = NULL;
- rc = register_kprobe (& kp->dummy);
- if (rc == 0) {
- rc = register_kretprobe (& kp->u.krp);
- if (rc != 0)
- unregister_kprobe (& kp->dummy);
- }
- #else
- rc = register_kretprobe (& kp->u.krp);
- #endif
- } else {
- kp->u.kp.addr = (void *) relocated_addr;
- kp->u.kp.pre_handler = &enter_kprobe_probe;
- #ifdef __ia64__
- kp->dummy.addr = kp->u.kp.addr;
- kp->dummy.pre_handler = NULL;
- rc = register_kprobe (& kp->dummy);
- if (rc == 0) {
- rc = register_kprobe (& kp->u.kp);
- if (rc != 0)
- unregister_kprobe (& kp->dummy);
- }
- #else
- rc = register_kprobe (& kp->u.kp);
- #endif
- }
- if (rc == 0) sdp->registered_p = 1;
- } else if (sdp->registered_p == 1 && relocated_addr == 0) {
- if (sdp->return_p) {
- unregister_kretprobe (&kp->u.krp);
- atomic_add (kp->u.krp.nmissed, skipped_count());
- #ifdef STP_TIMING
- if (kp->u.krp.nmissed)
- _stp_warn ("Skipped due to missed kretprobe/1 on '%s': %d\n", sdp->probe->pp, kp->u.krp.nmissed);
- #endif
- atomic_add (kp->u.krp.kp.nmissed, skipped_count());
- #ifdef STP_TIMING
- if (kp->u.krp.kp.nmissed)
- _stp_warn ("Skipped due to missed kretprobe/2 on '%s': %lu\n", sdp->probe->pp, kp->u.krp.kp.nmissed);
- #endif
- } else {
- unregister_kprobe (&kp->u.kp);
- atomic_add (kp->u.kp.nmissed, skipped_count());
- #ifdef STP_TIMING
- if (kp->u.kp.nmissed)
- _stp_warn ("Skipped due to missed kprobe on '%s': %lu\n", sdp->probe->pp, kp->u.kp.nmissed);
- #endif
- }
- #if defined(__ia64__)
- unregister_kprobe (&kp->dummy);
- #endif
- sdp->registered_p = 0;
- }
- }
- }
- static void systemtap_module_exit (void) {
- int i=0, j=0;
- (void) i;
- (void) j;
- if (atomic_read (session_state()) == STAP_SESSION_STARTING)
- return;
- if (atomic_read (session_state()) == STAP_SESSION_RUNNING)
- atomic_set (session_state(), STAP_SESSION_STOPPING);
- /* ---- task finder ---- */
- stap_stop_task_finder();
- /* ---- vma tracker ---- */
- _stp_vma_done();
- #if defined(STAPCONF_UNREGISTER_KPROBES)
- j = 0;
- for (i=0; i<80; i++) {
- struct stap_dwarf_probe *sdp = & stap_dwarf_probes[i];
- struct stap_dwarf_kprobe *kp = & stap_dwarf_kprobes[i];
- if (! sdp->registered_p) continue;
- if (!sdp->return_p)
- stap_unreg_kprobes[j++] = &kp->u.kp;
- }
- unregister_kprobes((struct kprobe **)stap_unreg_kprobes, j);
- j = 0;
- for (i=0; i<80; i++) {
- struct stap_dwarf_probe *sdp = & stap_dwarf_probes[i];
- struct stap_dwarf_kprobe *kp = & stap_dwarf_kprobes[i];
- if (! sdp->registered_p) continue;
- if (sdp->return_p)
- stap_unreg_kprobes[j++] = &kp->u.krp;
- }
- unregister_kretprobes((struct kretprobe **)stap_unreg_kprobes, j);
- #ifdef __ia64__
- j = 0;
- for (i=0; i<80; i++) {
- struct stap_dwarf_probe *sdp = & stap_dwarf_probes[i];
- struct stap_dwarf_kprobe *kp = & stap_dwarf_kprobes[i];
- if (! sdp->registered_p) continue;
- stap_unreg_kprobes[j++] = &kp->dummy;
- }
- unregister_kprobes((struct kprobe **)stap_unreg_kprobes, j);
- #endif
- #endif
- for (i=0; i<80; i++) {
- struct stap_dwarf_probe *sdp = & stap_dwarf_probes[i];
- struct stap_dwarf_kprobe *kp = & stap_dwarf_kprobes[i];
- if (! sdp->registered_p) continue;
- if (sdp->return_p) {
- #if !defined(STAPCONF_UNREGISTER_KPROBES)
- unregister_kretprobe (&kp->u.krp);
- #endif
- atomic_add (kp->u.krp.nmissed, skipped_count());
- #ifdef STP_TIMING
- if (kp->u.krp.nmissed)
- _stp_warn ("Skipped due to missed kretprobe/1 on '%s': %d\n", sdp->probe->pp, kp->u.krp.nmissed);
- #endif
- atomic_add (kp->u.krp.kp.nmissed, skipped_count());
- #ifdef STP_TIMING
- if (kp->u.krp.kp.nmissed)
- _stp_warn ("Skipped due to missed kretprobe/2 on '%s': %lu\n", sdp->probe->pp, kp->u.krp.kp.nmissed);
- #endif
- } else {
- #if !defined(STAPCONF_UNREGISTER_KPROBES)
- unregister_kprobe (&kp->u.kp);
- #endif
- atomic_add (kp->u.kp.nmissed, skipped_count());
- #ifdef STP_TIMING
- if (kp->u.kp.nmissed)
- _stp_warn ("Skipped due to missed kprobe on '%s': %lu\n", sdp->probe->pp, kp->u.kp.nmissed);
- #endif
- }
- #if !defined(STAPCONF_UNREGISTER_KPROBES) && defined(__ia64__)
- unregister_kprobe (&kp->dummy);
- #endif
- sdp->registered_p = 0;
- }
- #ifdef STAPCONF_SYNCHRONIZE_SCHED
- synchronize_sched();
- #endif
- _stp_runtime_context_wait();
- atomic_set (session_state(), STAP_SESSION_STOPPED);
- #ifdef STAPCONF_SYNCHRONIZE_SCHED
- synchronize_sched();
- #endif
- _stp_map_del (global(s_trace));
- _stp_map_del (global(s__indent_counters));
- _stp_map_del (global(s__indent_timestamps));
- _stp_runtime_contexts_free();
- #ifdef STAP_NEED_GETTIMEOFDAY
- _stp_kill_time();
- #endif
- preempt_disable();
- #if defined(STP_TIMING) || defined(STP_ALIBI)
- _stp_printf("----- probe hit report: \n");
- for (i = 0; i < ARRAY_SIZE(stap_probes); ++i) {
- const struct stap_probe *const p = &stap_probes[i];
- #ifdef STP_ALIBI
- int alibi = atomic_read(probe_alibi(i));
- if (alibi)
- _stp_printf ("%s, (%s), hits: %d,%s, index: %d\n",
- p->pp, p->location, alibi, p->derivation, i);
- #endif
- #ifdef STP_TIMING
- if (likely (probe_timing(i))) {
- struct stat_data *stats = _stp_stat_get (probe_timing(i), 0);
- if (stats->count) {
- int64_t avg = _stp_div64 (NULL, stats->sum, stats->count);
- _stp_printf ("%s, (%s), hits: %lld, cycles: %lldmin/%lldavg/%lldmax,%s, index: %d\n",
- p->pp, p->location, (long long) stats->count,
- (long long) stats->min, (long long) avg, (long long) stats->max,
- p->derivation, i);
- }
- _stp_stat_del (probe_timing(i));
- }
- #endif
- }
- _stp_print_flush();
- #endif
- if (atomic_read (skipped_count()) || atomic_read (error_count()) || atomic_read (skipped_count_reentrant())) {
- _stp_warn ("Number of errors: %d, skipped probes: %d\n", (int) atomic_read (error_count()), (int) atomic_read (skipped_count()));
- #ifdef STP_TIMING
- {
- int ctr;
- ctr = atomic_read (global_skipped(s_trace));
- if (ctr) _stp_warn ("Skipped due to global '%s' lock timeout: %d\n", "trace", ctr);
- ctr = atomic_read (global_skipped(s__indent_counters));
- if (ctr) _stp_warn ("Skipped due to global '%s' lock timeout: %d\n", "_indent_counters", ctr);
- ctr = atomic_read (global_skipped(s__indent_timestamps));
- if (ctr) _stp_warn ("Skipped due to global '%s' lock timeout: %d\n", "_indent_timestamps", ctr);
- ctr = atomic_read (skipped_count_lowstack());
- if (ctr) _stp_warn ("Skipped due to low stack: %d\n", ctr);
- ctr = atomic_read (skipped_count_reentrant());
- if (ctr) _stp_warn ("Skipped due to reentrancy: %d\n", ctr);
- ctr = atomic_read (skipped_count_uprobe_reg());
- if (ctr) _stp_warn ("Skipped due to uprobe register failure: %d\n", ctr);
- ctr = atomic_read (skipped_count_uprobe_unreg());
- if (ctr) _stp_warn ("Skipped due to uprobe unregister failure: %d\n", ctr);
- }
- #endif
- _stp_print_flush();
- }
- preempt_enable_no_resched();
- }
- static int systemtap_kernel_module_init (void) {
- int rc = 0;
- int i=0, j=0;
- if (rc) {
- goto out;
- }
- if (rc) {
- goto out;
- }
- out:
- return rc;
- }
- static void systemtap_kernel_module_exit (void) {
- int i=0, j=0;
- }
- #include "stap-symbols.h"
- MODULE_DESCRIPTION("systemtap-generated probe");
- MODULE_LICENSE("GPL");
- MODULE_INFO(intree,"Y");
- #undef trace
- #undef _indent_counters
- #undef _indent_timestamps
- root@linaro-developer:~/systemtap-2.2.1/testsuite#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement