[DTrace-devel] [PATCH 6/6] procfs: populate pr_argc, pr_argv, and pr_envp with default values

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


The pr_argc, pr_argv, and pr_envp fields in psinfo are not implemented
yet, so it makes sense to set them to 0 rather than not providing any
translator for them.

Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
---
 dlibs/aarch64/5.11/procfs.d                       | 8 +++-----
 dlibs/aarch64/5.12/procfs.d                       | 8 +++-----
 dlibs/aarch64/5.14/procfs.d                       | 8 +++-----
 dlibs/aarch64/5.16/procfs.d                       | 8 +++-----
 dlibs/aarch64/5.2/procfs.d                        | 8 +++-----
 dlibs/aarch64/5.6/procfs.d                        | 8 +++-----
 dlibs/aarch64/6.1/procfs.d                        | 8 +++-----
 dlibs/aarch64/6.10/procfs.d                       | 8 +++-----
 dlibs/x86_64/5.11/procfs.d                        | 8 +++-----
 dlibs/x86_64/5.12/procfs.d                        | 8 +++-----
 dlibs/x86_64/5.14/procfs.d                        | 8 +++-----
 dlibs/x86_64/5.16/procfs.d                        | 8 +++-----
 dlibs/x86_64/5.2/procfs.d                         | 8 +++-----
 dlibs/x86_64/5.6/procfs.d                         | 8 +++-----
 dlibs/x86_64/6.1/procfs.d                         | 8 +++-----
 dlibs/x86_64/6.10/procfs.d                        | 8 +++-----
 libdtrace/procfs.d.in                             | 8 +++-----
 test/unittest/builtinvar/tst.psinfo-bug21974606.d | 1 -
 test/unittest/builtinvar/tst.psinfo-bug22561297.d | 4 +---
 test/unittest/builtinvar/tst.psinfo1.d            | 1 -
 20 files changed, 52 insertions(+), 90 deletions(-)

