]> sourceware.org Git - systemtap.git/log
systemtap.git
22 months agoTestsuite/labels.exp: PR29837 partial fix
Martin Cermak [Tue, 29 Nov 2022 20:28:25 +0000 (21:28 +0100)]
Testsuite/labels.exp: PR29837 partial fix

22 months agoHandle DWARF5 DW_OP_implicit_pointer and DW_OP_entry_value
Mark Wielaard [Tue, 29 Nov 2022 17:50:58 +0000 (18:50 +0100)]
Handle DWARF5 DW_OP_implicit_pointer and DW_OP_entry_value

These are the same as the GNU extensions for older DWARF,
DW_OP_GNU_implicit_pointer and DW_GNU_entry_value.

22 months agoscripts/update-htmldocs: rework for git htmldocs repo
Serhei Makarov [Fri, 25 Nov 2022 18:35:02 +0000 (13:35 -0500)]
scripts/update-htmldocs: rework for git htmldocs repo

The 'git push' step is done by the user
separately from the update-htmldocs script,
allowing the changes to be reviewed before upload.

23 months agopr29801 removes dup synthetic probe group joins
Ryan Goldberg [Fri, 18 Nov 2022 15:04:55 +0000 (10:04 -0500)]
pr29801 removes dup synthetic probe group joins

Synthetic probes created -before- semantic_pass_optimize1
were joining the groups twice

23 months agoscripts/update-htmldocs: fixups for practicality
Serhei Makarov [Wed, 16 Nov 2022 15:26:41 +0000 (10:26 -0500)]
scripts/update-htmldocs: fixups for practicality

- script should check out latest release tag,
  in case website update is being done after version bumps
- set CVS_RSH=ssh as it can work no other way

23 months agoautoconf version bumps for next release 4.9
Serhei Makarov [Thu, 10 Nov 2022 15:57:29 +0000 (10:57 -0500)]
autoconf version bumps for next release 4.9

23 months agoversion bumps for next release 4.9
Serhei Makarov [Thu, 10 Nov 2022 15:56:22 +0000 (10:56 -0500)]
version bumps for next release 4.9

23 months agoEnsure that SystemTap runtime uses smp_processor_id() in proper context
William Cohen [Fri, 4 Nov 2022 15:12:05 +0000 (11:12 -0400)]
Ensure that SystemTap runtime uses smp_processor_id() in proper context

There were cases on Fedora 36 and Rawhide running kernels with
CONFIG_DEBUG_PREEMPT=y where systemtap scripts would trigger kernel
log messages like the following:

[  257.544406] check_preemption_disabled: 4 callbacks suppressed
[  257.544409] BUG: using smp_processor_id() in preemptible [00000000] code: staprun/2106
[  257.544465] caller is _stp_runtime_context_trylock+0x12/0x70 [stap_e36600406768aeefd49daf9fc7a3d23c_2106]
[  257.544507] CPU: 0 PID: 2106 Comm: staprun Tainted: G           OE     -------  ---  6.1.0-0.rc2.20221028git23758867219c.24.fc38.x86_64 #1
[  257.544544] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.0-1.fc36 04/01/2014
[  257.544571] Call Trace:
[  257.544583]  <TASK>
[  257.544593]  dump_stack_lvl+0x5b/0x77
[  257.544620]  check_preemption_disabled+0xe1/0xf0
[  257.544641]  _stp_runtime_context_trylock+0x12/0x70 [stap_e36600406768aeefd49daf9fc7a3d23c_2106]
[  257.544673]  _stp_runtime_entryfn_get_context+0xb/0x70 [stap_e36600406768aeefd49daf9fc7a3d23c_2106]
[  257.544705]  _stp_ctl_send+0x76/0x1e0 [stap_e36600406768aeefd49daf9fc7a3d23c_2106]
[  257.544735]  _stp_transport_init+0x71a/0x860 [stap_e36600406768aeefd49daf9fc7a3d23c_2106]
[  257.544771]  ? kallsyms_on_each_symbol+0x30/0x30 [stap_e36600406768aeefd49daf9fc7a3d23c_2106]
[  257.544803]  do_one_initcall+0x6b/0x320
[  257.544827]  do_init_module+0x4a/0x200
[  257.544844]  __do_sys_init_module+0x16a/0x1a0
[  257.544870]  do_syscall_64+0x58/0x80
[  257.544885]  ? up_read+0x17/0x20
[  257.544902]  ? lock_is_held_type+0xe8/0x140
[  257.544921]  ? asm_exc_page_fault+0x22/0x30
[  257.544939]  ? lockdep_hardirqs_on+0x7d/0x100
[  257.544956]  entry_SYSCALL_64_after_hwframe+0x63/0xcd
[  257.544975] RIP: 0033:0x7f3cde12f5de
[  257.544992] Code: 48 8b 0d 35 68 0c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 49 89 ca b8 af 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 02 68 0c 00 f7 d8 64 89 01 48
[  257.545010] RSP: 002b:00007ffc5170c418 EFLAGS: 00000246 ORIG_RAX: 00000000000000af
[  257.545010] RAX: ffffffffffffffda RBX: 0000563620bd4020 RCX: 00007f3cde12f5de
[  257.545010] RDX: 0000563620bd4020 RSI: 0000000000040ea0 RDI: 00007f3cde44a010
[  257.545010] RBP: 0000000000000003 R08: 0000000000000000 R09: 0000000000000000
[  257.545010] R10: 0000000000000053 R11: 0000000000000246 R12: 00007ffc5170c510
[  257.545010] R13: 00007f3cde44a010 R14: 00007ffc5170c440 R15: 00007f3cde4631e8
[  257.545010]  </TASK>

