systemtap:wcohen/stack_sizes

Last commit made on 2023-02-15
Get this branch:
git clone -b wcohen/stack_sizes https://git.launchpad.net/systemtap

Branch merges

Branch information

Name:
wcohen/stack_sizes
Repository:
lp:systemtap

Recent commits

aa78445... by William Cohen

WIP: Add support for handling qemu coroutines and stack switching.

This probes the places that the stacks are created and the coroutines
switch via setjmp/longjmp. However, it doesn't provide the correct stack
sizes.

540467d... by William Cohen

Add the stack_sizes.stp example.

2db26e5... by Martin Cermak <email address hidden>

dtrace.exp: prevent filesystem access problem with as_non_root()

85706e9... by Martin Cermak <email address hidden>

runtime/stack.c: Fix print_backtrace()

Before this update, print_backtrace() was producing duplicate lines
at the end of the trace:

$ cat /root/systemtap/testsuite/systemtap.base/backtrace.stp
probe begin, end, procfs("foo").read, procfs("foo").write { log(pp()) print_backtrace() }
probe timer.ms(100) { log(pp()) print_backtrace() exit() }
$ stap /root/systemtap/testsuite/systemtap.base/backtrace.stp -d kernel -w
begin
 0xffffffffc1091368 [stap_7a1114b3de11b6b97c907eafd2782_1404790+0xb368/0x0]
 0xffffffffc109156a [stap_7a1114b3de11b6b97c907eafd2782_1404790+0xb56a/0x0]
 0xffffffffc1091d2b [stap_7a1114b3de11b6b97c907eafd2782_1404790+0xbd2b/0x0]
 0xffffffffc108a333 [stap_7a1114b3de11b6b97c907eafd2782_1404790+0x4333/0x0]
 0xffffffffc1092fc6 [stap_7a1114b3de11b6b97c907eafd2782_1404790+0xcfc6/0x0]
 0xffffffffc108ce22 [stap_7a1114b3de11b6b97c907eafd2782_1404790+0x6e22/0x0]
 0xffffffffb8e545b2 : proc_reg_write+0x52/0xa0 [kernel]
 0xffffffffb8dc6202 : vfs_write+0xb2/0x280 [kernel]
 0xffffffffb8dc66bf : ksys_write+0x5f/0xe0 [kernel]
 0xffffffffb9520159 : do_syscall_64+0x59/0x90 [kernel]
 0xffffffffb960009b : entry_SYSCALL_64_after_hwframe+0x63/0xcd [kernel]
 0xffffffffb960009b : entry_SYSCALL_64_after_hwframe+0x63/0xcd [kernel] (inexact)
[ ... stuff deleted ... ]

See the very last line of the above trace, which is duplicit. This problem
was detected by the backtrace.exp testcase. This update prevents calling the
fallback _stp_stack_print_fallback() in case _stp_print_addr() was already able
to successfully provide some output based on dwarf unwinding.

b025954... by Martin Cermak <email address hidden>

dtrace.exp: clean up junk output from previous runs

2fc0377... by Martin Cermak <email address hidden>

dw_entry_value.exp: fix the testcase

After fixing 05eb6742c1 (Handle DWARF5 DW_OP_implicit_pointer and
DW_OP_entry_value), dw_entry_value.exp no more ends up untested,
but instead often fails in Pass 5.

The problem was that stap_run() sends kill -INT to stap right after
the load generation function (no_load() in this case) is executed,
causing a Pass 5 failure and => testcase failure (unexpected output).

A workaround would be to sleep a second before the signal is sent so
that stap can cleanly finish, and the signal can't be delivered, making
the testcase green. But that'd be just a workaround.

This update relies on stap_run2() instead of stap_run(), simplifying
the testcase and making it stable.

587ece9... by William Cohen

Generate the 32-bit RISCV syscall name<->number mappings.

ad2df81... by William Cohen

Generate event syscall name<->number mappings for 32-bit RISCV

There can be a lot of compiler complaints on 64-bit RISCV when
compiling systemtap scripts using syscall_any tapsets about the
missing 32-bit syscall name<->number mappings. The strace code does
not have special tables for 32-bit RISCV. However, the numbers look
to be virtually the same for both 64-bit and 32-bit RISCV. For the
time being just generating a 32-bit version of the table from the
64-bit strace tables.

82377e0... by William Cohen

Update syscall mapping information for syscall_any tapset

There are a couple new syscalls available, futex_waitv and
set_mempolicy_home_node. Regenerated the num2name and name2num
associative arrays to include those new syscalls for syscall_any
tapset.

df41f00... by Frank Ch. Eigler

testsuite/lib/stap_compile.exp: standardize $test messages

Correct a misuse of dejagnu pass/fail descriptive text. Pass/fail
status is sufficiently communicated by the proc, and should not be
repeated in the text parameter.