--- v3
+++ v1
@@ -1,46 +1,28 @@
-A hopefully final re-roll with minor commit message changes. Thanks
-everyone for the reviews!
+The just-landed 6f64eeab605 (Merge branch
+'es/trace2-log-parent-process-name', 2021-08-24) added parent process
+name logging, but under Linux we'd only log the immediate parent, and
+the full process chain on Windows.
+
+This brings the Linux implementation in parity with the Windows
+implementation. As it turns out /proc/<PID>/stat is a bit of a pain to
+parse.
+
+This is preceded by some minor memory leak fixes to
+es/trace2-log-parent-process-name, and the fixing of a bug where we'd
+log the empty string as a parent if we didn't have procfs.
Ævar Arnfjörð Bjarmason (6):
tr2: remove NEEDSWORK comment for "non-procfs" implementations
tr2: clarify TRACE2_PROCESS_INFO_EXIT comment under Linux
tr2: stop leaking "thread_name" memory
- tr2: leave the parent list empty upon failure & don't leak memory
+ tr2: fix memory leak & logic error in 2f732bf15e6
tr2: do compiler enum check in trace2_collect_process_info()
tr2: log N parent process names on Linux
- compat/linux/procinfo.c | 169 ++++++++++++++++++++++++++++++++++------
+ compat/linux/procinfo.c | 151 +++++++++++++++++++++++++++++++++-------
trace2/tr2_tls.c | 1 +
- 2 files changed, 146 insertions(+), 24 deletions(-)
+ 2 files changed, 128 insertions(+), 24 deletions(-)
-Range-diff against v2:
-1: 8c649ce3b4 = 1: 306f14a0f7 tr2: remove NEEDSWORK comment for "non-procfs" implementations
-2: 0150e3402a = 2: a999e016a9 tr2: clarify TRACE2_PROCESS_INFO_EXIT comment under Linux
-3: 1d835d6767 = 3: 45769da953 tr2: stop leaking "thread_name" memory
-4: 1aa0dbc394 ! 4: 946140691f tr2: fix memory leak & logic error in 2f732bf15e6
- @@ Metadata
- Author: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
-
- ## Commit message ##
- - tr2: fix memory leak & logic error in 2f732bf15e6
- + tr2: leave the parent list empty upon failure & don't leak memory
-
- In a subsequent commit I'll be replacing most of this code to log N
- parents, but let's first fix bugs introduced in the recent
- @@ Commit message
- system where we could read the file from procfs.
-
- Let's move all the freeing of the memory to the end of the
- - function. If we're still at STRBUF_INIT with "name" due to not haven
- + function. If we're still at STRBUF_INIT with "name" due to not having
- taken the branch where the strbuf_read_file() succeeds freeing it is
- - redundant, so we could move it into the body of the "if", but just
- + redundant. So we could move it into the body of the "if", but just
- handling freeing the same way for all branches of the function makes
- it more readable.
-
-5: 70fef093d8 = 5: 0bea5aa9c9 tr2: do compiler enum check in trace2_collect_process_info()
-6: f6aac90248 = 6: 6eac9986c3 tr2: log N parent process names on Linux
--
-2.33.0.736.g68690aaec9a
+2.33.0.733.ga72a4f1c2e1