This issue was introduced by git commit 1641b6e7ea which added a fast
path check that used smp_processor_id() without first having a
preempt_disable().  The code now ensures that preemption is disabled
before using the smp_processor_id().

23 months agoSet PYTHONPATH from PY3EXECDIR.
Stan Cox [Fri, 4 Nov 2022 20:18:51 +0000 (16:18 -0400)]
Set PYTHONPATH from PY3EXECDIR.

Set PYTHONPATH from PY3EXECDIR instead of PYEXECDIR.

23 months agotestsuite/systemtap.examples: regen index release-4.8
Serhei Makarov [Thu, 3 Nov 2022 18:25:00 +0000 (14:25 -0400)]
testsuite/systemtap.examples: regen index

23 months agodoc/: regen pdfs
Serhei Makarov [Thu, 3 Nov 2022 18:22:46 +0000 (14:22 -0400)]
doc/: regen pdfs

23 months agodoc/SystemTap_Tapset_Reference/: bump copyyears
Serhei Makarov [Thu, 3 Nov 2022 18:21:04 +0000 (14:21 -0400)]
doc/SystemTap_Tapset_Reference/: bump copyyears

committed separately as a note-to-self to do this more regularly

23 months agodoc/SystemTap_Tapset_Reference: regen man pages + xml
Serhei Makarov [Thu, 3 Nov 2022 18:06:05 +0000 (14:06 -0400)]
doc/SystemTap_Tapset_Reference: regen man pages + xml

23 months agosystemtap.spec + NEWS: releasing 22-11-03
Serhei Makarov [Thu, 3 Nov 2022 17:23:33 +0000 (13:23 -0400)]
systemtap.spec + NEWS: releasing 22-11-03

23 months agoAUTHORS: refresh again
Serhei Makarov [Thu, 3 Nov 2022 17:02:01 +0000 (13:02 -0400)]
AUTHORS: refresh again

23 months agoRevert "runtime: stat: avoid allocating stat_data memory on offline CPUs"
Serhei Makarov [Thu, 3 Nov 2022 16:56:11 +0000 (12:56 -0400)]
Revert "runtime: stat: avoid allocating stat_data memory on offline CPUs"

This reverts commit ba42203ae957bb62805e18eac30459eb74cde3d2.
There are indications that on some non-x86 platforms (ppc64le)
this patch may be causing problems i.e.
'sleeping function called in invalid context' warnings.

Reverting for the release, may return this patch if I get a
clearer idea of the cause of the problem.

23 months agoRevert "Revert "Bug: runtime: we might not sync the tracepoint's SRCU state after...
Serhei Makarov [Thu, 3 Nov 2022 16:54:02 +0000 (12:54 -0400)]
Revert "Revert "Bug: runtime: we might not sync the tracepoint's SRCU state after unregistering the tracepoints""

This reverts commit fae609baeb93c4f41983adcb451378f049b4cdc9.
(There was a miscommunication about which commit was causing the
problem on ppc64le. Just re-confirmed the tracepoint-SRCU commit
was not the culprit.)

23 months agoupdate tested-kernels range to include 6.1.0-rc3 :)
Serhei Makarov [Thu, 3 Nov 2022 15:46:06 +0000 (11:46 -0400)]
update tested-kernels range to include 6.1.0-rc3 :)

23 months agosession.cxx: update tested-kernels range to include 6.1.0-rc2
Frank Ch. Eigler [Thu, 3 Nov 2022 15:43:26 +0000 (11:43 -0400)]
session.cxx: update tested-kernels range to include 6.1.0-rc2

23 months agoRevert "Bug: runtime: we might not sync the tracepoint's SRCU state after unregisteri...
Frank Ch. Eigler [Thu, 3 Nov 2022 15:16:42 +0000 (11:16 -0400)]
Revert "Bug: runtime: we might not sync the tracepoint's SRCU state after unregistering the tracepoints"

This reverts commit 06662e726fcb229a23f18bd057fedabdec2b3ca9.
There are indications that on some non-x86 platforms, this patch
may be causing problems.

23 months agoBug: dwarf_diename() might return NULL pointers and we lacked protection
Yichun Zhang (agentzh) [Wed, 2 Nov 2022 18:41:11 +0000 (11:41 -0700)]
Bug: dwarf_diename() might return NULL pointers and we lacked protection

Thanks Junlong Li for the report and patch.

