| /tools/testing/selftests/bpf/progs/ |
| D | test_global_func_ctx_args.c | 11 static long stack[256]; variable 19 return bpf_get_stack(ctx, &stack, sizeof(stack), 0); in kprobe_typedef_ctx_subprog() 50 return bpf_get_stack((void *)ctx, &stack, sizeof(stack), 0); in kprobe_struct_ctx_subprog() 67 return bpf_get_stack(ctx, &stack, sizeof(stack), 0); in kprobe_workaround_ctx_subprog() 83 return bpf_get_stack(ctx, &stack, sizeof(stack), 0); in raw_tp_ctx_subprog() 99 return bpf_get_stack(ctx, &stack, sizeof(stack), 0); in raw_tp_writable_ctx_subprog() 115 return bpf_get_stack(ctx, &stack, sizeof(stack), 0); in perf_event_ctx_subprog() 130 return bpf_get_stack(ctx, stack, sizeof(stack), 0); in subprog_ctx_tag() 142 return bpf_get_stack(ctx1, stack, sizeof(stack), 0) + in subprog_multi_ctx_tags() 144 bpf_get_stack(ctx2, stack, sizeof(stack), 0); in subprog_multi_ctx_tags()
|
| D | test_get_stack_rawtp_err.c | 11 __u64 stack[MAX_STACK_RAWTP]; in bpf_prog2() local 15 error = bpf_get_stack(ctx, stack, 0, -1); in bpf_prog2()
|
| /tools/testing/selftests/bpf/prog_tests/ |
| D | build_id.c | 10 static void print_stack(struct bpf_stack_build_id *stack, int frame_cnt) in print_stack() argument 16 switch (stack[i].status) { in print_stack() 23 printf("%02hhx", (unsigned)stack[i].build_id[j]); in print_stack() 24 printf(" OFFSET = %llx", (unsigned long long)stack[i].offset); in print_stack() 27 printf("IP = %llx", (unsigned long long)stack[i].ip); in print_stack() 30 printf("UNEXPECTED STATUS %d ", stack[i].status); in print_stack() 40 struct bpf_stack_build_id *stack; in subtest_nofault() local 59 stack = skel->bss->stack_nofault; in subtest_nofault() 62 print_stack(stack, frame_cnt); in subtest_nofault() 65 ASSERT_EQ(stack[0].status, BPF_STACK_BUILD_ID_VALID, "build_id_status"); in subtest_nofault() [all …]
|
| /tools/testing/selftests/vDSO/ |
| D | vdso_standalone_test_x86.c | 87 void c_main(void **stack) in c_main() argument 90 long argc = (long)*stack; in c_main() 91 stack += argc + 2; in c_main() 94 while(*stack) in c_main() 95 stack++; in c_main() 96 stack++; in c_main() 99 vdso_init_from_auxv((void *)stack); in c_main()
|
| /tools/perf/scripts/python/ |
| D | stackcollapse.py | 97 stack = list() 103 stack.append(tidy_function_name(entry['sym']['name'], 108 stack.append(tidy_function_name(param_dict['symbol'], 119 stack.append(comm) 121 stack_string = ';'.join(reversed(stack)) 126 for stack in list: 127 print("%s %d" % (stack, lines[stack]))
|
| D | gecko.py | 177 def _add_sample(self, comm: str, stack: List[str], time_ms: Milliseconds) -> None: 190 (self._intern_frame(frame), prefix_id), stack, None) 275 stack = [] 280 stack.append(f'{call["sym"]["name"]} (in {call["dso"]})') 281 if len(stack) != 0: 283 stack = stack[::-1] 290 stack.append(f'{func} (in {dso})') 297 thread._add_sample(comm=comm, stack=stack, time_ms=time_stamp)
|
| /tools/testing/selftests/proc/ |
| D | thread-self.c | 51 void *stack; in main() local 56 stack = mmap(NULL, 2 * PAGE_SIZE, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0); in main() 57 assert(stack != MAP_FAILED); in main() 59 pid = clone(f, stack + PAGE_SIZE, CLONE_THREAD|CLONE_SIGHAND|CLONE_VM, (void *)1); in main()
|
| /tools/testing/selftests/mm/ |
| D | pkey_sighandler_tests.c | 134 stack_t *stack = ptr; in thread_segv_maperr_ptr() local 142 syscall_raw(SYS_sigaltstack, (long)stack, 0, 0, 0, 0, 0); in thread_segv_maperr_ptr() 239 void *stack; in test_sigsegv_handler_with_different_pkey_for_stack() local 254 stack = mmap(0, STACK_SIZE, PROT_READ | PROT_WRITE, in test_sigsegv_handler_with_different_pkey_for_stack() 257 assert(stack != MAP_FAILED); in test_sigsegv_handler_with_different_pkey_for_stack() 264 pkey_mprotect(stack, STACK_SIZE, PROT_READ | PROT_WRITE, pkey); in test_sigsegv_handler_with_different_pkey_for_stack() 280 (long) ((char *)(stack) + STACK_SIZE), in test_sigsegv_handler_with_different_pkey_for_stack() 349 stack_t *stack = ptr; in thread_sigusr2_self() local 356 syscall(SYS_sigaltstack, (long)stack, 0, 0, 0, 0, 0); in thread_sigusr2_self() 383 void *stack; in test_pkru_sigreturn() local [all …]
|
| /tools/perf/util/ |
| D | arm64-frame-pointer-unwind-support.c | 13 u64 stack[2]; member 27 entries->stack[entries->length++] = entry->ip; in add_entry() 62 return callchain_param.order == ORDER_CALLER ? entries.stack[0] : entries.stack[1]; in get_leaf_frame_caller_aarch64()
|
| D | annotate-data.c | 181 struct type_state_stack *stack, *tmp; in exit_type_state() local 183 list_for_each_entry_safe(stack, tmp, &state->stack_vars, list) { in exit_type_state() 184 list_del(&stack->list); in exit_type_state() 185 free(stack); in exit_type_state() 528 struct type_state_stack *stack; in find_stack_state() local 530 list_for_each_entry(stack, &state->stack_vars, list) { in find_stack_state() 531 if (offset == stack->offset) in find_stack_state() 532 return stack; in find_stack_state() 534 if (stack->compound && stack->offset < offset && in find_stack_state() 535 offset < stack->offset + stack->size) in find_stack_state() [all …]
|
| D | thread-stack.c | 89 struct thread_stack_entry *stack; member 126 new_stack = realloc(ts->stack, sz); in thread_stack__grow() 130 ts->stack = new_stack; in thread_stack__grow() 201 if (!ts->stack && in thread_stack__new() 220 if (!ts->stack) in thread__cpu_stack() 251 ts->stack[ts->cnt].trace_end = trace_end; in thread_stack__push() 252 ts->stack[ts->cnt++].ret_addr = ret_addr; in thread_stack__push() 271 if (ts->stack[--i].ret_addr == ret_addr) { in thread_stack__pop() 283 if (ts->stack[--i].trace_end) in thread_stack__pop_trace_end() 295 return ts->stack[ts->cnt - 1].cp->in_kernel; in thread_stack__in_kernel() [all …]
|
| /tools/perf/arch/powerpc/tests/ |
| D | dwarf-unwind.c | 16 struct stack_dump *stack = &sample->user_stack; in sample_ustack() local 40 stack->data = (char *) buf; in sample_ustack() 41 stack->size = stack_size; in sample_ustack()
|
| /tools/perf/arch/arm/tests/ |
| D | dwarf-unwind.c | 16 struct stack_dump *stack = &sample->user_stack; in sample_ustack() local 40 stack->data = (char *) buf; in sample_ustack() 41 stack->size = stack_size; in sample_ustack()
|
| /tools/perf/arch/arm64/tests/ |
| D | dwarf-unwind.c | 16 struct stack_dump *stack = &sample->user_stack; in sample_ustack() local 40 stack->data = (char *) buf; in sample_ustack() 41 stack->size = stack_size; in sample_ustack()
|
| /tools/perf/arch/x86/tests/ |
| D | dwarf-unwind.c | 16 struct stack_dump *stack = &sample->user_stack; in sample_ustack() local 48 stack->data = (char *) buf; in sample_ustack() 49 stack->size = stack_size; in sample_ustack()
|
| /tools/testing/selftests/kvm/lib/ |
| D | assert.c | 28 void *stack[n]; in test_dump_stack() local 38 n = backtrace(stack, n); in test_dump_stack() 52 c += sprintf(c, " %lx", ((unsigned long) stack[i]) - 1); in test_dump_stack()
|
| /tools/testing/selftests/pidfd/ |
| D | pidfd_fdinfo_test.c | 87 char *stack; member 101 ret.stack = mmap(NULL, CHILD_STACK_SIZE, PROT_READ | PROT_WRITE, in clone_newns() 103 if (ret.stack == MAP_FAILED) { in clone_newns() 109 ret.pid = __clone2(fn, ret.stack, CHILD_STACK_SIZE, flags, args, &ret.fd); in clone_newns() 111 ret.pid = clone(fn, ret.stack + CHILD_STACK_SIZE, flags, args, &ret.fd); in clone_newns() 141 if (munmap(child->stack, CHILD_STACK_SIZE)) { in child_join()
|
| /tools/testing/selftests/x86/ |
| D | syscall_arg_fault.c | 102 stack_t stack = { in main() local 107 if (sigaltstack(&stack, NULL) != 0) in main() 233 free(stack.ss_sp); in main()
|
| D | single_step_syscall.c | 211 stack_t stack = { in main() local 215 if (sigaltstack(&stack, NULL) != 0) in main() 221 free(stack.ss_sp); in main()
|
| /tools/objtool/Documentation/ |
| D | objtool.txt | 19 stack traces are reliable for live patching 98 Objtool's stack validation feature analyzes every .o file and ensures 99 the validity of its stack metadata. It enforces a set of rules on asm 100 code and C inline assembly code so that stack traces can be reliable. 111 Here are some of the benefits of validating stack metadata: 113 a) More reliable stack traces for frame pointer enabled kernels 116 code and debug tools to be able to walk the stack to determine the 131 For stack traces based on frame pointers to be reliable, all 132 functions which call other functions must first create a stack frame 134 create a stack frame before calling a second function, the *caller* [all …]
|
| /tools/testing/selftests/move_mount_set_group/ |
| D | move_mount_set_group_test.c | 270 void *stack; in do_clone() local 272 stack = malloc(__STACK_SIZE); in do_clone() 273 if (!stack) in do_clone() 277 return __clone2(fn, stack, __STACK_SIZE, flags | SIGCHLD, arg, NULL); in do_clone() 279 return clone(fn, stack + __STACK_SIZE, flags | SIGCHLD, arg, NULL); in do_clone()
|
| /tools/testing/selftests/memfd/ |
| D | fuse_test.c | 202 uint8_t *stack; in spawn_sealing_thread() local 205 stack = malloc(STACK_SIZE); in spawn_sealing_thread() 206 if (!stack) { in spawn_sealing_thread() 212 stack + STACK_SIZE, in spawn_sealing_thread()
|
| /tools/perf/arch/x86/annotate/ |
| D | instructions.c | 413 struct type_state_stack *stack; in update_insn_state_x86() local 416 stack = find_stack_state(state, offset); in update_insn_state_x86() 417 if (stack == NULL) { in update_insn_state_x86() 420 } else if (!stack->compound) { in update_insn_state_x86() 421 tsr->type = stack->type; in update_insn_state_x86() 422 tsr->kind = stack->kind; in update_insn_state_x86() 424 } else if (die_get_member_type(&stack->type, in update_insn_state_x86() 425 offset - stack->offset, in update_insn_state_x86() 564 struct type_state_stack *stack; in update_insn_state_x86() local 569 stack = find_stack_state(state, offset); in update_insn_state_x86() [all …]
|
| /tools/testing/selftests/sgx/ |
| D | test_encl_bootstrap.S | 46 # then add the address of encl_stack to get the address for the stack. 54 # its stack directly. 71 # Restore the caller stack.
|
| /tools/testing/selftests/lkdtm/ |
| D | .gitignore | 3 !stack-entropy.sh
|