<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/trace2, branch v2.34.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.34.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.34.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2021-11-12T23:29:25Z</updated>
<entry>
<title>Merge branch 'js/trace2-raise-format-version'</title>
<updated>2021-11-12T23:29:25Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-11-12T23:29:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5a73c6bdc717127c2da99f57bc630c4efd8aed02'/>
<id>urn:sha1:5a73c6bdc717127c2da99f57bc630c4efd8aed02</id>
<content type='text'>
When we added a new event type to trace2 event stream, we forgot to
raise the format version number, which has been corrected.

* js/trace2-raise-format-version:
  trace2: increment event format version
</content>
</entry>
<entry>
<title>trace2: increment event format version</title>
<updated>2021-11-11T23:01:04Z</updated>
<author>
<name>Josh Steadmon</name>
<email>steadmon@google.com</email>
</author>
<published>2021-11-11T22:34:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=04480e67fe7a0a8c111becd43b114ce634e4a7e8'/>
<id>urn:sha1:04480e67fe7a0a8c111becd43b114ce634e4a7e8</id>
<content type='text'>
In 64bc752 (trace2: add trace2_child_ready() to report on background
children, 2021-09-20), we added a new "child_ready" event. In
Documentation/technical/api-trace2.txt, we promise that adding a new
event type will result in incrementing the trace2 event format version
number, but this was not done. Correct this in code &amp; docs.

Signed-off-by: Josh Steadmon &lt;steadmon@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jh/builtin-fsmonitor-part1'</title>
<updated>2021-10-13T22:15:58Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-10-13T22:15:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=af303ee39214a04ad3c01e5924f2e8c09b5c18cb'/>
<id>urn:sha1:af303ee39214a04ad3c01e5924f2e8c09b5c18cb</id>
<content type='text'>
Built-in fsmonitor (part 1).

* jh/builtin-fsmonitor-part1:
  t/helper/simple-ipc: convert test-simple-ipc to use start_bg_command
  run-command: create start_bg_command
  simple-ipc/ipc-win32: add Windows ACL to named pipe
  simple-ipc/ipc-win32: add trace2 debugging
  simple-ipc: move definition of ipc_active_state outside of ifdef
  simple-ipc: preparations for supporting binary messages.
  trace2: add trace2_child_ready() to report on background children
</content>
</entry>
<entry>
<title>trace2: add trace2_child_ready() to report on background children</title>
<updated>2021-09-20T15:57:58Z</updated>
<author>
<name>Jeff Hostetler</name>
<email>jeffhost@microsoft.com</email>
</author>
<published>2021-09-20T15:36:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=64bc75244b5bdc26112cf7b8533a832b692a5fda'/>
<id>urn:sha1:64bc75244b5bdc26112cf7b8533a832b692a5fda</id>
<content type='text'>
Create "child_ready" event to capture the state of a child process
created in the background.

When a child command is started a "child_start" event is generated in
the Trace2 log.  For normal synchronous children, a "child_exit" event
is later generated when the child exits or is terminated.  The two events
include information, such as the "child_id" and "pid", to allow post
analysis to match-up the command line and exit status.

When a child is started in the background (and may outlive the parent
process), it is not possible for the parent to emit a "child_exit"
event.  Create a new "child_ready" event to indicate whether the
child was successfully started.  Also include the "child_id" and "pid"
to allow similar post processing.

This will be used in a later commit with the new "start_bg_command()".

Signed-off-by: Jeff Hostetler &lt;jeffhost@microsoft.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>tr2: stop leaking "thread_name" memory</title>
<updated>2021-09-07T18:07:59Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2021-08-27T08:02:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=48f68715b14b47395a5cd63568a9a29beea8aa6f'/>
<id>urn:sha1:48f68715b14b47395a5cd63568a9a29beea8aa6f</id>
<content type='text'>
Fix a memory leak introduced in ee4512ed481 (trace2: create new
combined trace facility, 2019-02-22), we were doing a free() of other
memory allocated in tr2tls_create_self(), but not the "thread_name"
"struct strbuf".

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Acked-by: Taylor Blau &lt;me@ttaylorr.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'es/trace2-log-parent-process-name'</title>
<updated>2021-08-24T22:32:40Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-08-24T22:32:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6f64eeab605b82b187b2dd1fc72492f434bad603'/>
<id>urn:sha1:6f64eeab605b82b187b2dd1fc72492f434bad603</id>
<content type='text'>
trace2 logs learned to show parent process name to see in what
context Git was invoked.

* es/trace2-log-parent-process-name:
  tr2: log parent process name
  tr2: make process info collection platform-generic