23 months agoNEWS: mention PR29676 impact
Frank Ch. Eigler [Wed, 2 Nov 2022 14:38:30 +0000 (10:38 -0400)]
NEWS: mention PR29676 impact

23 months agoSwitch from pathfix.py to %py3_shebang_fix
Lumir Balhar [Tue, 1 Nov 2022 15:10:02 +0000 (11:10 -0400)]
Switch from pathfix.py to %py3_shebang_fix

For more info see https://fedoraproject.org/wiki/Changes/Python3.12#pathfix.py_tool_will_be_removed

The rpm macro is defined in all currently supported fedoras already,
and is not used in rhel etc., so this is safe to change.

23 months agoAdjust runtime/linux/task_finder2.c to work with Linux 6.1 kernels
William Cohen [Tue, 1 Nov 2022 02:48:29 +0000 (22:48 -0400)]
Adjust runtime/linux/task_finder2.c to work with Linux 6.1 kernels

Unlike the earlier kernels the mm_struct does not have mmap field in
the Linux 6.1 kernel.  This required some adjustments to the
'__stp_call_mmap_callbacks_for_task function to work with the newer
kernel.  Newer kernels use VMA_ITERATOR and for_each_vma macros to
access the equivalent to the vma information accessed from the mmap
field. When reviewing the commit history of the Linux kernel found git
commit 3a4f7ef4be by Liam Howlett that provided backward compatible
VMA_ITERATOR and for_each_vma macros in cases where those macros were
not available.  This approach was adapted for task_finder2.c and
allows the code to compile on both the old and new kernels.

23 months agosession.cxx: tested kernel range
Serhei Makarov [Mon, 31 Oct 2022 16:46:31 +0000 (12:46 -0400)]
session.cxx: tested kernel range

23 months agoprerelease: AUTHORS
Serhei Makarov [Mon, 31 Oct 2022 15:05:31 +0000 (11:05 -0400)]
prerelease: AUTHORS

23 months agomake update-po
Serhei Makarov [Mon, 31 Oct 2022 15:03:49 +0000 (11:03 -0400)]
make update-po

23 months agosystemtap.examples/general/py{2,3}example.meta tentative fix
Serhei Makarov [Mon, 31 Oct 2022 14:59:04 +0000 (10:59 -0400)]
systemtap.examples/general/py{2,3}example.meta tentative fix

23 months agoNEWS: bpf assembler improvements
Serhei Makarov [Mon, 31 Oct 2022 14:57:17 +0000 (10:57 -0400)]
NEWS: bpf assembler improvements

23 months agoNEWS: proofread slightly
Serhei Makarov [Mon, 31 Oct 2022 14:57:00 +0000 (10:57 -0400)]
NEWS: proofread slightly

23 months agobpf PR29307 6/n testing: enable new asm for user_string.exp
Serhei Makarov [Fri, 15 Jul 2022 17:55:09 +0000 (13:55 -0400)]
bpf PR29307 6/n testing: enable new asm for user_string.exp

23 months agofixup for squash: bump copyyears in bpf-{base,translate}
Serhei Makarov [Fri, 15 Jul 2022 17:52:34 +0000 (13:52 -0400)]
fixup for squash: bump copyyears in bpf-{base,translate}

23 months agopr29307 FIXUP for squash: bugfixes in parse_asm_stmt
Serhei Makarov [Fri, 15 Jul 2022 17:51:27 +0000 (13:51 -0400)]
pr29307 FIXUP for squash: bugfixes in parse_asm_stmt

23 months agobpf pr29307 5/n embedded-code asm opcode table: ALU32
Serhei Makarov [Fri, 15 Jul 2022 15:03:05 +0000 (11:03 -0400)]
bpf pr29307 5/n embedded-code asm opcode table: ALU32

23 months agopr29307 4/n embedded-code asm opcode table: Memory
Serhei Makarov [Fri, 15 Jul 2022 14:47:43 +0000 (10:47 -0400)]
pr29307 4/n embedded-code asm opcode table: Memory

Includes additional code to handle stw/stxw opcodes separately: one
takes IMM, the other takes SRC. (A detail missed in the earlier
patch.)

23 months agoPR29307 3/n embedded-code asm opcode table: Branch
Serhei Makarov [Thu, 14 Jul 2022 16:32:22 +0000 (12:32 -0400)]
PR29307 3/n embedded-code asm opcode table: Branch

23 months agoPR29307 2/n embedded-code asm opcode table: ALU64
Serhei Makarov [Thu, 14 Jul 2022 15:05:07 +0000 (11:05 -0400)]
PR29307 2/n embedded-code asm opcode table: ALU64

23 months agoPR29307 1/n FIXUP for squash: indentation in bpf-base.cxx
Serhei Makarov [Thu, 14 Jul 2022 15:00:57 +0000 (11:00 -0400)]
PR29307 1/n FIXUP for squash: indentation in bpf-base.cxx

23 months agoPR29307 1/n: outline improved bpf embeddedcode assembler
Serhei Makarov [Wed, 13 Jul 2022 18:57:30 +0000 (14:57 -0400)]
PR29307 1/n: outline improved bpf embeddedcode assembler

