[DTrace-devel] [PATCH 5/6] procfs: add 'execargs' global variable as inline

Kris Van Hees kris.van.hees at oracle.com
Tue Jan 28 06:31:46 UTC 2025


The 'execargs' global variable provides the psargs for curthread.

Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
---
 dlibs/aarch64/5.11/procfs.d | 4 ++++
 dlibs/aarch64/5.12/procfs.d | 4 ++++
 dlibs/aarch64/5.14/procfs.d | 4 ++++
 dlibs/aarch64/5.16/procfs.d | 4 ++++
 dlibs/aarch64/5.2/procfs.d  | 4 ++++
 dlibs/aarch64/5.6/procfs.d  | 4 ++++
 dlibs/aarch64/6.1/procfs.d  | 4 ++++
 dlibs/aarch64/6.10/procfs.d | 4 ++++
 dlibs/x86_64/5.11/procfs.d  | 4 ++++
 dlibs/x86_64/5.12/procfs.d  | 4 ++++
 dlibs/x86_64/5.14/procfs.d  | 4 ++++
 dlibs/x86_64/5.16/procfs.d  | 4 ++++
 dlibs/x86_64/5.2/procfs.d   | 4 ++++
 dlibs/x86_64/5.6/procfs.d   | 4 ++++
 dlibs/x86_64/6.1/procfs.d   | 4 ++++
 dlibs/x86_64/6.10/procfs.d  | 4 ++++
 libdtrace/procfs.d.in       | 4 ++++
 17 files changed, 68 insertions(+)

diff --git a/dlibs/aarch64/5.11/procfs.d b/dlibs/aarch64/5.11/procfs.d
index 70a43ddf..9c06fe1f 100644
--- a/dlibs/aarch64/5.11/procfs.d
+++ b/dlibs/aarch64/5.11/procfs.d
@@ -261,6 +261,10 @@ inline string root = d_path(&(curthread->fs->root));
 #pragma D attributes Stable/Stable/Common root
 #pragma D binding "1.0" root
 
+inline string execargs = d_execargs(curthread);
+#pragma D attributes Stable/Stable/Common root
+#pragma D binding "2.0" execargs
+
 inline int CLD_EXITED = 1;
 #pragma D binding "1.0" CLD_EXITED
 inline int CLD_KILLED = 2;
diff --git a/dlibs/aarch64/5.12/procfs.d b/dlibs/aarch64/5.12/procfs.d
index 70a43ddf..9c06fe1f 100644
--- a/dlibs/aarch64/5.12/procfs.d
+++ b/dlibs/aarch64/5.12/procfs.d
@@ -261,6 +261,10 @@ inline string root = d_path(&(curthread->fs->root));
 #pragma D attributes Stable/Stable/Common root
 #pragma D binding "1.0" root
 
+inline string execargs = d_execargs(curthread);
+#pragma D attributes Stable/Stable/Common root
+#pragma D binding "2.0" execargs
+
 inline int CLD_EXITED = 1;
 #pragma D binding "1.0" CLD_EXITED
 inline int CLD_KILLED = 2;
diff --git a/dlibs/aarch64/5.14/procfs.d b/dlibs/aarch64/5.14/procfs.d
index ef27bb70..2824d137 100644
--- a/dlibs/aarch64/5.14/procfs.d
+++ b/dlibs/aarch64/5.14/procfs.d
@@ -261,6 +261,10 @@ inline string root = d_path(&(curthread->fs->root));
 #pragma D attributes Stable/Stable/Common root
 #pragma D binding "1.0" root
 
+inline string execargs = d_execargs(curthread);
+#pragma D attributes Stable/Stable/Common root
+#pragma D binding "2.0" execargs
+
 inline int CLD_EXITED = 1;
 #pragma D binding "1.0" CLD_EXITED
 inline int CLD_KILLED = 2;
diff --git a/dlibs/aarch64/5.16/procfs.d b/dlibs/aarch64/5.16/procfs.d
index cad2d2c5..daf30745 100644
--- a/dlibs/aarch64/5.16/procfs.d
+++ b/dlibs/aarch64/5.16/procfs.d
@@ -261,6 +261,10 @@ inline string root = d_path(&(curthread->fs->root));
 #pragma D attributes Stable/Stable/Common root
 #pragma D binding "1.0" root
 
+inline string execargs = d_execargs(curthread);
+#pragma D attributes Stable/Stable/Common root
+#pragma D binding "2.0" execargs
+
 inline int CLD_EXITED = 1;
 #pragma D binding "1.0" CLD_EXITED
 inline int CLD_KILLED = 2;
diff --git a/dlibs/aarch64/5.2/procfs.d b/dlibs/aarch64/5.2/procfs.d
index 6b1b1b9c..3594e5e9 100644
--- a/dlibs/aarch64/5.2/procfs.d
+++ b/dlibs/aarch64/5.2/procfs.d
@@ -261,6 +261,10 @@ inline string root = d_path(&(curthread->fs->root));
 #pragma D attributes Stable/Stable/Common root
 #pragma D binding "1.0" root
 
