import gcc-toolset-10-systemtap-4.3-7.el8
This commit is contained in:
parent
be20f19841
commit
a21a1d3445
1403
SOURCES/rhbz1847676,1857749.patch
Normal file
1403
SOURCES/rhbz1847676,1857749.patch
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,3 +1,317 @@
|
|||||||
|
commit 0a281a96ddf7cae9a0f0cc0eb505a752ffdd932e
|
||||||
|
Author: William Cohen <wcohen@redhat.com>
|
||||||
|
Date: Tue Jun 16 16:02:11 2020 -0400
|
||||||
|
|
||||||
|
Make sizeof.stp runnable with the bpf backend.
|
||||||
|
|
||||||
|
diff --git a/testsuite/systemtap.examples/general/sizeof.meta b/testsuite/systemtap.examples/general/sizeof.meta
|
||||||
|
index 29713e4..b30078d 100644
|
||||||
|
--- a/testsuite/systemtap.examples/general/sizeof.meta
|
||||||
|
+++ b/testsuite/systemtap.examples/general/sizeof.meta
|
||||||
|
@@ -2,7 +2,7 @@ title: Print the Size of a C Type
|
||||||
|
name: sizeof.stp
|
||||||
|
version: 1.0
|
||||||
|
author: anonymous
|
||||||
|
-keywords: statistics memory
|
||||||
|
+keywords: statistics memory bpf
|
||||||
|
subsystem: any
|
||||||
|
status: proposed
|
||||||
|
exit: event-ended
|
||||||
|
@@ -11,3 +11,5 @@ scope: system-wide
|
||||||
|
description: This script prints the size of a type, based on dwarf debuginfo for any kernel or userspace module, or trial-compilation of a given header file name.
|
||||||
|
test_check: stap -p4 sizeof.stp task_struct 'kernel<include/linux/sched.h>'
|
||||||
|
test_installcheck: stap sizeof.stp FILE '</usr/include/stdio.h>'
|
||||||
|
+test_check_bpf: stap -p4 --bpf sizeof.stp task_struct 'kernel<include/linux/sched.h>'
|
||||||
|
+test_installcheck_bpf: stap --bpf sizeof.stp FILE '</usr/include/stdio.h>'
|
||||||
|
diff --git a/testsuite/systemtap.examples/general/sizeof.stp b/testsuite/systemtap.examples/general/sizeof.stp
|
||||||
|
index 0c77dce..5aec674 100755
|
||||||
|
--- a/testsuite/systemtap.examples/general/sizeof.stp
|
||||||
|
+++ b/testsuite/systemtap.examples/general/sizeof.stp
|
||||||
|
@@ -7,9 +7,11 @@
|
||||||
|
# sizeof.stp TYPENAME </usr/include/someheader.h>
|
||||||
|
|
||||||
|
probe oneshot {
|
||||||
|
- println("type ", @1,
|
||||||
|
- %( $# > 1 %? " in ", @2, %) /* module or header file name */
|
||||||
|
- " byte-size: ",
|
||||||
|
- %( $# > 1 %? @cast_module_sizeof(@2, @1) %: @cast_sizeof(@1) %)
|
||||||
|
- )
|
||||||
|
+ %( $# > 1 %?
|
||||||
|
+ printf("type %s in %s byte-size: %d\n", @1, @2,
|
||||||
|
+ @cast_module_sizeof(@2, @1))
|
||||||
|
+ %:
|
||||||
|
+ printf("type %s byte-size: %d\n", @1,
|
||||||
|
+ @cast_sizeof(@1))
|
||||||
|
+ %)
|
||||||
|
}
|
||||||
|
commit 2b2b6a622dc1d434c60d0ea159b260f660068ad1
|
||||||
|
Author: William Cohen <wcohen@redhat.com>
|
||||||
|
Date: Wed Jun 17 11:57:18 2020 -0400
|
||||||
|
|
||||||
|
Fix sizeof.stp to explicitly use kernel debuginfo if one not specified
|
||||||
|
|
||||||
|
Commit 00ee19ff030f665df7e087a579f39105256a0253 changed how @cast()
|
||||||
|
operations work and they no longer default to using the kernel
|
||||||
|
debuginfo for type information. Need to use the @cast_module_sizeof()
|
||||||
|
instead of @cast_size() to use the kernel debuginfo.
|
||||||
|
|
||||||
|
diff --git a/testsuite/systemtap.examples/general/sizeof.stp b/testsuite/systemtap.examples/general/sizeof.stp
|
||||||
|
index 5aec674..b45f593 100755
|
||||||
|
--- a/testsuite/systemtap.examples/general/sizeof.stp
|
||||||
|
+++ b/testsuite/systemtap.examples/general/sizeof.stp
|
||||||
|
@@ -12,6 +12,6 @@ probe oneshot {
|
||||||
|
@cast_module_sizeof(@2, @1))
|
||||||
|
%:
|
||||||
|
printf("type %s byte-size: %d\n", @1,
|
||||||
|
- @cast_sizeof(@1))
|
||||||
|
+ @cast_module_sizeof("kernel", @1))
|
||||||
|
%)
|
||||||
|
}
|
||||||
|
|
||||||
|
commit 717b7dddd08b66b3caa5585221472d84e40be658
|
||||||
|
Author: William Cohen <wcohen@redhat.com>
|
||||||
|
Date: Wed Jun 17 13:08:30 2020 -0400
|
||||||
|
|
||||||
|
Use explicit @cast() operators to fslatency-nd.stp and fsslower-nd.stp
|
||||||
|
|
||||||
|
Commit 00ee19ff030f665df7e087a579f39105256a0253 changed how @cast()
|
||||||
|
operations work and they no longer default to using the kernel
|
||||||
|
debuginfo for type information. Need to include kernel as location for
|
||||||
|
this information for the @cast() rather than just assuming a default.
|
||||||
|
|
||||||
|
diff --git a/testsuite/systemtap.examples/lwtools/fslatency-nd.stp b/testsuite/systemtap.examples/lwtools/fslatency-nd.stp
|
||||||
|
index 6008399..0bee34f 100755
|
||||||
|
--- a/testsuite/systemtap.examples/lwtools/fslatency-nd.stp
|
||||||
|
+++ b/testsuite/systemtap.examples/lwtools/fslatency-nd.stp
|
||||||
|
@@ -63,8 +63,8 @@ probe __vfs_read = kprobe.function("__vfs_read")
|
||||||
|
{
|
||||||
|
# Skip the call if new_sync_read() wouldn't be called.
|
||||||
|
file = pointer_arg(1)
|
||||||
|
- if (!file || @cast(file, "file")->f_op->read
|
||||||
|
- || !@cast(file, "file")->f_op->read_iter)
|
||||||
|
+ if (!file || @cast(file, "file", "kernel")->f_op->read
|
||||||
|
+ || !@cast(file, "file", "kernel")->f_op->read_iter)
|
||||||
|
next
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -75,8 +75,8 @@ probe __vfs_write = kprobe.function("__vfs_write")
|
||||||
|
{
|
||||||
|
# Skip the call if new_sync_write() wouldn't be called.
|
||||||
|
file = pointer_arg(1)
|
||||||
|
- if (!file || @cast(file, "file")->f_op->write
|
||||||
|
- || !@cast(file, "file")->f_op->write_iter)
|
||||||
|
+ if (!file || @cast(file, "file", "kernel")->f_op->write
|
||||||
|
+ || !@cast(file, "file", "kernel")->f_op->write_iter)
|
||||||
|
next
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -102,8 +102,8 @@ probe __vfs_read.return = kprobe.function("__vfs_read").return
|
||||||
|
{
|
||||||
|
# Skip the call if new_sync_read() wouldn't be called.
|
||||||
|
file = @entry(pointer_arg(1))
|
||||||
|
- if (!file || @cast(file, "file")->f_op->read
|
||||||
|
- || !@cast(file, "file")->f_op->read_iter)
|
||||||
|
+ if (!file || @cast(file, "file", "kernel")->f_op->read
|
||||||
|
+ || !@cast(file, "file", "kernel")->f_op->read_iter)
|
||||||
|
next
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -115,8 +115,8 @@ probe __vfs_write.return = kprobe.function("__vfs_write")
|
||||||
|
{
|
||||||
|
# Skip the call if new_sync_write() wouldn't be called.
|
||||||
|
file = pointer_arg(1)
|
||||||
|
- if (!file || @cast(file, "file")->f_op->write
|
||||||
|
- || !@cast(file, "file")->f_op->write_iter)
|
||||||
|
+ if (!file || @cast(file, "file", "kernel")->f_op->write
|
||||||
|
+ || !@cast(file, "file", "kernel")->f_op->write_iter)
|
||||||
|
next
|
||||||
|
}
|
||||||
|
|
||||||
|
diff --git a/testsuite/systemtap.examples/lwtools/fsslower-nd.stp b/testsuite/systemtap.examples/lwtools/fsslower-nd.stp
|
||||||
|
index 64abe41..90fa9b5 100755
|
||||||
|
--- a/testsuite/systemtap.examples/lwtools/fsslower-nd.stp
|
||||||
|
+++ b/testsuite/systemtap.examples/lwtools/fsslower-nd.stp
|
||||||
|
@@ -65,8 +65,8 @@ probe __vfs_read = kprobe.function("__vfs_read")
|
||||||
|
{
|
||||||
|
# Skip the call if new_sync_read() wouldn't be called.
|
||||||
|
file = pointer_arg(1)
|
||||||
|
- if (!file || @cast(file, "file")->f_op->read
|
||||||
|
- || !@cast(file, "file")->f_op->read_iter)
|
||||||
|
+ if (!file || @cast(file, "file", "kernel")->f_op->read
|
||||||
|
+ || !@cast(file, "file", "kernel")->f_op->read_iter)
|
||||||
|
next
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -77,8 +77,8 @@ probe __vfs_write = kprobe.function("__vfs_write")
|
||||||
|
{
|
||||||
|
# Skip the call if new_sync_write() wouldn't be called.
|
||||||
|
file = pointer_arg(1)
|
||||||
|
- if (!file || @cast(file, "file")->f_op->write
|
||||||
|
- || !@cast(file, "file")->f_op->write_iter)
|
||||||
|
+ if (!file || @cast(file, "file", "kernel")->f_op->write
|
||||||
|
+ || !@cast(file, "file", "kernel")->f_op->write_iter)
|
||||||
|
next
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -110,8 +110,8 @@ probe __vfs_read.return = kprobe.function("__vfs_read").return
|
||||||
|
{
|
||||||
|
# Skip the call if new_sync_read() wouldn't be called.
|
||||||
|
file = @entry(pointer_arg(1))
|
||||||
|
- if (!file || @cast(file, "file")->f_op->read
|
||||||
|
- || !@cast(file, "file")->f_op->read_iter)
|
||||||
|
+ if (!file || @cast(file, "file", "kernel")->f_op->read
|
||||||
|
+ || !@cast(file, "file", "kernel")->f_op->read_iter)
|
||||||
|
next
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -123,7 +123,7 @@ probe __vfs_write.return = kprobe.function("__vfs_write")
|
||||||
|
{
|
||||||
|
# Skip the call if new_sync_write() wouldn't be called.
|
||||||
|
file = pointer_arg(1)
|
||||||
|
- if (!file || @cast(file, "file")->f_op->write
|
||||||
|
- || !@cast(file, "file")->f_op->write_iter)
|
||||||
|
+ if (!file || @cast(file, "file", "kernel")->f_op->write
|
||||||
|
+ || !@cast(file, "file", "kernel")->f_op->write_iter)
|
||||||
|
next
|
||||||
|
}
|
||||||
|
|
||||||
|
commit 9eb37102d48b814821b7f474986a7bfe86784192
|
||||||
|
Author: William Cohen <wcohen@redhat.com>
|
||||||
|
Date: Wed Jun 17 13:39:20 2020 -0400
|
||||||
|
|
||||||
|
Use explicit @cast() operators for pfiles.stp and ioctl_handler.stp
|
||||||
|
|
||||||
|
Commit 00ee19ff030f665df7e087a579f39105256a0253 changed how @cast()
|
||||||
|
operations work and they no longer default to using the kernel
|
||||||
|
debuginfo for type information. Need to include kernel as location for
|
||||||
|
this information for the @cast() rather than just assuming a default.
|
||||||
|
|
||||||
|
diff --git a/testsuite/systemtap.examples/process/pfiles.stp b/testsuite/systemtap.examples/process/pfiles.stp
|
||||||
|
index d52a154..6344a4c 100755
|
||||||
|
--- a/testsuite/systemtap.examples/process/pfiles.stp
|
||||||
|
+++ b/testsuite/systemtap.examples/process/pfiles.stp
|
||||||
|
@@ -787,9 +787,9 @@ function print_unix_socket(sock) {
|
||||||
|
strlen(peername) > 0 ? peername . "\n" : "")
|
||||||
|
try { # skip line in case of null pointers
|
||||||
|
printf(" peercred pid: %d\n",
|
||||||
|
- @defined(@cast(sock, "socket")->sk->sk_peer_pid) ?
|
||||||
|
- @cast(sock, "socket")->sk->sk_peer_pid->numbers[0]->nr :
|
||||||
|
- @cast(sock, "socket")->sk->sk_peercred->pid ); } catch { }
|
||||||
|
+ @defined(@cast(sock, "socket", "kernel")->sk->sk_peer_pid) ?
|
||||||
|
+ @cast(sock, "socket", "kernel")->sk->sk_peer_pid->numbers[0]->nr :
|
||||||
|
+ @cast(sock, "socket", "kernel")->sk->sk_peercred->pid ); } catch { }
|
||||||
|
}
|
||||||
|
|
||||||
|
function print_ipv4_socket(sock) {
|
||||||
|
diff --git a/testsuite/systemtap.examples/profiling/ioctl_handler.stp b/testsuite/systemtap.examples/profiling/ioctl_handler.stp
|
||||||
|
index 7044185..6f1e52c 100755
|
||||||
|
--- a/testsuite/systemtap.examples/profiling/ioctl_handler.stp
|
||||||
|
+++ b/testsuite/systemtap.examples/profiling/ioctl_handler.stp
|
||||||
|
@@ -9,7 +9,7 @@ probe syscall.ioctl {
|
||||||
|
ioctl_requests[execname()] <<< 1
|
||||||
|
try {
|
||||||
|
# Dig down through the task struct to find the actual function handling ioctl.
|
||||||
|
- ioctl_func_address = @cast(task_current(), "struct task_struct")->files->fdt->fd[fd]->f_op->unlocked_ioctl
|
||||||
|
+ ioctl_func_address = @cast(task_current(), "struct task_struct", "kernel")->files->fdt->fd[fd]->f_op->unlocked_ioctl
|
||||||
|
if (ioctl_func_address)
|
||||||
|
ioctl_func[execname(), ioctl_func_address] <<< 1
|
||||||
|
} catch {
|
||||||
|
|
||||||
|
commit 3040d4e8ddb6a9b1d1a57a0185206498670c3f1a
|
||||||
|
Author: William Cohen <wcohen@redhat.com>
|
||||||
|
Date: Wed Jun 17 13:53:58 2020 -0400
|
||||||
|
|
||||||
|
Use explicit @cast() operators for stapgames/pingpong.stp tapset.
|
||||||
|
|
||||||
|
diff --git a/testsuite/systemtap.examples/stapgames/tapset/gmtty.stp b/testsuite/systemtap.examples/stapgames/tapset/gmtty.stp
|
||||||
|
index 026e4a9..f6ad2db 100644
|
||||||
|
--- a/testsuite/systemtap.examples/stapgames/tapset/gmtty.stp
|
||||||
|
+++ b/testsuite/systemtap.examples/stapgames/tapset/gmtty.stp
|
||||||
|
@@ -10,12 +10,12 @@ global GM_tty_ws_row, GM_tty_ws_col, GM_tty_name
|
||||||
|
# Initialize current TTY -- must be called from begin
|
||||||
|
function game_tty_init:long ()
|
||||||
|
{
|
||||||
|
- tty = @cast(task_current(), "task_struct")->signal->tty
|
||||||
|
+ tty = @cast(task_current(), "task_struct", "kernel")->signal->tty
|
||||||
|
if (tty) {
|
||||||
|
- namep = @cast(tty,"tty_struct")->name
|
||||||
|
+ namep = @cast(tty,"tty_struct", "kernel")->name
|
||||||
|
GM_tty_name = kernel_string(namep)
|
||||||
|
- GM_tty_ws_col = @cast(tty, "tty_struct")->winsize->ws_col
|
||||||
|
- GM_tty_ws_row = @cast(tty, "tty_struct")->winsize->ws_row
|
||||||
|
+ GM_tty_ws_col = @cast(tty, "tty_struct", "kernel")->winsize->ws_col
|
||||||
|
+ GM_tty_ws_row = @cast(tty, "tty_struct", "kernel")->winsize->ws_row
|
||||||
|
}
|
||||||
|
return tty
|
||||||
|
}
|
||||||
|
|
||||||
|
commit 3d922919dbe5657becf48917f1c661bf6711e956
|
||||||
|
Author: William Cohen <wcohen@redhat.com>
|
||||||
|
Date: Thu Jun 18 13:32:50 2020 -0400
|
||||||
|
|
||||||
|
Use explicit @cast() operators for periodic.stp
|
||||||
|
|
||||||
|
Commit 00ee19ff030f665df7e087a579f39105256a0253 changed how @cast()
|
||||||
|
operations work and they no longer default to using the kernel
|
||||||
|
debuginfo for type information. Need to include kernel as location for
|
||||||
|
this information for the @cast() rather than just assuming a default.
|
||||||
|
|
||||||
|
diff --git a/testsuite/systemtap.examples/profiling/periodic.stp b/testsuite/systemtap.examples/profiling/periodic.stp
|
||||||
|
index f18f183..b9052e5 100755
|
||||||
|
--- a/testsuite/systemtap.examples/profiling/periodic.stp
|
||||||
|
+++ b/testsuite/systemtap.examples/profiling/periodic.stp
|
||||||
|
@@ -18,8 +18,8 @@ probe kernel.trace("timer_expire_entry")
|
||||||
|
period[$timer] <<< elapsed
|
||||||
|
funct[$timer] = $timer->function
|
||||||
|
data[$timer] = @defined($timer->data) ? $timer->data : 0
|
||||||
|
- proc_info[$timer] = @defined($timer->data) ? 0 : @container_of($timer, "struct process_timer", timer)->task
|
||||||
|
- delayed_work_info[$timer] = @defined($timer->data) ? 0 : & @container_of($timer, "struct delayed_work", timer)
|
||||||
|
+ proc_info[$timer] = @defined($timer->data) ? 0 : @module_container_of($timer, "kernel", "struct process_timer", timer)->task
|
||||||
|
+ delayed_work_info[$timer] = @defined($timer->data) ? 0 : & @module_container_of($timer, "kernel", "struct delayed_work", timer)
|
||||||
|
}
|
||||||
|
last_expire[$timer] = new_expire
|
||||||
|
}
|
||||||
|
|
||||||
|
commit b2d18cb3afca76536506fe4992fdd6ef091ce82f
|
||||||
|
Author: William Cohen <wcohen@redhat.com>
|
||||||
|
Date: Thu Jun 18 15:01:40 2020 -0400
|
||||||
|
|
||||||
|
Use explicit @cast() operators for semop-watch.stp example.
|
||||||
|
|
||||||
|
diff --git a/testsuite/systemtap.examples/process/semop-watch.stp b/testsuite/systemtap.examples/process/semop-watch.stp
|
||||||
|
index ca2bf0a..bf1d632 100755
|
||||||
|
--- a/testsuite/systemtap.examples/process/semop-watch.stp
|
||||||
|
+++ b/testsuite/systemtap.examples/process/semop-watch.stp
|
||||||
|
@@ -3,7 +3,7 @@ global times;
|
||||||
|
|
||||||
|
probe syscall.{semop,semtimedop}
|
||||||
|
{
|
||||||
|
- sembuf_sz = @cast_sizeof("struct sembuf");
|
||||||
|
+ sembuf_sz = @cast_module_sizeof("kernel", "struct sembuf");
|
||||||
|
res = sprintf("set %d sems", semid)
|
||||||
|
|
||||||
|
%( systemtap_v < "2.3" %?
|
||||||
|
@@ -14,7 +14,7 @@ probe syscall.{semop,semtimedop}
|
||||||
|
for(i = 0; i < nsops; i++) {
|
||||||
|
offset = i * sembuf_sz;
|
||||||
|
pointer = sops_uaddr + offset;
|
||||||
|
- num_addr = & @cast(pointer, "struct sembuf")->sem_num;
|
||||||
|
+ num_addr = & @cast(pointer, "struct sembuf", "kernel")->sem_num;
|
||||||
|
num = user_short(num_addr);
|
||||||
|
|
||||||
|
res = sprintf("%s %d", res, num);
|
||||||
|
|
||||||
|
commit a948c291c9cd7320d3c9b18b5037908cbbdf70b7
|
||||||
|
Author: William Cohen <wcohen@redhat.com>
|
||||||
|
Date: Mon Jun 22 11:28:32 2020 -0400
|
||||||
|
|
||||||
|
Use explicit @cast() operators pointing to kernel for tapsets
|
||||||
|
|
||||||
|
Commit 00ee19ff030f665df7e087a579f39105256a0253 changed how @cast()
|
||||||
|
operations work and they no longer default to using the kernel
|
||||||
|
debuginfo for type information. Need to include kernel as location for
|
||||||
|
this information for the @cast() rather than just assuming a default.
|
||||||
|
|
||||||
diff --git a/tapset/linux/dentry.stp b/tapset/linux/dentry.stp
|
diff --git a/tapset/linux/dentry.stp b/tapset/linux/dentry.stp
|
||||||
index 4e73532..d148c57 100644
|
index 4e73532..d148c57 100644
|
||||||
--- a/tapset/linux/dentry.stp
|
--- a/tapset/linux/dentry.stp
|
||||||
@ -184,19 +498,34 @@ index ad3603c..9d8f57b 100644
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/tapset/linux/networking.stp b/tapset/linux/networking.stp
|
diff --git a/tapset/linux/task.stp b/tapset/linux/task.stp
|
||||||
index 69843a7..0b52cbc 100644
|
index 4afc458..b542b61 100644
|
||||||
--- a/tapset/linux/networking.stp
|
--- a/tapset/linux/task.stp
|
||||||
+++ b/tapset/linux/networking.stp
|
+++ b/tapset/linux/task.stp
|
||||||
@@ -69,7 +69,7 @@
|
@@ -40,7 +40,7 @@ function task_current:long () {
|
||||||
|
return -1;
|
||||||
/* A function that returns the device name given the net_device struct */
|
}
|
||||||
function get_netdev_name:string (addr:long) {
|
sig = @task(task)->signal;
|
||||||
- return kernel_string(@cast(addr, "net_device")->name)
|
- return @cast(sig, "signal_struct")->rlim[nd_limit]->rlim_cur;
|
||||||
+ return kernel_string(@cast(addr, "net_device", "kernel")->name)
|
+ return @cast(sig, "signal_struct", "kernel")->rlim[nd_limit]->rlim_cur;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/* sfunction task_rlimit - The current resource limit of the task
|
||||||
|
|
||||||
|
commit 403e927796c3008ad5d5fed9bd97dc7cbad424bb
|
||||||
|
Author: Martin Cermak <mcermak@redhat.com>
|
||||||
|
Date: Mon Jun 29 16:30:34 2020 +0200
|
||||||
|
|
||||||
|
PR26181: Use explicit @cast() within get_ip_from_client()
|
||||||
|
|
||||||
|
Commit 00ee19ff030f665df7e087a579f39105256a0253 changed how @cast()
|
||||||
|
operations work and they no longer default to using the kernel
|
||||||
|
debuginfo for type information. Need to include kernel as location for
|
||||||
|
this information for the @cast() rather than just assuming a default.
|
||||||
|
|
||||||
|
Also, fix the type of server_ip, which historically had been a long,
|
||||||
|
but since systemtap_v >= "4.3", it is a string.
|
||||||
|
|
||||||
diff --git a/tapset/linux/nfs_proc.stp b/tapset/linux/nfs_proc.stp
|
diff --git a/tapset/linux/nfs_proc.stp b/tapset/linux/nfs_proc.stp
|
||||||
index 8da3f6b..2579074 100644
|
index 8da3f6b..2579074 100644
|
||||||
--- a/tapset/linux/nfs_proc.stp
|
--- a/tapset/linux/nfs_proc.stp
|
||||||
@ -242,6 +571,33 @@ index 8da3f6b..2579074 100644
|
|||||||
prot = 0
|
prot = 0
|
||||||
|
|
||||||
count = 0
|
count = 0
|
||||||
|
|
||||||
|
commit f1a9bb064d11319a7eca4f4233c9edcc4a03af7e
|
||||||
|
Author: Martin Cermak <mcermak@redhat.com>
|
||||||
|
Date: Thu Jul 9 09:19:01 2020 +0200
|
||||||
|
|
||||||
|
Tapset and testsuite updates against @cast() change 00ee19ff03
|
||||||
|
|
||||||
|
Commit 00ee19ff030f665df7e087a579f39105256a0253 changed how @cast()
|
||||||
|
operations work and they no longer default to using the kernel
|
||||||
|
debuginfo for type information. Need to include kernel as location for
|
||||||
|
this information for the @cast() rather than just assuming a default.
|
||||||
|
|
||||||
|
These are respective tapset and testsuite minor updates.
|
||||||
|
|
||||||
|
diff --git a/tapset/linux/networking.stp b/tapset/linux/networking.stp
|
||||||
|
index 69843a7..0b52cbc 100644
|
||||||
|
--- a/tapset/linux/networking.stp
|
||||||
|
+++ b/tapset/linux/networking.stp
|
||||||
|
@@ -69,7 +69,7 @@
|
||||||
|
|
||||||
|
/* A function that returns the device name given the net_device struct */
|
||||||
|
function get_netdev_name:string (addr:long) {
|
||||||
|
- return kernel_string(@cast(addr, "net_device")->name)
|
||||||
|
+ return kernel_string(@cast(addr, "net_device", "kernel")->name)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
diff --git a/tapset/linux/scsi.stp b/tapset/linux/scsi.stp
|
diff --git a/tapset/linux/scsi.stp b/tapset/linux/scsi.stp
|
||||||
index 3577942..5359fe8 100644
|
index 3577942..5359fe8 100644
|
||||||
--- a/tapset/linux/scsi.stp
|
--- a/tapset/linux/scsi.stp
|
||||||
@ -257,19 +613,6 @@ index 3577942..5359fe8 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
function scsi_timer_pending:long(cmd:long)
|
function scsi_timer_pending:long(cmd:long)
|
||||||
diff --git a/tapset/linux/task.stp b/tapset/linux/task.stp
|
|
||||||
index 4afc458..b542b61 100644
|
|
||||||
--- a/tapset/linux/task.stp
|
|
||||||
+++ b/tapset/linux/task.stp
|
|
||||||
@@ -40,7 +40,7 @@ function task_current:long () {
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
sig = @task(task)->signal;
|
|
||||||
- return @cast(sig, "signal_struct")->rlim[nd_limit]->rlim_cur;
|
|
||||||
+ return @cast(sig, "signal_struct", "kernel")->rlim[nd_limit]->rlim_cur;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* sfunction task_rlimit - The current resource limit of the task
|
|
||||||
diff --git a/testsuite/buildok/pretty.stp b/testsuite/buildok/pretty.stp
|
diff --git a/testsuite/buildok/pretty.stp b/testsuite/buildok/pretty.stp
|
||||||
index 85c9cd9..a2fc781 100755
|
index 85c9cd9..a2fc781 100755
|
||||||
--- a/testsuite/buildok/pretty.stp
|
--- a/testsuite/buildok/pretty.stp
|
||||||
@ -473,164 +816,59 @@ index f53c1cd..e12f067 100644
|
|||||||
try {
|
try {
|
||||||
printf("handler: %%s (%%s)\n", usymname(handler), umodname(handler));
|
printf("handler: %%s (%%s)\n", usymname(handler), umodname(handler));
|
||||||
} catch {
|
} catch {
|
||||||
diff --git a/testsuite/systemtap.examples/general/sizeof.stp b/testsuite/systemtap.examples/general/sizeof.stp
|
|
||||||
index 0c77dce..b45f593 100755
|
|
||||||
--- a/testsuite/systemtap.examples/general/sizeof.stp
|
|
||||||
+++ b/testsuite/systemtap.examples/general/sizeof.stp
|
|
||||||
@@ -7,9 +7,11 @@
|
|
||||||
# sizeof.stp TYPENAME </usr/include/someheader.h>
|
|
||||||
|
|
||||||
probe oneshot {
|
commit c6831f14e043f88096b2219828c0124cf2549b77
|
||||||
- println("type ", @1,
|
Author: Frank Ch. Eigler <fche@redhat.com>
|
||||||
- %( $# > 1 %? " in ", @2, %) /* module or header file name */
|
Date: Thu Jul 9 21:41:51 2020 -0400
|
||||||
- " byte-size: ",
|
|
||||||
- %( $# > 1 %? @cast_module_sizeof(@2, @1) %: @cast_sizeof(@1) %)
|
|
||||||
- )
|
|
||||||
+ %( $# > 1 %?
|
|
||||||
+ printf("type %s in %s byte-size: %d\n", @1, @2,
|
|
||||||
+ @cast_module_sizeof(@2, @1))
|
|
||||||
+ %:
|
|
||||||
+ printf("type %s byte-size: %d\n", @1,
|
|
||||||
+ @cast_module_sizeof("kernel", @1))
|
|
||||||
+ %)
|
|
||||||
}
|
|
||||||
diff --git a/testsuite/systemtap.examples/lwtools/fslatency-nd.stp b/testsuite/systemtap.examples/lwtools/fslatency-nd.stp
|
|
||||||
index 6008399..0bee34f 100755
|
|
||||||
--- a/testsuite/systemtap.examples/lwtools/fslatency-nd.stp
|
|
||||||
+++ b/testsuite/systemtap.examples/lwtools/fslatency-nd.stp
|
|
||||||
@@ -63,8 +63,8 @@ probe __vfs_read = kprobe.function("__vfs_read")
|
|
||||||
{
|
|
||||||
# Skip the call if new_sync_read() wouldn't be called.
|
|
||||||
file = pointer_arg(1)
|
|
||||||
- if (!file || @cast(file, "file")->f_op->read
|
|
||||||
- || !@cast(file, "file")->f_op->read_iter)
|
|
||||||
+ if (!file || @cast(file, "file", "kernel")->f_op->read
|
|
||||||
+ || !@cast(file, "file", "kernel")->f_op->read_iter)
|
|
||||||
next
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -75,8 +75,8 @@ probe __vfs_write = kprobe.function("__vfs_write")
|
testuite: More @cast() fallout
|
||||||
{
|
|
||||||
# Skip the call if new_sync_write() wouldn't be called.
|
|
||||||
file = pointer_arg(1)
|
|
||||||
- if (!file || @cast(file, "file")->f_op->write
|
|
||||||
- || !@cast(file, "file")->f_op->write_iter)
|
|
||||||
+ if (!file || @cast(file, "file", "kernel")->f_op->write
|
|
||||||
+ || !@cast(file, "file", "kernel")->f_op->write_iter)
|
|
||||||
next
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -102,8 +102,8 @@ probe __vfs_read.return = kprobe.function("__vfs_read").return
|
Adjust another test case that uses the deprecated
|
||||||
{
|
|
||||||
# Skip the call if new_sync_read() wouldn't be called.
|
|
||||||
file = @entry(pointer_arg(1))
|
|
||||||
- if (!file || @cast(file, "file")->f_op->read
|
|
||||||
- || !@cast(file, "file")->f_op->read_iter)
|
|
||||||
+ if (!file || @cast(file, "file", "kernel")->f_op->read
|
|
||||||
+ || !@cast(file, "file", "kernel")->f_op->read_iter)
|
|
||||||
next
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -115,8 +115,8 @@ probe __vfs_write.return = kprobe.function("__vfs_write")
|
probe begin { @cast(PTR, "type") }
|
||||||
{
|
|
||||||
# Skip the call if new_sync_write() wouldn't be called.
|
|
||||||
file = pointer_arg(1)
|
|
||||||
- if (!file || @cast(file, "file")->f_op->write
|
|
||||||
- || !@cast(file, "file")->f_op->write_iter)
|
|
||||||
+ if (!file || @cast(file, "file", "kernel")->f_op->write
|
|
||||||
+ || !@cast(file, "file", "kernel")->f_op->write_iter)
|
|
||||||
next
|
|
||||||
}
|
|
||||||
|
|
||||||
diff --git a/testsuite/systemtap.examples/lwtools/fsslower-nd.stp b/testsuite/systemtap.examples/lwtools/fsslower-nd.stp
|
construct. Now "kernel" is formally required to specify context.
|
||||||
index 64abe41..90fa9b5 100755
|
|
||||||
--- a/testsuite/systemtap.examples/lwtools/fsslower-nd.stp
|
|
||||||
+++ b/testsuite/systemtap.examples/lwtools/fsslower-nd.stp
|
|
||||||
@@ -65,8 +65,8 @@ probe __vfs_read = kprobe.function("__vfs_read")
|
|
||||||
{
|
|
||||||
# Skip the call if new_sync_read() wouldn't be called.
|
|
||||||
file = pointer_arg(1)
|
|
||||||
- if (!file || @cast(file, "file")->f_op->read
|
|
||||||
- || !@cast(file, "file")->f_op->read_iter)
|
|
||||||
+ if (!file || @cast(file, "file", "kernel")->f_op->read
|
|
||||||
+ || !@cast(file, "file", "kernel")->f_op->read_iter)
|
|
||||||
next
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -77,8 +77,8 @@ probe __vfs_write = kprobe.function("__vfs_write")
|
diff --git a/testsuite/systemtap.base/cast.stp b/testsuite/systemtap.base/cast.stp
|
||||||
{
|
index cc44a36..0e191eb 100644
|
||||||
# Skip the call if new_sync_write() wouldn't be called.
|
--- a/testsuite/systemtap.base/cast.stp
|
||||||
file = pointer_arg(1)
|
+++ b/testsuite/systemtap.base/cast.stp
|
||||||
- if (!file || @cast(file, "file")->f_op->write
|
@@ -4,7 +4,7 @@ probe begin
|
||||||
- || !@cast(file, "file")->f_op->write_iter)
|
|
||||||
+ if (!file || @cast(file, "file", "kernel")->f_op->write
|
|
||||||
+ || !@cast(file, "file", "kernel")->f_op->write_iter)
|
|
||||||
next
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -110,8 +110,8 @@ probe __vfs_read.return = kprobe.function("__vfs_read").return
|
// Compare PIDs
|
||||||
{
|
pid = pid()
|
||||||
# Skip the call if new_sync_read() wouldn't be called.
|
- cast_pid = @cast(curr, "task_struct")->tgid
|
||||||
file = @entry(pointer_arg(1))
|
+ cast_pid = @cast(curr, "task_struct", "kernel")->tgid
|
||||||
- if (!file || @cast(file, "file")->f_op->read
|
if (pid == cast_pid)
|
||||||
- || !@cast(file, "file")->f_op->read_iter)
|
println("PID OK")
|
||||||
+ if (!file || @cast(file, "file", "kernel")->f_op->read
|
else
|
||||||
+ || !@cast(file, "file", "kernel")->f_op->read_iter)
|
@@ -18,7 +18,7 @@ probe begin
|
||||||
next
|
printf("PID2 %d != %d\n", pid, cast_pid)
|
||||||
}
|
|
||||||
|
|
||||||
@@ -123,7 +123,7 @@ probe __vfs_write.return = kprobe.function("__vfs_write")
|
// Compare PIDs with an array access (PR11556)
|
||||||
{
|
- cast_pid = @cast(curr, "task_struct")[0]->tgid
|
||||||
# Skip the call if new_sync_write() wouldn't be called.
|
+ cast_pid = @cast(curr, "task_struct", "kernel")[0]->tgid
|
||||||
file = pointer_arg(1)
|
if (pid == cast_pid)
|
||||||
- if (!file || @cast(file, "file")->f_op->write
|
println("PID3 OK")
|
||||||
- || !@cast(file, "file")->f_op->write_iter)
|
else
|
||||||
+ if (!file || @cast(file, "file", "kernel")->f_op->write
|
@@ -26,16 +26,16 @@ probe begin
|
||||||
+ || !@cast(file, "file", "kernel")->f_op->write_iter)
|
|
||||||
next
|
|
||||||
}
|
|
||||||
diff --git a/testsuite/systemtap.examples/process/pfiles.stp b/testsuite/systemtap.examples/process/pfiles.stp
|
|
||||||
index d52a154..6344a4c 100755
|
|
||||||
--- a/testsuite/systemtap.examples/process/pfiles.stp
|
|
||||||
+++ b/testsuite/systemtap.examples/process/pfiles.stp
|
|
||||||
@@ -787,9 +787,9 @@ function print_unix_socket(sock) {
|
|
||||||
strlen(peername) > 0 ? peername . "\n" : "")
|
|
||||||
try { # skip line in case of null pointers
|
|
||||||
printf(" peercred pid: %d\n",
|
|
||||||
- @defined(@cast(sock, "socket")->sk->sk_peer_pid) ?
|
|
||||||
- @cast(sock, "socket")->sk->sk_peer_pid->numbers[0]->nr :
|
|
||||||
- @cast(sock, "socket")->sk->sk_peercred->pid ); } catch { }
|
|
||||||
+ @defined(@cast(sock, "socket", "kernel")->sk->sk_peer_pid) ?
|
|
||||||
+ @cast(sock, "socket", "kernel")->sk->sk_peer_pid->numbers[0]->nr :
|
|
||||||
+ @cast(sock, "socket", "kernel")->sk->sk_peercred->pid ); } catch { }
|
|
||||||
}
|
|
||||||
|
|
||||||
function print_ipv4_socket(sock) {
|
// Compare execnames
|
||||||
diff --git a/testsuite/systemtap.examples/profiling/ioctl_handler.stp b/testsuite/systemtap.examples/profiling/ioctl_handler.stp
|
name = execname()
|
||||||
index 7044185..6f1e52c 100755
|
- cast_name = kernel_string(@cast(curr, "task_struct")->comm)
|
||||||
--- a/testsuite/systemtap.examples/profiling/ioctl_handler.stp
|
+ cast_name = kernel_string(@cast(curr, "task_struct", "kernel")->comm)
|
||||||
+++ b/testsuite/systemtap.examples/profiling/ioctl_handler.stp
|
if (name == cast_name)
|
||||||
@@ -9,7 +9,7 @@ probe syscall.ioctl {
|
println("execname OK")
|
||||||
ioctl_requests[execname()] <<< 1
|
else
|
||||||
try {
|
printf("execname \"%s\" != \"%s\"\n", name, cast_name)
|
||||||
# Dig down through the task struct to find the actual function handling ioctl.
|
|
||||||
- ioctl_func_address = @cast(task_current(), "struct task_struct")->files->fdt->fd[fd]->f_op->unlocked_ioctl
|
// Compare usage counter values through a struct address
|
||||||
+ ioctl_func_address = @cast(task_current(), "struct task_struct", "kernel")->files->fdt->fd[fd]->f_op->unlocked_ioctl
|
- usage = @cast(curr, "task_struct")->usage->counter
|
||||||
if (ioctl_func_address)
|
- pusage = & @cast(curr, "task_struct")->usage
|
||||||
ioctl_func[execname(), ioctl_func_address] <<< 1
|
- cast_usage = @cast(pusage, "atomic_t")->counter
|
||||||
} catch {
|
+ usage = @cast(curr, "task_struct", "kernel")->usage->counter
|
||||||
diff --git a/testsuite/systemtap.examples/profiling/periodic.stp b/testsuite/systemtap.examples/profiling/periodic.stp
|
+ pusage = & @cast(curr, "task_struct", "kernel")->usage
|
||||||
index f18f183..b9052e5 100755
|
+ cast_usage = @cast(pusage, "atomic_t", "kernel")->counter
|
||||||
--- a/testsuite/systemtap.examples/profiling/periodic.stp
|
if (usage == cast_usage)
|
||||||
+++ b/testsuite/systemtap.examples/profiling/periodic.stp
|
println("usage OK")
|
||||||
@@ -18,8 +18,8 @@ probe kernel.trace("timer_expire_entry")
|
else
|
||||||
period[$timer] <<< elapsed
|
|
||||||
funct[$timer] = $timer->function
|
|
||||||
data[$timer] = @defined($timer->data) ? $timer->data : 0
|
|
||||||
- proc_info[$timer] = @defined($timer->data) ? 0 : @container_of($timer, "struct process_timer", timer)->task
|
|
||||||
- delayed_work_info[$timer] = @defined($timer->data) ? 0 : & @container_of($timer, "struct delayed_work", timer)
|
|
||||||
+ proc_info[$timer] = @defined($timer->data) ? 0 : @module_container_of($timer, "kernel", "struct process_timer", timer)->task
|
|
||||||
+ delayed_work_info[$timer] = @defined($timer->data) ? 0 : & @module_container_of($timer, "kernel", "struct delayed_work", timer)
|
|
||||||
}
|
|
||||||
last_expire[$timer] = new_expire
|
|
||||||
}
|
|
@ -95,7 +95,7 @@
|
|||||||
|
|
||||||
Name: %{?scl_prefix}systemtap
|
Name: %{?scl_prefix}systemtap
|
||||||
Version: 4.3
|
Version: 4.3
|
||||||
Release: 6%{?dist}
|
Release: 7%{?dist}
|
||||||
# for version, see also configure.ac
|
# for version, see also configure.ac
|
||||||
|
|
||||||
|
|
||||||
@ -131,7 +131,8 @@ License: GPLv2+
|
|||||||
URL: http://sourceware.org/systemtap/
|
URL: http://sourceware.org/systemtap/
|
||||||
Source: ftp://sourceware.org/pub/systemtap/releases/systemtap-%{version}.tar.gz
|
Source: ftp://sourceware.org/pub/systemtap/releases/systemtap-%{version}.tar.gz
|
||||||
|
|
||||||
Patch10: rhbz1852021.patch
|
Patch10: rhbz1847676,1857749.patch
|
||||||
|
Patch11: rhbz1855264.patch
|
||||||
|
|
||||||
# Build*
|
# Build*
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
@ -510,6 +511,7 @@ systemtap-runtime-virthost machine to execute systemtap scripts.
|
|||||||
%setup -q -n systemtap-%{version}
|
%setup -q -n systemtap-%{version}
|
||||||
|
|
||||||
%patch10 -p1
|
%patch10 -p1
|
||||||
|
%patch11 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
|
||||||
@ -1246,6 +1248,10 @@ done
|
|||||||
|
|
||||||
# PRERELEASE
|
# PRERELEASE
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jul 28 2020 Frank Ch. Eigler <fche@redhat.com> - 4.3-7
|
||||||
|
- Fix rhbz1857749 with rhel8.3 baseos patch
|
||||||
|
- Fix rhbz1852021 with more complete rhel8.3 baseos patch
|
||||||
|
|
||||||
* Thu Jul 09 2020 Martin Cermak <mcermak@redhat.com> - 4.3-6
|
* Thu Jul 09 2020 Martin Cermak <mcermak@redhat.com> - 4.3-6
|
||||||
- Fix rhbz1852021
|
- Fix rhbz1852021
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user