This assembler takes named opcodes following the syntax
from https://github.com/iovisor/bpf-docs/blob/master/eBPF.md
and supports a more natural syntax (fewer commas and semicolons
needed).

Opcode table to be filled-in by further commits.
Proof-of-concept usage in tapsets for testing ditto.

The advantage of implementing the assembler this way is that the prior
syntax is still supported, hence we do not *have* to change tapset
code until we want to.

23 months agotestsuite: make bad-code.exp compatible with modern kernels
Martin Cermak [Mon, 24 Oct 2022 17:41:09 +0000 (19:41 +0200)]
testsuite: make bad-code.exp compatible with modern kernels

This update makes the bad-code.exp testcase compatible with modern
rhel-9 kernels that use force_sig_info_to_task() instead of
force_sig_info().  This is upstream kernel commit 5ad18b2e60b.
Also mark this testcase KFAIL on s390x.

23 months agotestsuite: make at_var_mark.exp LTO agnostic.
Martin Cermak [Fri, 21 Oct 2022 15:20:43 +0000 (17:20 +0200)]
testsuite: make at_var_mark.exp LTO agnostic.

Sometimes LTO is used for compilation (default for building
RHEL packages).  With LTO, the morehelp variable would get
optimized out, and e.g. at_var_mark.exp would start failing.

2 years agoPR29676 - wildcard expansion bugfix
Ryan Goldberg [Fri, 14 Oct 2022 14:56:12 +0000 (10:56 -0400)]
PR29676 - wildcard expansion bugfix

Removed unneeded check which resulted in missing wildcard
expansions from the elf symbol table if a separate debug file
is present.

2 years agotestsuite: rework optim_stats microbenchmark
Frank Ch. Eigler [Wed, 12 Oct 2022 14:31:05 +0000 (10:31 -0400)]
testsuite: rework optim_stats microbenchmark

Based on a new version from <mcermak@redhat.com>, tweak to reduce
probe effect (formerly excessively frequent time checking).

2 years agoautoconfigury: rebuild on Fedora 36
Frank Ch. Eigler [Tue, 11 Oct 2022 14:50:44 +0000 (10:50 -0400)]
autoconfigury: rebuild on Fedora 36

2 years agoPR29668 - make rpm target
Martin Cermak [Tue, 11 Oct 2022 14:41:23 +0000 (16:41 +0200)]
PR29668 - make rpm target

Without this fix, `make rpm` complains about 'GIT_PRETTY_REV'
not being declared in this scope at the build time.

2 years agoUpdated NEWS for python3 3.9, 3.10, 3.11 support additions
Stan Cox [Fri, 7 Oct 2022 20:33:21 +0000 (16:33 -0400)]
Updated NEWS for python3 3.9, 3.10, 3.11 support additions

2 years agotweak & upgrade git_version.h
Frank Ch. Eigler [Fri, 7 Oct 2022 15:53:16 +0000 (11:53 -0400)]
tweak & upgrade git_version.h

Make the generated version string run in "git worktree" siblings,
produce the GIT_PRETTY_REV message, and work even if the last commit
(like this one) happens to be signed.

2 years agoUpdate git_version.h
Frank Ch. Eigler [Fri, 7 Oct 2022 15:43:56 +0000 (11:43 -0400)]
Update git_version.h

As borrowed from github:
https://github.com/lowfriction/sylverant-ship_server/blob/bd8a8bd80a43b4c9d54f5cb8d22157e746bb346c/git_version.sh

2 years agoPR29661: update default --rlimit-as for stap-server
Frank Ch. Eigler [Fri, 7 Oct 2022 15:30:36 +0000 (11:30 -0400)]
PR29661: update default --rlimit-as for stap-server

And while in the vicinity, add a std::bad_alloc catcher for
stap main(), so we can better advise users.

2 years agotweak livepatch tapset & examples
Frank Ch. Eigler [Wed, 5 Oct 2022 20:39:22 +0000 (16:39 -0400)]
tweak livepatch tapset & examples

Promote the cve_tmpdisabled_s to an interative procfs switch (renamed
from cve_s_on_timer).  Add NEWS.

2 years agoA tapset and template for stap cve security bandaids.
Ryan Goldberg [Tue, 4 Oct 2022 15:48:50 +0000 (11:48 -0400)]
A tapset and template for stap cve security bandaids.

2 years agoSupport python 3.10
Stan Cox [Thu, 29 Sep 2022 15:29:21 +0000 (11:29 -0400)]
Support python 3.10

Support variable accessing on python3-3.9

2 years agoBug: runtime: we might not sync the tracepoint's SRCU state after unregistering the...
Yichun Zhang (agentzh) [Fri, 16 Sep 2022 20:37:38 +0000 (13:37 -0700)]
Bug: runtime: we might not sync the tracepoint's SRCU state after unregistering the tracepoints

It might lead to issues like PR29577.