+inline string execargs = d_execargs(curthread);
+#pragma D attributes Stable/Stable/Common root
+#pragma D binding "2.0" execargs
+
 inline int CLD_EXITED = 1;
 #pragma D binding "1.0" CLD_EXITED
 inline int CLD_KILLED = 2;
diff --git a/dlibs/aarch64/5.6/procfs.d b/dlibs/aarch64/5.6/procfs.d
index 70a43ddf..9c06fe1f 100644
--- a/dlibs/aarch64/5.6/procfs.d
+++ b/dlibs/aarch64/5.6/procfs.d
@@ -261,6 +261,10 @@ inline string root = d_path(&(curthread->fs->root));
 #pragma D attributes Stable/Stable/Common root
 #pragma D binding "1.0" root
 
+inline string execargs = d_execargs(curthread);
+#pragma D attributes Stable/Stable/Common root
+#pragma D binding "2.0" execargs
+
 inline int CLD_EXITED = 1;
 #pragma D binding "1.0" CLD_EXITED
 inline int CLD_KILLED = 2;
diff --git a/dlibs/aarch64/6.1/procfs.d b/dlibs/aarch64/6.1/procfs.d
index 4cb7b77c..2d52f079 100644
--- a/dlibs/aarch64/6.1/procfs.d
+++ b/dlibs/aarch64/6.1/procfs.d
@@ -261,6 +261,10 @@ inline string root = d_path(&(curthread->fs->root));
 #pragma D attributes Stable/Stable/Common root
 #pragma D binding "1.0" root
 
+inline string execargs = d_execargs(curthread);
+#pragma D attributes Stable/Stable/Common root
+#pragma D binding "2.0" execargs
+
 inline int CLD_EXITED = 1;
 #pragma D binding "1.0" CLD_EXITED
 inline int CLD_KILLED = 2;
diff --git a/dlibs/aarch64/6.10/procfs.d b/dlibs/aarch64/6.10/procfs.d
index 4cb7b77c..2d52f079 100644
--- a/dlibs/aarch64/6.10/procfs.d
+++ b/dlibs/aarch64/6.10/procfs.d
@@ -261,6 +261,10 @@ inline string root = d_path(&(curthread->fs->root));
 #pragma D attributes Stable/Stable/Common root
 #pragma D binding "1.0" root
 
+inline string execargs = d_execargs(curthread);
+#pragma D attributes Stable/Stable/Common root
+#pragma D binding "2.0" execargs
+
 inline int CLD_EXITED = 1;
 #pragma D binding "1.0" CLD_EXITED
 inline int CLD_KILLED = 2;
diff --git a/dlibs/x86_64/5.11/procfs.d b/dlibs/x86_64/5.11/procfs.d
index c2be76d8..7679db2e 100644
--- a/dlibs/x86_64/5.11/procfs.d
+++ b/dlibs/x86_64/5.11/procfs.d
@@ -261,6 +261,10 @@ inline string root = d_path(&(curthread->fs->root));
 #pragma D attributes Stable/Stable/Common root
 #pragma D binding "1.0" root
 
+inline string execargs = d_execargs(curthread);
+#pragma D attributes Stable/Stable/Common root
+#pragma D binding "2.0" execargs
+
 inline int CLD_EXITED = 1;
 #pragma D binding "1.0" CLD_EXITED
 inline int CLD_KILLED = 2;
diff --git a/dlibs/x86_64/5.12/procfs.d b/dlibs/x86_64/5.12/procfs.d
index c2be76d8..7679db2e 100644
--- a/dlibs/x86_64/5.12/procfs.d
+++ b/dlibs/x86_64/5.12/procfs.d
@@ -261,6 +261,10 @@ inline string root = d_path(&(curthread->fs->root));
 #pragma D attributes Stable/Stable/Common root
 #pragma D binding "1.0" root
 
+inline string execargs = d_execargs(curthread);
+#pragma D attributes Stable/Stable/Common root
+#pragma D binding "2.0" execargs
+
 inline int CLD_EXITED = 1;
 #pragma D binding "1.0" CLD_EXITED
 inline int CLD_KILLED = 2;
diff --git a/dlibs/x86_64/5.14/procfs.d b/dlibs/x86_64/5.14/procfs.d
index 28fada6d..3a348ebc 100644
--- a/dlibs/x86_64/5.14/procfs.d
+++ b/dlibs/x86_64/5.14/procfs.d
@@ -261,6 +261,10 @@ inline string root = d_path(&(curthread->fs->root));
 #pragma D attributes Stable/Stable/Common root
 #pragma D binding "1.0" root
 
