Thread (73 messages) 73 messages, 7 authors, 2021-08-31

Re: [PATCH v6 2/2] tr2: log parent process name

From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2021-08-02 12:46:47

On Mon, Aug 02 2021, Ævar Arnfjörð Bjarmason wrote:
On Wed, Jul 21 2021, Emily Shaffer wrote:
quoted
+`"cmd_ancestry"`::
+	This event contains the text command name for the parent (and earlier
+	generations of parents) of the current process, in an array ordered from
+	nearest parent to furthest great-grandparent. It may not be implemented
+	on all platforms.
++
+------------
+{
+	"event":"cmd_ancestry",
+	...
+	"ancestry":["bash","tmux: server","systemd"]
+}
+------------
+
Okey, so because of later NEEDSWORK no system that runs systemd will
currrently have output like this, just Windows.
quoted
+	/*
+	 * NEEDSWORK: We could gather the entire pstree into an array to match
+	 * functionality with compat/win32/trace2_win32_process_info.c.
+	 * To do so, we may want to examine /proc/<pid>/stat. For now, just
+	 * gather the immediate parent name which is readily accessible from
+	 * /proc/$(getppid())/comm.
+	 */
This comment:
To clarify, this was ment to be continued with "seems to remove the
need..." below. But I later inserted the commentery about switch/case
in-between, which made that unclear.
[...]
quoted
[...]
+		/*
+		 * NEEDSWORK: we could do the entire ptree in an array instead,
+		 * see compat/win32/trace2_win32_process_info.c.
+		 */
Seems to remove the need for this comment, i.e. we comment on this
limitation of linux-specific get_ancestry_names twice, both in the
function and its caller.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help