<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/trace2.c, 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-09-20T15:57:58Z</updated>
<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>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>Merge branch 'jh/trace2'</title>
<updated>2019-05-13T14:50:35Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-05-13T14:50:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=49bc8ce539b24fc8dccf92bf0e23d184a8d07d4b'/>
<id>urn:sha1:49bc8ce539b24fc8dccf92bf0e23d184a8d07d4b</id>
<content type='text'>
A few embarrassing bugfixes.

* jh/trace2:
  trace2: fix up a missing "leave" entry point
  trace2: fix incorrect function pointer check
</content>
</entry>
<entry>
<title>Merge branch 'jh/trace2-sid-fix'</title>
<updated>2019-05-13T14:50:31Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-05-13T14:50:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5b2d1c0c6eceb5fd6c9527bc2863179644dce840'/>
<id>urn:sha1:5b2d1c0c6eceb5fd6c9527bc2863179644dce840</id>
<content type='text'>
Polishing of the new trace2 facility continues.  The system-level
configuration can specify site-wide trace2 settings, which can be
overridden with per-user configuration and environment variables.

* jh/trace2-sid-fix:
  trace2: fixup access problem on /etc/gitconfig in read_very_early_config
  trace2: update docs to describe system/global config settings
  trace2: make SIDs more unique
  trace2: clarify UTC datetime formatting
  trace2: report peak memory usage of the process
  trace2: use system/global config for default trace2 settings
  config: add read_very_early_config()
  trace2: find exec-dir before trace2 initialization
  trace2: add absolute elapsed time to start event
  trace2: refactor setting process starting time
  config: initialize opts structure in repo_read_config()
</content>
</entry>
<entry>
<title>trace2: fix incorrect function pointer check</title>
<updated>2019-04-26T02:44:00Z</updated>
<author>
<name>Josh Steadmon</name>
<email>steadmon@google.com</email>
</author>
<published>2019-04-25T17:08:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=22a7338318e3709b578d5c041af0afaf95b8fe21'/>
<id>urn:sha1:22a7338318e3709b578d5c041af0afaf95b8fe21</id>
<content type='text'>
Fix trace2_data_json_fl() to check for the presence of pfn_data_json_fl
in its targets, rather than pfn_data_fl, which is not actually called.

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: report peak memory usage of the process</title>
<updated>2019-04-16T04:37:07Z</updated>
<author>
<name>Jeff Hostetler</name>
<email>jeffhost@microsoft.com</email>
</author>
<published>2019-04-15T20:39:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=26c6f251d754a33c188ce7ad8f5ea6cb0bc740d7'/>
<id>urn:sha1:26c6f251d754a33c188ce7ad8f5ea6cb0bc740d7</id>
<content type='text'>
Teach Windows version of git to report peak memory usage
during exit() processing.

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>trace2: use system/global config for default trace2 settings</title>
<updated>2019-04-16T04:37:06Z</updated>
<author>
<name>Jeff Hostetler</name>
<email>jeffhost@microsoft.com</email>
</author>
<published>2019-04-15T20:39:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bce9db6de97c95882a7c46836bb6cc90acf0fef0'/>
<id>urn:sha1:bce9db6de97c95882a7c46836bb6cc90acf0fef0</id>
<content type='text'>
Teach git to read the system and global config files for
default Trace2 settings.  This allows system-wide Trace2 settings to
be installed and inherited to make it easier to manage a collection of
systems.

The original GIT_TR2* environment variables are loaded afterwards and
can be used to override the system settings.

Only the system and global config files are used.  Repo and worktree
local config files are ignored.  Likewise, the "-c" command line
arguments are also ignored.  These limits are for performance reasons.

(1) For users not using Trace2, there should be minimal overhead to
detect that Trace2 is not enabled.  In particular, Trace2 should not
allocate lots of otherwise unused data strucutres.

(2) For accurate performance measurements, Trace2 should be initialized
as early in the git process as possible, and before most of the normal
git process initialization (which involves discovering the .git directory
and reading a hierarchy of config files).

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>trace2: add absolute elapsed time to start event</title>
<updated>2019-04-16T04:37:06Z</updated>
<author>
<name>Jeff Hostetler</name>
<email>jeffhost@microsoft.com</email>
</author>
<published>2019-04-15T20:39:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=39f43177442d44d8a945c3ff6a8c08f481539763'/>
<id>urn:sha1:39f43177442d44d8a945c3ff6a8c08f481539763</id>
<content type='text'>
Add elapsed process time to "start" event to measure
the performance of early process startup.

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