+inline string execargs = d_execargs(curthread);
+#pragma D attributes Stable/Stable/Common root
+#pragma D binding "2.0" execargs
+
 inline int CLD_EXITED = 1;
 #pragma D binding "1.0" CLD_EXITED
 inline int CLD_KILLED = 2;
diff --git a/dlibs/x86_64/5.16/procfs.d b/dlibs/x86_64/5.16/procfs.d
index cad2d2c5..daf30745 100644
--- a/dlibs/x86_64/5.16/procfs.d
+++ b/dlibs/x86_64/5.16/procfs.d
@@ -261,6 +261,10 @@ inline string root = d_path(&(curthread->fs->root));
 #pragma D attributes Stable/Stable/Common root
 #pragma D binding "1.0" root
 
+inline string execargs = d_execargs(curthread);
+#pragma D attributes Stable/Stable/Common root
+#pragma D binding "2.0" execargs
+
 inline int CLD_EXITED = 1;
 #pragma D binding "1.0" CLD_EXITED
 inline int CLD_KILLED = 2;
diff --git a/dlibs/x86_64/5.2/procfs.d b/dlibs/x86_64/5.2/procfs.d
index 08696cf7..6ad926ee 100644
--- a/dlibs/x86_64/5.2/procfs.d
+++ b/dlibs/x86_64/5.2/procfs.d
@@ -261,6 +261,10 @@ inline string root = d_path(&(curthread->fs->root));
 #pragma D attributes Stable/Stable/Common root
 #pragma D binding "1.0" root
 
+inline string execargs = d_execargs(curthread);
+#pragma D attributes Stable/Stable/Common root
+#pragma D binding "2.0" execargs
+
 inline int CLD_EXITED = 1;
 #pragma D binding "1.0" CLD_EXITED
 inline int CLD_KILLED = 2;
diff --git a/dlibs/x86_64/5.6/procfs.d b/dlibs/x86_64/5.6/procfs.d
index c2be76d8..7679db2e 100644
--- a/dlibs/x86_64/5.6/procfs.d
+++ b/dlibs/x86_64/5.6/procfs.d
@@ -261,6 +261,10 @@ inline string root = d_path(&(curthread->fs->root));
 #pragma D attributes Stable/Stable/Common root
 #pragma D binding "1.0" root
 
+inline string execargs = d_execargs(curthread);
+#pragma D attributes Stable/Stable/Common root
+#pragma D binding "2.0" execargs
+
 inline int CLD_EXITED = 1;
 #pragma D binding "1.0" CLD_EXITED
 inline int CLD_KILLED = 2;
diff --git a/dlibs/x86_64/6.1/procfs.d b/dlibs/x86_64/6.1/procfs.d
index 4cb7b77c..2d52f079 100644
--- a/dlibs/x86_64/6.1/procfs.d
+++ b/dlibs/x86_64/6.1/procfs.d
@@ -261,6 +261,10 @@ inline string root = d_path(&(curthread->fs->root));
 #pragma D attributes Stable/Stable/Common root
 #pragma D binding "1.0" root
 
+inline string execargs = d_execargs(curthread);
+#pragma D attributes Stable/Stable/Common root
+#pragma D binding "2.0" execargs
+
 inline int CLD_EXITED = 1;
 #pragma D binding "1.0" CLD_EXITED
 inline int CLD_KILLED = 2;
diff --git a/dlibs/x86_64/6.10/procfs.d b/dlibs/x86_64/6.10/procfs.d
index 4cb7b77c..2d52f079 100644
--- a/dlibs/x86_64/6.10/procfs.d
+++ b/dlibs/x86_64/6.10/procfs.d
@@ -261,6 +261,10 @@ inline string root = d_path(&(curthread->fs->root));
 #pragma D attributes Stable/Stable/Common root
 #pragma D binding "1.0" root
 
+inline string execargs = d_execargs(curthread);
+#pragma D attributes Stable/Stable/Common root
+#pragma D binding "2.0" execargs
+
 inline int CLD_EXITED = 1;
 #pragma D binding "1.0" CLD_EXITED
 inline int CLD_KILLED = 2;
diff --git a/libdtrace/procfs.d.in b/libdtrace/procfs.d.in
index e9d50349..827d6b81 100644
--- a/libdtrace/procfs.d.in
+++ b/libdtrace/procfs.d.in
@@ -307,6 +307,10 @@ inline string root = d_path(&(curthread->fs->root));
 #pragma D attributes Stable/Stable/Common root
 #pragma D binding "1.0" root
 
+inline string execargs = d_execargs(curthread);
+#pragma D attributes Stable/Stable/Common root
+#pragma D binding "2.0" execargs
+
 inline int CLD_EXITED = 1;
 #pragma D binding "1.0" CLD_EXITED
 inline int CLD_KILLED = 2;
-- 
2.45.2




More information about the DTrace-devel mailing list