<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/trace2.h, branch v2.35.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.35.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.35.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2021-10-13T22:15:58Z</updated>
<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>Merge branch 'en/typofixes'</title>
<updated>2021-09-28T20:06:53Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-09-28T20:06:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=45d141a1ddbc55c220ad4c726c02bbbf7a69247a'/>
<id>urn:sha1:45d141a1ddbc55c220ad4c726c02bbbf7a69247a</id>
<content type='text'>
Typofixes.

* en/typofixes:
  merge-ort: fix completely wrong comment
  trace2.h: fix trivial comment typo
</content>
</entry>
<entry>
<title>trace2.h: fix trivial comment typo</title>
<updated>2021-09-20T18:25:01Z</updated>
<author>
<name>Elijah Newren</name>
<email>newren@gmail.com</email>
</author>
<published>2021-09-19T01:48:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b031f47802b60114d294c2075f8607ce30f50920'/>
<id>urn:sha1:b031f47802b60114d294c2075f8607ce30f50920</id>
<content type='text'>
Signed-off-by: Elijah Newren &lt;newren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</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: 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>tr2: make process info collection platform-generic</title>
<updated>2021-07-22T20:35:20Z</updated>
<author>
<name>Emily Shaffer</name>
<email>emilyshaffer@google.com</email>
</author>
<published>2021-07-22T01:27:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b7e6a4162207785c66a1de6f4530499925b762b6'/>
<id>urn:sha1:b7e6a4162207785c66a1de6f4530499925b762b6</id>
<content type='text'>
To pave the way for non-Windows platforms to define
trace2_collect_process_info(), reorganize the stub-or-definition schema
to something which doesn't directly reference Windows.

Platforms which want to collect parent process information in the
future should:

 1. Add an implementation to compat/ (e.g. compat/somearch/procinfo.c)
 2. Add that object to COMPAT_OBJS to config.mak.uname
    (e.g. COMPAT_OBJS += compat/somearch/procinfo.o)
 3. Define HAVE_PLATFORM_PROCINFO in config.mak.uname

In the Windows case, this definition lives in
compat/win32/trace2_win32_process_info.c, which is already conditionally
added to COMPAT_OBJS; so let's add HAVE_PLATFORM_PROCINFO to hint to the
build that compat/stub/procinfo.c should not be used.

Signed-off-by: Emily Shaffer &lt;emilyshaffer@google.com&gt;
Helped-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>trace2: add a public function for getting the SID</title>
<updated>2020-11-12T02:26:52Z</updated>
<author>
<name>Josh Steadmon</name>
<email>steadmon@google.com</email>
</author>
<published>2020-11-11T23:29:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e97e1cf464fa0c4646d41b9221ae88a7dca12493'/>
<id>urn:sha1:e97e1cf464fa0c4646d41b9221ae88a7dca12493</id>
<content type='text'>
Add a public wrapper, trace2_session_id(), around tr2_sid_get(), which
is intended to be private trace2 implementation.

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>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>
<entry>
<title>trace2: move doc to trace2.h</title>
<updated>2019-11-18T06:21:29Z</updated>
<author>
<name>Heba Waly</name>
<email>heba.waly@gmail.com</email>
</author>
<published>2019-11-17T21:04:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6c51cb525da47a751b856bba55522ca9d4c24dac'/>
<id>urn:sha1:6c51cb525da47a751b856bba55522ca9d4c24dac</id>
<content type='text'>
Move the functions documentation from
Documentation/technical/api-trace2.txt to trace2.h as it's easier for the
developers to find the usage information beside the code instead of looking
for it in another doc file.

Only the functions documentation section is removed from
Documentation/technical/api-trace2.txt as the file is full of
details that seemed more appropriate to be in a separate doc file
as it is, with a link to the doc file added in the trace2.h.
Also the functions doc is removed to avoid having redundandt info which
will be hard to keep syncronized with the documentation in the header file.

Signed-off-by: Heba Waly &lt;heba.waly@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>trace2: rename environment variables to GIT_TRACE2*</title>
<updated>2019-05-28T17:20:34Z</updated>
<author>
<name>SZEDER Gábor</name>
<email>szeder.dev@gmail.com</email>
</author>
<published>2019-05-19T14:43:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e4b75d6a1d3105958c307e526ae6759e86f7f837'/>
<id>urn:sha1:e4b75d6a1d3105958c307e526ae6759e86f7f837</id>
<content type='text'>
For an environment variable that is supposed to be set by users, the
GIT_TR2* env vars are just too unclear, inconsistent, and ugly.

Most of the established GIT_* environment variables don't use
abbreviations, and in case of the few that do (GIT_DIR,
GIT_COMMON_DIR, GIT_DIFF_OPTS) it's quite obvious what the
abbreviations (DIR and OPTS) stand for.  But what does TR stand for?
Track, traditional, trailer, transaction, transfer, transformation,
transition, translation, transplant, transport, traversal, tree,
trigger, truncate, trust, or ...?!

The trace2 facility, as the '2' suffix in its name suggests, is
supposed to eventually supercede Git's original trace facility.  It's
reasonable to expect that the corresponding environment variables
follow suit, and after the original GIT_TRACE variables they are
called GIT_TRACE2; there is no such thing is 'GIT_TR'.

All trace2-specific config variables are, very sensibly, in the
'trace2' section, not in 'tr2'.

OTOH, we don't gain anything at all by omitting the last three
characters of "trace" from the names of these environment variables.

So let's rename all GIT_TR2* environment variables to GIT_TRACE2*,
before they make their way into a stable release.

Signed-off-by: SZEDER Gábor &lt;szeder.dev@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
