From f2c21d78cecc86390b2bc16e111f1424f0f76630 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Fri, 30 Mar 2018 11:04:11 +0100 Subject: add capture file version check --- systemtap/src/ioriot.stp | 14 +++++++++----- systemtap/src/javaioriot.stp | 14 +++++++++----- systemtap/src/targetedioriot.stp | 14 +++++++++----- 3 files changed, 27 insertions(+), 15 deletions(-) (limited to 'systemtap/src') diff --git a/systemtap/src/ioriot.stp b/systemtap/src/ioriot.stp index 4029ebb..ee77263 100644 --- a/systemtap/src/ioriot.stp +++ b/systemtap/src/ioriot.stp @@ -71,6 +71,15 @@ function absolute_path (path) { return task_dentry_path(tc, pwd_dentry, pwd_mnt) . "/" . path; } +# Stop probing after 1h (for safety) +probe timer.s(3600) { + exit(); +} + +probe begin { + printf("#|capture_version=%d|\n", 2); +} + probe syscall.open.return, syscall.openat.return { if (execname() != "stapio") { pathname = user_string(@entry($filename)) @@ -597,9 +606,4 @@ probe syscall.exit_group { } } -# Stop probing after 1h (for safety) -probe timer.s(3600) { - exit(); -} - # vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 diff --git a/systemtap/src/javaioriot.stp b/systemtap/src/javaioriot.stp index 945ecf6..b0e960c 100644 --- a/systemtap/src/javaioriot.stp +++ b/systemtap/src/javaioriot.stp @@ -71,6 +71,15 @@ function absolute_path (path) { return task_dentry_path(tc, pwd_dentry, pwd_mnt) . "/" . path; } +# Stop probing after 1h (for safety) +probe timer.s(3600) { + exit(); +} + +probe begin { + printf("#|capture_version=%d|\n", 2); +} + probe syscall.open.return, syscall.openat.return { if (execname() == "java") { pathname = user_string(@entry($filename)) @@ -597,9 +606,4 @@ probe syscall.exit_group { } } -# Stop probing after 1h (for safety) -probe timer.s(3600) { - exit(); -} - # vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 diff --git a/systemtap/src/targetedioriot.stp b/systemtap/src/targetedioriot.stp index ee3ee7a..539b826 100644 --- a/systemtap/src/targetedioriot.stp +++ b/systemtap/src/targetedioriot.stp @@ -71,6 +71,15 @@ function absolute_path (path) { return task_dentry_path(tc, pwd_dentry, pwd_mnt) . "/" . path; } +# Stop probing after 1h (for safety) +probe timer.s(3600) { + exit(); +} + +probe begin { + printf("#|capture_version=%d|\n", 2); +} + probe syscall.open.return, syscall.openat.return { if (pid() == target()) { pathname = user_string(@entry($filename)) @@ -597,9 +606,4 @@ probe syscall.exit_group { } } -# Stop probing after 1h (for safety) -probe timer.s(3600) { - exit(); -} - # vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 -- cgit v1.2.3