Re: [PATCH v6 2/2] tr2: log parent process name
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Aug 2, 2021, 12:45 UTC
- Message-ID
- <877dh4ovyl.fsf@evledraar.gmail.com>
- In-Reply-To
- <87r1fcp4gy.fsf@evledraar.gmail.com>
On Mon, Aug 02 2021, Ævar Arnfjörð Bjarmason wrote:
Show 29 quoted lines
> On Wed, Jul 21 2021, Emily Shaffer wrote:
>
>> +`"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.
>
>> + /*
>> + * 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.
Show 10 quoted lines
> [...] >> [...] >> + /* >> + * 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.