diff --git a/dlibs/aarch64/5.11/procfs.d b/dlibs/aarch64/5.11/procfs.d
index 9c06fe1f..52b2bbe2 100644
--- a/dlibs/aarch64/5.11/procfs.d
+++ b/dlibs/aarch64/5.11/procfs.d
@@ -143,11 +143,9 @@ translator psinfo_t < struct task_struct *T > {
 	pr_fname = T->comm;
 	pr_psargs = d_execargs(T);
 	pr_wstat = 0;
-/*
-	pr_argc = get_psinfo(T)->__psinfo(argc);
-	pr_argv = (uintptr_t)get_psinfo(T)->__psinfo(argv);
-	pr_envp = (uintptr_t)get_psinfo(T)->__psinfo(envp);
- */
+	pr_argc = 0;			/* Not implemented yet. */
+	pr_argv = 0;			/* Not implemented yet. */
+	pr_envp = 0;			/* Not implemented yet. */
 
 	pr_dmodel = PR_MODEL_LP64;
 
diff --git a/dlibs/aarch64/5.12/procfs.d b/dlibs/aarch64/5.12/procfs.d
index 9c06fe1f..52b2bbe2 100644
--- a/dlibs/aarch64/5.12/procfs.d
+++ b/dlibs/aarch64/5.12/procfs.d
@@ -143,11 +143,9 @@ translator psinfo_t < struct task_struct *T > {
 	pr_fname = T->comm;
 	pr_psargs = d_execargs(T);
 	pr_wstat = 0;
-/*
-	pr_argc = get_psinfo(T)->__psinfo(argc);
-	pr_argv = (uintptr_t)get_psinfo(T)->__psinfo(argv);
-	pr_envp = (uintptr_t)get_psinfo(T)->__psinfo(envp);
- */
+	pr_argc = 0;			/* Not implemented yet. */
+	pr_argv = 0;			/* Not implemented yet. */
+	pr_envp = 0;			/* Not implemented yet. */
 
 	pr_dmodel = PR_MODEL_LP64;
 
diff --git a/dlibs/aarch64/5.14/procfs.d b/dlibs/aarch64/5.14/procfs.d
index 2824d137..8c05e299 100644
--- a/dlibs/aarch64/5.14/procfs.d
+++ b/dlibs/aarch64/5.14/procfs.d
@@ -143,11 +143,9 @@ translator psinfo_t < struct task_struct *T > {
 	pr_fname = T->comm;
 	pr_psargs = d_execargs(T);
 	pr_wstat = 0;
-/*
-	pr_argc = get_psinfo(T)->__psinfo(argc);
-	pr_argv = (uintptr_t)get_psinfo(T)->__psinfo(argv);
-	pr_envp = (uintptr_t)get_psinfo(T)->__psinfo(envp);
- */
+	pr_argc = 0;			/* Not implemented yet. */
+	pr_argv = 0;			/* Not implemented yet. */
+	pr_envp = 0;			/* Not implemented yet. */
 
 	pr_dmodel = PR_MODEL_LP64;
 
diff --git a/dlibs/aarch64/5.16/procfs.d b/dlibs/aarch64/5.16/procfs.d
index daf30745..e52ab29a 100644
--- a/dlibs/aarch64/5.16/procfs.d
+++ b/dlibs/aarch64/5.16/procfs.d
@@ -143,11 +143,9 @@ translator psinfo_t < struct task_struct *T > {
 	pr_fname = T->comm;
 	pr_psargs = d_execargs(T);
 	pr_wstat = 0;
-/*
-	pr_argc = get_psinfo(T)->__psinfo(argc);
-	pr_argv = (uintptr_t)get_psinfo(T)->__psinfo(argv);
-	pr_envp = (uintptr_t)get_psinfo(T)->__psinfo(envp);
- */
+	pr_argc = 0;			/* Not implemented yet. */
+	pr_argv = 0;			/* Not implemented yet. */
+	pr_envp = 0;			/* Not implemented yet. */
 
 	pr_dmodel = PR_MODEL_LP64;
 
diff --git a/dlibs/aarch64/5.2/procfs.d b/dlibs/aarch64/5.2/procfs.d
index 3594e5e9..4a95dfd1 100644
--- a/dlibs/aarch64/5.2/procfs.d
+++ b/dlibs/aarch64/5.2/procfs.d
@@ -143,11 +143,9 @@ translator psinfo_t < struct task_struct *T > {
 	pr_fname = T->comm;
 	pr_psargs = d_execargs(T);
 	pr_wstat = 0;
-/*
-	pr_argc = get_psinfo(T)->__psinfo(argc);
-	pr_argv = (uintptr_t)get_psinfo(T)->__psinfo(argv);
-	pr_envp = (uintptr_t)get_psinfo(T)->__psinfo(envp);
- */
+	pr_argc = 0;			/* Not implemented yet. */
+	pr_argv = 0;			/* Not implemented yet. */
+	pr_envp = 0;			/* Not implemented yet. */
 
 	pr_dmodel = PR_MODEL_LP64;
 
diff --git a/dlibs/aarch64/5.6/procfs.d b/dlibs/aarch64/5.6/procfs.d
index 9c06fe1f..52b2bbe2 100644
--- a/dlibs/aarch64/5.6/procfs.d
+++ b/dlibs/aarch64/5.6/procfs.d
@@ -143,11 +143,9 @@ translator psinfo_t < struct task_struct *T > {
 	pr_fname = T->comm;
 	pr_psargs = d_execargs(T);
 	pr_wstat = 0;
-/*
-	pr_argc = get_psinfo(T)->__psinfo(argc);
-	pr_argv = (uintptr_t)get_psinfo(T)->__psinfo(argv);
-	pr_envp = (uintptr_t)get_psinfo(T)->__psinfo(envp);
- */
+	pr_argc = 0;			/* Not implemented yet. */
+	pr_argv = 0;			/* Not implemented yet. */
+	pr_envp = 0;			/* Not implemented yet. */
 
 	pr_dmodel = PR_MODEL_LP64;
 
diff --git a/dlibs/aarch64/6.1/procfs.d b/dlibs/aarch64/6.1/procfs.d
index 2d52f079..4881aa5b 100644
--- a/dlibs/aarch64/6.1/procfs.d
+++ b/dlibs/aarch64/6.1/procfs.d
@@ -143,11 +143,9 @@ translator psinfo_t < struct task_struct *T > {
 	pr_fname = T->comm;
 	pr_psargs = d_execargs(T);
 	pr_wstat = 0;
-/*
-	pr_argc = get_psinfo(T)->__psinfo(argc);
-	pr_argv = (uintptr_t)get_psinfo(T)->__psinfo(argv);
-	pr_envp = (uintptr_t)get_psinfo(T)->__psinfo(envp);
- */
+	pr_argc = 0;			/* Not implemented yet. */
+	pr_argv = 0;			/* Not implemented yet. */
+	pr_envp = 0;			/* Not implemented yet. */
 
 	pr_dmodel = PR_MODEL_LP64;
 
diff --git a/dlibs/aarch64/6.10/procfs.d b/dlibs/aarch64/6.10/procfs.d
index 2d52f079..4881aa5b 100644
--- a/dlibs/aarch64/6.10/procfs.d
+++ b/dlibs/aarch64/6.10/procfs.d
@@ -143,11 +143,9 @@ translator psinfo_t < struct task_struct *T > {
 	pr_fname = T->comm;
 	pr_psargs = d_execargs(T);
 	pr_wstat = 0;
-/*
-	pr_argc = get_psinfo(T)->__psinfo(argc);
-	pr_argv = (uintptr_t)get_psinfo(T)->__psinfo(argv);
-	pr_envp = (uintptr_t)get_psinfo(T)->__psinfo(envp);
- */
+	pr_argc = 0;			/* Not implemented yet. */
+	pr_argv = 0;			/* Not implemented yet. */
+	pr_envp = 0;			/* Not implemented yet. */
 
 	pr_dmodel = PR_MODEL_LP64;
 
diff --git a/dlibs/x86_64/5.11/procfs.d b/dlibs/x86_64/5.11/procfs.d
index 7679db2e..96e55dc1 100644
--- a/dlibs/x86_64/5.11/procfs.d
+++ b/dlibs/x86_64/5.11/procfs.d
@@ -143,11 +143,9 @@ translator psinfo_t < struct task_struct *T > {
 	pr_fname = T->comm;
 	pr_psargs = d_execargs(T);
 	pr_wstat = 0;
-/*
-	pr_argc = get_psinfo(T)->__psinfo(argc);
-	pr_argv = (uintptr_t)get_psinfo(T)->__psinfo(argv);
-	pr_envp = (uintptr_t)get_psinfo(T)->__psinfo(envp);
- */
+	pr_argc = 0;			/* Not implemented yet. */
+	pr_argv = 0;			/* Not implemented yet. */
+	pr_envp = 0;			/* Not implemented yet. */
 
 	pr_dmodel = PR_MODEL_LP64;
 
diff --git a/dlibs/x86_64/5.12/procfs.d b/dlibs/x86_64/5.12/procfs.d
index 7679db2e..96e55dc1 100644
--- a/dlibs/x86_64/5.12/procfs.d
+++ b/dlibs/x86_64/5.12/procfs.d
@@ -143,11 +143,9 @@ translator psinfo_t < struct task_struct *T > {
 	pr_fname = T->comm;
 	pr_psargs = d_execargs(T);
 	pr_wstat = 0;
-/*
-	pr_argc = get_psinfo(T)->__psinfo(argc);
-	pr_argv = (uintptr_t)get_psinfo(T)->__psinfo(argv);
-	pr_envp = (uintptr_t)get_psinfo(T)->__psinfo(envp);
- */
+	pr_argc = 0;			/* Not implemented yet. */
+	pr_argv = 0;			/* Not implemented yet. */
+	pr_envp = 0;			/* Not implemented yet. */
 
 	pr_dmodel = PR_MODEL_LP64;
 
diff --git a/dlibs/x86_64/5.14/procfs.d b/dlibs/x86_64/5.14/procfs.d
index 3a348ebc..8dbf3c01 100644
--- a/dlibs/x86_64/5.14/procfs.d
+++ b/dlibs/x86_64/5.14/procfs.d
@@ -143,11 +143,9 @@ translator psinfo_t < struct task_struct *T > {
 	pr_fname = T->comm;
 	pr_psargs = d_execargs(T);
 	pr_wstat = 0;
-/*
-	pr_argc = get_psinfo(T)->__psinfo(argc);
-	pr_argv = (uintptr_t)get_psinfo(T)->__psinfo(argv);
-	pr_envp = (uintptr_t)get_psinfo(T)->__psinfo(envp);
- */
+	pr_argc = 0;			/* Not implemented yet. */
+	pr_argv = 0;			/* Not implemented yet. */
+	pr_envp = 0;			/* Not implemented yet. */
 
 	pr_dmodel = PR_MODEL_LP64;
 
diff --git a/dlibs/x86_64/5.16/procfs.d b/dlibs/x86_64/5.16/procfs.d
index daf30745..e52ab29a 100644
--- a/dlibs/x86_64/5.16/procfs.d
+++ b/dlibs/x86_64/5.16/procfs.d
@@ -143,11 +143,9 @@ translator psinfo_t < struct task_struct *T > {
 	pr_fname = T->comm;
 	pr_psargs = d_execargs(T);
 	pr_wstat = 0;
-/*
-	pr_argc = get_psinfo(T)->__psinfo(argc);
-	pr_argv = (uintptr_t)get_psinfo(T)->__psinfo(argv);
-	pr_envp = (uintptr_t)get_psinfo(T)->__psinfo(envp);
- */
+	pr_argc = 0;			/* Not implemented yet. */
+	pr_argv = 0;			/* Not implemented yet. */
+	pr_envp = 0;			/* Not implemented yet. */
 
 	pr_dmodel = PR_MODEL_LP64;
 
diff --git a/dlibs/x86_64/5.2/procfs.d b/dlibs/x86_64/5.2/procfs.d
index 6ad926ee..23e05c2c 100644
--- a/dlibs/x86_64/5.2/procfs.d
+++ b/dlibs/x86_64/5.2/procfs.d
@@ -143,11 +143,9 @@ translator psinfo_t < struct task_struct *T > {
 	pr_fname = T->comm;
 	pr_psargs = d_execargs(T);
 	pr_wstat = 0;
-/*
-	pr_argc = get_psinfo(T)->__psinfo(argc);
-	pr_argv = (uintptr_t)get_psinfo(T)->__psinfo(argv);
-	pr_envp = (uintptr_t)get_psinfo(T)->__psinfo(envp);
- */
+	pr_argc = 0;			/* Not implemented yet. */
+	pr_argv = 0;			/* Not implemented yet. */
+	pr_envp = 0;			/* Not implemented yet. */
 
 	pr_dmodel = PR_MODEL_LP64;
 
diff --git a/dlibs/x86_64/5.6/procfs.d b/dlibs/x86_64/5.6/procfs.d
index 7679db2e..96e55dc1 100644
--- a/dlibs/x86_64/5.6/procfs.d
+++ b/dlibs/x86_64/5.6/procfs.d
@@ -143,11 +143,9 @@ translator psinfo_t < struct task_struct *T > {
 	pr_fname = T->comm;
 	pr_psargs = d_execargs(T);
 	pr_wstat = 0;
-/*
-	pr_argc = get_psinfo(T)->__psinfo(argc);
-	pr_argv = (uintptr_t)get_psinfo(T)->__psinfo(argv);
-	pr_envp = (uintptr_t)get_psinfo(T)->__psinfo(envp);
- */
+	pr_argc = 0;			/* Not implemented yet. */
+	pr_argv = 0;			/* Not implemented yet. */
+	pr_envp = 0;			/* Not implemented yet. */
 
 	pr_dmodel = PR_MODEL_LP64;
 
diff --git a/dlibs/x86_64/6.1/procfs.d b/dlibs/x86_64/6.1/procfs.d
index 2d52f079..4881aa5b 100644
--- a/dlibs/x86_64/6.1/procfs.d
+++ b/dlibs/x86_64/6.1/procfs.d
@@ -143,11 +143,9 @@ translator psinfo_t < struct task_struct *T > {
 	pr_fname = T->comm;
 	pr_psargs = d_execargs(T);
 	pr_wstat = 0;
-/*
-	pr_argc = get_psinfo(T)->__psinfo(argc);
-	pr_argv = (uintptr_t)get_psinfo(T)->__psinfo(argv);
-	pr_envp = (uintptr_t)get_psinfo(T)->__psinfo(envp);
- */
+	pr_argc = 0;			/* Not implemented yet. */
+	pr_argv = 0;			/* Not implemented yet. */
+	pr_envp = 0;			/* Not implemented yet. */
 
 	pr_dmodel = PR_MODEL_LP64;
 
diff --git a/dlibs/x86_64/6.10/procfs.d b/dlibs/x86_64/6.10/procfs.d
index 2d52f079..4881aa5b 100644
--- a/dlibs/x86_64/6.10/procfs.d
+++ b/dlibs/x86_64/6.10/procfs.d
@@ -143,11 +143,9 @@ translator psinfo_t < struct task_struct *T > {
 	pr_fname = T->comm;
 	pr_psargs = d_execargs(T);
 	pr_wstat = 0;
-/*
-	pr_argc = get_psinfo(T)->__psinfo(argc);
-	pr_argv = (uintptr_t)get_psinfo(T)->__psinfo(argv);
-	pr_envp = (uintptr_t)get_psinfo(T)->__psinfo(envp);
- */
+	pr_argc = 0;			/* Not implemented yet. */
+	pr_argv = 0;			/* Not implemented yet. */
+	pr_envp = 0;			/* Not implemented yet. */
 
 	pr_dmodel = PR_MODEL_LP64;
 
diff --git a/libdtrace/procfs.d.in b/libdtrace/procfs.d.in
index 827d6b81..d4433be4 100644
--- a/libdtrace/procfs.d.in
+++ b/libdtrace/procfs.d.in
@@ -181,11 +181,9 @@ translator psinfo_t < struct task_struct *T > {
 	pr_fname = T->comm;
 	pr_psargs = d_execargs(T);
 	pr_wstat = 0;
-/*
-	pr_argc = get_psinfo(T)->__psinfo(argc);
-	pr_argv = (uintptr_t)get_psinfo(T)->__psinfo(argv);
-	pr_envp = (uintptr_t)get_psinfo(T)->__psinfo(envp);
- */
+	pr_argc = 0;			/* not implemented yet */
+	pr_argv = 0;			/* not implemented yet */
+	pr_envp = 0;			/* not implemented yet */
 
 	pr_dmodel = PR_MODEL_LP64;
 
diff --git a/test/unittest/builtinvar/tst.psinfo-bug21974606.d b/test/unittest/builtinvar/tst.psinfo-bug21974606.d
index 68d9503d..03857e83 100644
--- a/test/unittest/builtinvar/tst.psinfo-bug21974606.d
+++ b/test/unittest/builtinvar/tst.psinfo-bug21974606.d
@@ -4,7 +4,6 @@
  * Licensed under the Universal Permissive License v 1.0 as shown at
  * http://oss.oracle.com/licenses/upl.
  */
-/* @@xfail: dtv2 */
 
 /*
  * ASSERTION:
diff --git a/test/unittest/builtinvar/tst.psinfo-bug22561297.d b/test/unittest/builtinvar/tst.psinfo-bug22561297.d
index b9efd0ec..ffccf469 100644
--- a/test/unittest/builtinvar/tst.psinfo-bug22561297.d
+++ b/test/unittest/builtinvar/tst.psinfo-bug22561297.d
@@ -4,11 +4,9 @@
  * Licensed under the Universal Permissive License v 1.0 as shown at
  * http://oss.oracle.com/licenses/upl.
  */
-/* @@xfail: dtv2 */
 
 /*
- * ASSERTION:
- * To print psinfo structure values from profile.
+ * ASSERTION: To print psinfo structure values from profile.
  *
  * SECTION: Variables/Built-in Variables
  */
diff --git a/test/unittest/builtinvar/tst.psinfo1.d b/test/unittest/builtinvar/tst.psinfo1.d
index 9e6d5053..7c451598 100644
--- a/test/unittest/builtinvar/tst.psinfo1.d
+++ b/test/unittest/builtinvar/tst.psinfo1.d
@@ -4,7 +4,6 @@
  * Licensed under the Universal Permissive License v 1.0 as shown at
  * http://oss.oracle.com/licenses/upl.
  */
-/* @@xfail: dtv2 */
 
 /*
  * ASSERTION:
-- 
2.45.2




More information about the DTrace-devel mailing list