2 years agoBug: runtime: taskfinder2: stap_stop_task_finder() might busy-wait a spinlock forever
Yichun Zhang (agentzh) [Thu, 15 Sep 2022 04:39:42 +0000 (21:39 -0700)]
Bug: runtime: taskfinder2: stap_stop_task_finder() might busy-wait a spinlock forever

The __stp_inuse_count counter might get out of sync when kernel memory
allocations fail. This leads to stap_stop_task_finder() waits for the
counter forever.

This might happen on systems short of available memory. The stapio
process might stuck at almost 100% CPU usage (though it is not a CPU
soft-lockup due to the use of schedule() function calls inside the lock
waiting loop. The hottest kernel backtrace for such stapio processes
look like this:

    __raw_spin_unlock_irq+0xe [kernel]
    __schedule+0x5c4 [kernel]
    schedule+0x2f [kernel]
    stap_stop_task_finder+0x30 [stap_XXX]
    stap_stop_task_finder+0x30 [stap_XXX] (inexact)
    systemtap_module_exit+0x62 [stap_XXX] (inexact)
    _stp_cleanup_and_exit+0xa6 [stap_XXX] (inexact)
    _stp_ctl_write_cmd+0xaf [stap_XXX] (inexact)
    proc_reg_write+0x3c [kernel] (inexact)
    vfs_write+0xa5 [kernel] (inexact)
    ksys_write+0x4f [kernel] (inexact)
    do_syscall_64+0x5b [kernel] (inexact)
    entry_SYSCALL_64_after_hwframe+0x65 [kernel] (inexact)

2 years agoSupport python 3.10
Stan Cox [Wed, 14 Sep 2022 14:40:34 +0000 (10:40 -0400)]
Support python 3.10

Support python 3.10.  Simplify the python examples to use the builtin
python support instead of rolling their own support.

2 years agoUpdated NEWS for recent memory allocation optimizations.
Yichun Zhang (agentzh) [Sat, 10 Sep 2022 04:04:53 +0000 (21:04 -0700)]
Updated NEWS for recent memory allocation optimizations.

2 years agoruntime: procfs: optimized the memory size for the file-scoped p_r_files array
Yichun Zhang (agentzh) [Sat, 10 Sep 2022 03:34:54 +0000 (20:34 -0700)]
runtime: procfs: optimized the memory size for the file-scoped p_r_files array

Shrinked the array size from NR_CPUS to num_possible_cpus().

NR_CPUS usually takes a very large value, like 8192 in Fedora kernels.

2 years agoBug: procfs: NULL ptr deref might happen in relay_file_open()
Yichun Zhang (agentzh) [Sat, 10 Sep 2022 01:51:42 +0000 (18:51 -0700)]
Bug: procfs: NULL ptr deref might happen in relay_file_open()

inode->i_private might be NULL ocassionally in relay_file_open()
(which is triggered by stapio's openat() syscall) due to a race
condition in our __stp_procfs_relay_create_buf_file_callback()
function.

Add a wrapper around kernel's relay_file_open() for our procfs's
open operation so that we always check if inode->i_private is NULL.

2 years agoruntime: pmap now only allocates per-cpu map elements for online CPUs.
Yichun Zhang (agentzh) [Fri, 9 Sep 2022 03:39:54 +0000 (20:39 -0700)]
runtime: pmap now only allocates per-cpu map elements for online CPUs.

And pmap's top-level array is also shrinked a lot from NR_CPUS to
num_possible_cpus().

2 years agoruntime: stat: avoid allocating stat_data memory on offline CPUs
Yichun Zhang (agentzh) [Fri, 9 Sep 2022 05:52:32 +0000 (22:52 -0700)]
runtime: stat: avoid allocating stat_data memory on offline CPUs

2 years agoruntime: pmap: now we use kernel's per-cpu machinary to replace the pmap->map array
Yichun Zhang (agentzh) [Fri, 9 Sep 2022 05:07:51 +0000 (22:07 -0700)]
runtime: pmap: now we use kernel's per-cpu machinary to replace the pmap->map array

2 years agoInitial python 3.11 backtrace support
Stan Cox [Fri, 9 Sep 2022 20:09:10 +0000 (16:09 -0400)]
Initial python 3.11 backtrace support

Use @defined to handle PyFrameObject members moved to PyInterpreterFrame by
python 3.11 such as: f_code f_back f_globals, f_localsplus, f_lasti.  Support
3.11 dictionaries: me_value, me_key, dk_size, dk_entries, dk_kind.  Support
3.11 local variable accessing: co_varnames.

2 years agoBug: runtime: gettimeofday*(): we did not handle CPU hotplug correctly
Yichun Zhang (agentzh) [Fri, 9 Sep 2022 01:24:46 +0000 (18:24 -0700)]
Bug: runtime: gettimeofday*(): we did not handle CPU hotplug correctly

Online CPUs may change at any time and we did not make sure the timers
were actually initialized.

2 years agoBug: potential NULL pointer derefs when CPUs go online and offline after the ko modul...
Yichun Zhang (agentzh) [Thu, 8 Sep 2022 06:14:48 +0000 (23:14 -0700)]
Bug: potential NULL pointer derefs when CPUs go online and offline after the ko module runs

Bug: the relayfs memory calculation was wrong. adjusted the formula for
the real relay_open() implementation in modern kernels.

Optimize: relay v2: wakeup timers: we only wake up the reader threads
for the current online CPUs.

2 years agoOptimize: runtime: context: avoid allocating context structs for offline CPUs
Yichun Zhang (agentzh) [Thu, 8 Sep 2022 20:02:04 +0000 (13:02 -0700)]
Optimize: runtime: context: avoid allocating context structs for offline CPUs

We used to allocate context structs for all the "possible CPUs", which
is quite wasteful.

Some VM hypervisors like VMWare assigns large number of "possible CPUs"
to their guests by default, which might lead to huge amount of memory
allocated in the stap ko module.

2 years agoOptimize: runtime: print: avoid allocating string buffers for offline CPUs
Yichun Zhang (agentzh) [Thu, 8 Sep 2022 19:46:39 +0000 (12:46 -0700)]
Optimize: runtime: print: avoid allocating string buffers for offline CPUs

We used to allocate string buffers for all the "possible CPUs", which
is quite wasteful.

Some VM hypervisors like VMWare assigns large number of "possible CPUs"
to their guests by default, which might lead to huge amount of memory
allocated in the stap ko module.

2 years agoBug: __alloc_percpu() actually uses num_possible_cpus() instead of num_online_cpus...
Yichun Zhang (agentzh) [Wed, 7 Sep 2022 19:14:56 +0000 (12:14 -0700)]
Bug: __alloc_percpu() actually uses num_possible_cpus() instead of num_online_cpus() on modern kernels

2 years agotapset: followup fix for commit 6dda5e93f28.
Yichun Zhang (agentzh) [Wed, 7 Sep 2022 18:48:41 +0000 (11:48 -0700)]
tapset: followup fix for commit 6dda5e93f28.

2 years agoBug: runtime: var _stp_allocated_net_memory would overflow easily
Yichun Zhang (agentzh) [Wed, 7 Sep 2022 18:37:58 +0000 (11:37 -0700)]
Bug: runtime: var _stp_allocated_net_memory would overflow easily

Changed its type from int to long. We saw it overflow in a VMWare guest
which has 128 CPUs configured.

The patch was originally drafted by Junlong Li.

2 years agoalign man/stap.1 with PR25841/eddfa1e6
Martin Cermak [Wed, 31 Aug 2022 10:54:00 +0000 (12:54 +0200)]
align man/stap.1 with PR25841/eddfa1e6

2 years agoAlign testsuite/systemtap.base/at_var.exp with PR25841/eddfa1e6
Martin Cermak [Tue, 23 Aug 2022 16:21:25 +0000 (18:21 +0200)]
Align testsuite/systemtap.base/at_var.exp with PR25841/eddfa1e6

The --compatible part of at_var.exp becomes irrelevant, after
commit eddfa1e6 implementing PR25841 was introduced.

2 years agoMake kernel.function("__remove_from_page_cache").return probe optional
Martin Cermak [Mon, 22 Aug 2022 13:02:47 +0000 (15:02 +0200)]
Make kernel.function("__remove_from_page_cache").return probe optional

On some kernels __delete_from_page_cache() is an inlined function,
and so its .return can't be probed.

2 years agoPR29507: generalize sample python tapset for loose python{2,3} library versions
Frank Ch. Eigler [Fri, 19 Aug 2022 19:00:22 +0000 (15:00 -0400)]
PR29507: generalize sample python tapset for loose python{2,3} library versions

We can rely on stap 4.2+'s probe-context passing to functions to make
it unnecessary to decorate each @cast() with a libpython path name.
This lets these tests work on a range of python libraries.

These helper functions really should go into the standard python tapset,
rather than sit here in the examples, but that's for later.

2 years agorestore @cast "kernel" default for old stap
Frank Ch. Eigler [Fri, 19 Aug 2022 18:14:33 +0000 (14:14 -0400)]
restore @cast "kernel" default for old stap

Tweak PR25841 (stap 4.3) era code to allow @cast() ops to infer
"kernel" for unspecified module in older compatible mode.

2 years agofix py3example script run fail once more
yaowenbin [Thu, 28 Jul 2022 09:20:22 +0000 (17:20 +0800)]
fix py3example script run fail once more

2 years agofix py3example script run fail
yaowenbin [Thu, 28 Jul 2022 09:08:37 +0000 (17:08 +0800)]
fix py3example script run fail

2 years agosystemtap.spec: fedora i686 rawhide (!) ftbfs fix try 2
Frank Ch. Eigler [Tue, 2 Aug 2022 21:02:22 +0000 (17:02 -0400)]
systemtap.spec: fedora i686 rawhide (!) ftbfs fix try 2

2 years agosystemtap.spec: adapt to fedora rawhide java renaming
Frank Ch. Eigler [Tue, 2 Aug 2022 20:31:07 +0000 (16:31 -0400)]
systemtap.spec: adapt to fedora rawhide java renaming

On f36+, *Require java-latest-openjdk-devel.

2 years agotesting buildbot
Frank Ch. Eigler [Tue, 26 Jul 2022 17:50:28 +0000 (13:50 -0400)]
testing buildbot

2 years agoFix failing nfsd.createv3 in testsuite/buildok/nfsd-all-probes.stp
Martin Cermak [Wed, 20 Jul 2022 10:50:00 +0000 (12:50 +0200)]
Fix failing nfsd.createv3 in testsuite/buildok/nfsd-all-probes.stp

* tapset/linux/nfsd.stp: Make nfsd.createv3 and nfsd.createv3.return
  optional in nfsd.entries, since the underlying probe point no longer
  exists in kernels 5.19+ per kernel commit 1c388f27759c5d9271d4fca0 .
  This fixes `stap -p4 testsuite/buildok/nfsd-all-probes.stp`.
* Testsuite/buildok/nfsd-detailed.stp: Make nfsd.createv3 tests
  optional.

Note 1: testsuite/buildok/nfsd-all-probes.stp tries to compile
something like:

probe nfsd.* , nfsd.*.* , nfsd.*.*.* { ... }

which means that the testcase overrides the tree level ? optionality, and
forces each level of the tree to carry ? also.

Note 2: this update is an analogy to PR18856 / 3fc11ed07bad37 .

2 years agopython 3.11 removed direct access to PyFrameObject members
Stan Cox [Wed, 13 Jul 2022 13:49:51 +0000 (09:49 -0400)]
python 3.11 removed direct access to PyFrameObject members

Take into account the change in PyFrameObject definition to allow
building systemtap with python 3.11.  Additional support for python
3.11 is forthcoming.

2 years agoMake variable initializer work with RHEL6 compiler
William Cohen [Wed, 13 Jul 2022 16:09:26 +0000 (12:09 -0400)]
Make variable initializer work with RHEL6 compiler

The gcc 4.4 compiler in RHEL 6 does not understand initializer that
use ".field=".  Adjusted the variable initialization to work with the
older compiler.

2 years agoUpdate sleeptime.stp to work with newer kernels and tracepoint syscalls
William Cohen [Tue, 12 Jul 2022 01:08:46 +0000 (21:08 -0400)]
Update sleeptime.stp to work with newer kernels and tracepoint syscalls

Newer kernels use syscall.clock_nanosleep instead of
syscall.nanosleep.  In some cases tracepoint implementations of
syscall.* used which do not allow the use of @entry(). The revised
code has an explicit associative array to track time for syscall entry
rather than @entry() in the syscall.*.return handler.

2 years agoExtract the exit_reason from trace_kvm_exit vcpu argument on newer kernels
William Cohen [Mon, 11 Jul 2022 22:10:01 +0000 (18:10 -0400)]
Extract the exit_reason from trace_kvm_exit vcpu argument on newer kernels

For x86_64 processors newer kernels change where the exit_reason
information is located.  In older kernels the exit_reason was a
parameter for the trace_kvm_exit.  For the newer kernels exit_reason
is a field buried in a member field of vcpu argument.  Making
kvm_service_time.stp pick the appropriate location for exit_reason.

2 years agoMake the DW_AT_bit_field_offset diagnostic output 32-bit agnostic.
William Cohen [Sun, 10 Jul 2022 04:41:50 +0000 (00:41 -0400)]
Make the DW_AT_bit_field_offset diagnostic output 32-bit agnostic.

2 years agoPR29037 Handling gcc11 bitfields
William Cohen [Fri, 24 Jun 2022 21:09:39 +0000 (17:09 -0400)]
PR29037 Handling gcc11 bitfields

The newer DWARF5 output provided by GCC11 no longer have a
DW_AT_data_member_location attributed describing where the bitfield is
located.  This information needs to be extracted from the
DW_AT_data_bit_offset.

The patch maps the newer DWARF5 DW_AT_data_bit_offset information
internally to a format that matches up with the
DW_AT_data_member_location information because dwarf_getlocation_addr
function does not understand the DW_AT_data_bit_offset. An equivalent
DW_AT_data_member_location attribue based on the size of the
underlying type being used to store the bitfield and the
DW_AT_data_bit_offset information is generated.

The get_bitfield function was also modified to determine
the shifts and masking operations using the DW_AT_data_bit_offset.

2 years agoman/stap.1.in: elaborate on -c/-x vs. probe filtering
Frank Ch. Eigler [Fri, 17 Jun 2022 12:27:25 +0000 (08:27 -0400)]
man/stap.1.in: elaborate on -c/-x vs. probe filtering

2 years agoUpdate postgres app test, deprecate mysql and xulrunner.
Stan Cox [Thu, 16 Jun 2022 15:37:38 +0000 (11:37 -0400)]
Update postgres app test, deprecate mysql and xulrunner.

Update Postgres test.  Deprecate mysql (dtrace support removed) and
xulrunner (no longer maintained or builds)

2 years agosystemtap.spec: package stap-profile-annotate if %{with_python3}
Martin Cermak [Thu, 16 Jun 2022 07:38:00 +0000 (09:38 +0200)]
systemtap.spec: package stap-profile-annotate if %{with_python3}

2 years agoResolve sdt probes inside c++ methods.
Stan Cox [Tue, 14 Jun 2022 19:16:13 +0000 (15:16 -0400)]
Resolve sdt probes inside c++ methods.

Remove repetitious pushsection/popsection inside _SDT_(SIGN,TYPE,SIZE) macros.
Page in the parm string in the cxxclass test.

2 years agoAdd CONFIG_COMPAT 32-bit on 64-bit support for RISC-V
William Cohen [Fri, 10 Jun 2022 21:01:37 +0000 (17:01 -0400)]
Add CONFIG_COMPAT 32-bit on 64-bit support for RISC-V

The Linux 5.19 kernel has 32-bit on 64-bit support for RISC-V.  Thus,
need to support RISC-V like aarch64 and ppc64.

2 years agoPage in the parm string in the sdt_misc test
Stan Cox [Fri, 3 Jun 2022 15:26:06 +0000 (11:26 -0400)]
Page in the parm string in the sdt_misc test

Make a local copy of the parm string so that it gets paged in.

2 years agoDon't consider 0x prefix when checking perf test results
Stan Cox [Thu, 2 Jun 2022 19:27:26 +0000 (15:27 -0400)]
Don't consider 0x prefix when checking perf test results

2 years agotesting signed commit
Frank Ch. Eigler [Thu, 2 Jun 2022 18:38:04 +0000 (14:38 -0400)]
testing signed commit

2 years agoremove dejazilla support
Frank Ch. Eigler [Thu, 2 Jun 2022 18:28:52 +0000 (14:28 -0400)]
remove dejazilla support

With alternate testsuite log analysis packages (bunsen) coming on
line, the old dejazilla (postgresql webdb) facility is no longer
needed.

2 years agoAdjust plt test result_string
Stan Cox [Thu, 2 Jun 2022 18:15:47 +0000 (14:15 -0400)]
Adjust plt test result_string

2 years agoConsider function attribute suffixes in the function name shortening check.
Stan Cox [Wed, 1 Jun 2022 18:53:59 +0000 (14:53 -0400)]
Consider function attribute suffixes in the function name shortening check.

gcc function attribute suffixes like constprop or cold may lengthen
the function name.  Check for missing glibc debuginfo in tls errno test.

2 years agoFilter out aarch64 mapping symbols
William Cohen [Thu, 26 May 2022 20:45:52 +0000 (16:45 -0400)]
Filter out aarch64 mapping symbols

Like the 32-bit ARM the aarch64 also has mapping symbols in
the binaries to mark the start of A64 code ("$x") and data ("$d").
The code for 32-bit ARM has been extended to handle the aarch64.
This improves the backtraces from:

BOOT_IMAGE=(hd0,gpt2)/vmlinuz-5.14.0-70.14.1.el9_0.aarch64 root=/dev/mapper/rhel_ampere--mtsnow--altra--02--vm--12-root ro crashkernel=2G-:448M rd.lvm.lv=rhel_ampere-mtsnow-altra-02-vm-12/root rd.lvm.lv=rhel_ampere-mtsnow-altra-02-vm-12/swap
 0xffffc2cf48d73170 : $x+0x0/0x40 [kernel]
 0xffffc2cf48d654b0 : proc_reg_read_iter+0x90/0xd0 [kernel]
 0xffffc2cf48cc53a8 : vfs_read+0x148/0x1d4 [kernel]
 0x0

To:

BOOT_IMAGE=(hd0,gpt2)/vmlinuz-5.14.0-70.14.1.el9_0.aarch64 root=/dev/mapper/rhel_ampere--mtsnow--altra--02--vm--12-root ro crashkernel=2G-:448M rd.lvm.lv=rhel_ampere-mtsnow-altra-02-vm-12/root rd.lvm.lv=rhel_ampere-mtsnow-altra-02-vm-12/swap
 0xffffc2cf48d73170 : cmdline_proc_show+0x0/0x40 [kernel]
 0xffffc2cf48d654b0 : proc_reg_read_iter+0x90/0xd0 [kernel]
 0xffffc2cf48cc53a8 : vfs_read+0x148/0x1d4 [kernel]
 0x0

2 years agoAdapt hw_breakpoint.exp for Linux 5.7.0 proc_create
Stan Cox [Thu, 26 May 2022 17:36:02 +0000 (13:36 -0400)]
Adapt hw_breakpoint.exp for Linux 5.7.0 proc_create

Linux 5.7.0 uses struct proc_ops instead of file_operations.
xfail if unable to get address from kallsyms

2 years agoFix at_deref and at_var_cu test driver issues
Stan Cox [Wed, 25 May 2022 15:43:43 +0000 (11:43 -0400)]
Fix at_deref and at_var_cu test driver issues

Add wait to at_deref.exp to avoid timing issue.  Check at_var_cu (bah, baz) to counter value in prologue.

This page took 0.065881 seconds and 5 git commands to generate.