</content>
</entry>
<entry>
<title>tr2: log parent process name</title>
<updated>2021-07-22T20:35:20Z</updated>
<author>
<name>Emily Shaffer</name>
<email>emilyshaffer@google.com</email>
</author>
<published>2021-07-22T01:27:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2f732bf15e6dc9c2caf210784f180c6c059c570a'/>
<id>urn:sha1:2f732bf15e6dc9c2caf210784f180c6c059c570a</id>
<content type='text'>
It can be useful to tell who invoked Git - was it invoked manually by a
user via CLI or script? By an IDE?  In some cases - like 'repo' tool -
we can influence the source code and set the GIT_TRACE2_PARENT_SID
environment variable from the caller process. In 'repo''s case, that
parent SID is manipulated to include the string "repo", which means we
can positively identify when Git was invoked by 'repo' tool. However,
identifying parents that way requires both that we know which tools
invoke Git and that we have the ability to modify the source code of
those tools. It cannot scale to keep up with the various IDEs and
wrappers which use Git, most of which we don't know about. Learning
which tools and wrappers invoke Git, and how, would give us insight to
decide where to improve Git's usability and performance.

Unfortunately, there's no cross-platform reliable way to gather the name
of the parent process. If procfs is present, we can use that; otherwise
we will need to discover the name another way. However, the process ID
should be sufficient to look up the process name on most platforms, so
that code may be shareable.

Git for Windows gathers similar information and logs it as a "data_json"
event. However, since "data_json" has a variable format, it is difficult
to parse effectively in some languages; instead, let's pursue a
dedicated "cmd_ancestry" event to record information about the ancestry
of the current process and a consistent, parseable way.

Git for Windows also gathers information about more than one generation
of parent. In Linux further ancestry info can be gathered with procfs,
but it's unwieldy to do so. In the interest of later moving Git for
Windows ancestry logging to the 'cmd_ancestry' event, and in the
interest of later adding more ancestry to the Linux implementation - or
of adding this functionality to other platforms which have an easier
time walking the process tree - let's make 'cmd_ancestry' accept an
array of parentage.

Signed-off-by: Emily Shaffer &lt;emilyshaffer@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ab/trace2-squelch-gcc-warning'</title>
<updated>2021-06-14T04:33:28Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-06-14T04:33:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ac2158649dee9dc0644aefc0be5d25d54f63ad90'/>
<id>urn:sha1:ac2158649dee9dc0644aefc0be5d25d54f63ad90</id>
<content type='text'>
Workaround compiler warnings.

* ab/trace2-squelch-gcc-warning:
  trace2: refactor to avoid gcc warning under -O3
</content>
</entry>
<entry>
<title>trace2: refactor to avoid gcc warning under -O3</title>
<updated>2021-05-20T21:56:11Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2021-05-20T11:05:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4e0a64a7135b204f140058ed9f53299819db447e'/>
<id>urn:sha1:4e0a64a7135b204f140058ed9f53299819db447e</id>
<content type='text'>
Refactor tr2_dst_try_uds_connect() to avoid a gcc warning[1] that
appears under -O3 (but not -O2). This makes the build pass under
DEVELOPER=1 without needing a DEVOPTS=no-error.

This can be reproduced with GCC Debian 8.3.0-6, but not e.g. with
clang 7.0.1-8+deb10u2. We've had this warning since
ee4512ed481 (trace2: create new combined trace facility, 2019-02-22).

As noted in [2] this warning happens because the compiler doesn't
assume that errno must be non-zero after a failed syscall.

Let's work around by using the well-established "saved_errno" pattern,
along with returning -1 ourselves instead of "errno". The caller can
thus rely on our "errno" on failure.

See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61846 for a related
bug report against GCC.

1.

    trace2/tr2_dst.c: In function ‘tr2_dst_get_trace_fd.part.5’:
    trace2/tr2_dst.c:296:10: warning: ‘fd’ may be used uninitialized in this function [-Wmaybe-uninitialized]
      dst-&gt;fd = fd;
      ~~~~~~~~^~~~
    trace2/tr2_dst.c:229:6: note: ‘fd’ was declared here
      int fd;
          ^~
2. https://lore.kernel.org/git/20200404142131.GA679473@coredump.intra.peff.net/

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>trace2: teach Git to log environment variables</title>
<updated>2020-03-23T20:14:53Z</updated>
<author>
<name>Josh Steadmon</name>
<email>steadmon@google.com</email>
</author>
<published>2020-03-20T21:06:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3d3adaad914441a6e7b916eb8dfd5ae638aab068'/>
<id>urn:sha1:3d3adaad914441a6e7b916eb8dfd5ae638aab068</id>
<content type='text'>
Via trace2, Git can already log interesting config parameters (see the
trace2_cmd_list_config() function). However, this can grant an
incomplete picture because many config parameters also allow overrides
via environment variables.

To allow for more complete logs, we add a new trace2_cmd_list_env_vars()
function and supporting implementation, modeled after the pre-existing
config param logging implementation.

Signed-off-by: Josh Steadmon &lt;steadmon@google.com&gt;
Acked-by: Jeff Hostetler &lt;jeffhost@microsoft.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
