<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/common-main.c, branch v2.26.1</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.26.1</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.26.1'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2019-08-06T20:09:01Z</updated>
<entry>
<title>common-main: delay trace2 initialization</title>
<updated>2019-08-06T20:09:01Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2019-08-06T12:27:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5732f2b1ef3559f2b2a5c67302f8bf21846488bc'/>
<id>urn:sha1:5732f2b1ef3559f2b2a5c67302f8bf21846488bc</id>
<content type='text'>
We initialize the trace2 system in the common main() function so that
all programs (even ones that aren't builtins) will enable tracing. But
trace2 startup is relatively heavy-weight, as we have to actually read
on-disk config to decide whether to trace. This can cause unexpected
interactions with other common-main initialization. For instance, we'll
end up in the config code before calling initialize_the_repository(),
and the usual invariant that the_repository is never NULL will not hold.

Let's push the trace2 initialization further down in common-main, to
just before we execute cmd_main(). The other parts of the initialization
are much more self-contained and less likely to call library code that
depends on those kinds of invariants.

Originally the trace2 code tried to start as early as possible to get
accurate timings. But the timer initialization was split out from the
config reading in a089724958 (trace2: refactor setting process starting
time, 2019-04-15), so there shouldn't be any impact from this patch.

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: 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: find exec-dir before trace2 initialization</title>
<updated>2019-04-16T04:37:06Z</updated>
<author>
<name>Jeff Hostetler</name>
<email>jeffhost@microsoft.com</email>
</author>
<published>2019-04-15T20:39:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a7bc01eb25c8743a9ab22d7007555b3ccad5d99c'/>
<id>urn:sha1:a7bc01eb25c8743a9ab22d7007555b3ccad5d99c</id>
<content type='text'>
Teach Git to resolve the executable directory before initializing
Trace2.  This allows the system configuration directory to be
discovered earlier (because it is sometimes relative to the prefix
or runtime-prefix).

This will be used by the next commit to allow trace2 settings to
be loaded from the system config.

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: refactor setting process starting time</title>
<updated>2019-04-16T04:37:06Z</updated>
<author>
<name>Jeff Hostetler</name>
<email>jeffhost@microsoft.com</email>
</author>
<published>2019-04-15T20:39:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a089724958a99924d9ec7ff60a6aea63d03448f2'/>
<id>urn:sha1:a089724958a99924d9ec7ff60a6aea63d03448f2</id>
<content type='text'>
Create trace2_initialize_clock() and call from main() to capture
process start time in isolation and before other sub-systems are
ready.

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: collect Windows-specific process information</title>
<updated>2019-02-22T23:27:59Z</updated>
<author>
<name>Jeff Hostetler</name>
<email>jeffhost@microsoft.com</email>
</author>
<published>2019-02-22T22:25:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=353d3d77f4fdd1582e3b60824deebca27c7b2790'/>
<id>urn:sha1:353d3d77f4fdd1582e3b60824deebca27c7b2790</id>
<content type='text'>
Add platform-specific interface to log information about the current
process.

On Windows, this interface is used to indicate whether the git process
is running under a debugger and list names of the process ancestors.

Information for other platforms is left for a future effort.

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: create new combined trace facility</title>
<updated>2019-02-22T23:27:59Z</updated>
<author>
<name>Jeff Hostetler</name>
<email>jeffhost@microsoft.com</email>
</author>
<published>2019-02-22T22:25:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ee4512ed481a126dadd33334186e0e759d7f2f47'/>
<id>urn:sha1:ee4512ed481a126dadd33334186e0e759d7f2f47</id>
<content type='text'>
Create a new unified tracing facility for git.  The eventual intent is to
replace the current trace_printf* and trace_performance* routines with a
unified set of git_trace2* routines.

In addition to the usual printf-style API, trace2 provides higer-level
event verbs with fixed-fields allowing structured data to be written.
This makes post-processing and analysis easier for external tools.

Trace2 defines 3 output targets.  These are set using the environment
variables "GIT_TR2", "GIT_TR2_PERF", and "GIT_TR2_EVENT".  These may be
set to "1" or to an absolute pathname (just like the current GIT_TRACE).

* GIT_TR2 is intended to be a replacement for GIT_TRACE and logs command
  summary data.

* GIT_TR2_PERF is intended as a replacement for GIT_TRACE_PERFORMANCE.
  It extends the output with columns for the command process, thread,
  repo, absolute and relative elapsed times.  It reports events for
  child process start/stop, thread start/stop, and per-thread function
  nesting.

* GIT_TR2_EVENT is a new structured format. It writes event data as a
  series of JSON records.

Calls to trace2 functions log to any of the 3 output targets enabled
without the need to call different trace_printf* or trace_performance*
routines.

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>Merge branch 'dj/runtime-prefix'</title>
<updated>2018-05-08T06:59:17Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-05-08T06:59:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=92034a9cd5e71cf686ef66029433bdaba75027b0'/>
<id>urn:sha1:92034a9cd5e71cf686ef66029433bdaba75027b0</id>
<content type='text'>
A build-time option has been added to allow Git to be told to refer
to its associated files relative to the main binary, in the same
way that has been possible on Windows for quite some time, for
Linux, BSDs and Darwin.

* dj/runtime-prefix:
  Makefile: quote $INSTLIBDIR when passing it to sed
  Makefile: remove unused @@PERLLIBDIR@@ substitution variable
  mingw/msvc: use the new-style RUNTIME_PREFIX helper
  exec_cmd: provide a new-style RUNTIME_PREFIX helper for Windows
  exec_cmd: RUNTIME_PREFIX on some POSIX systems
  Makefile: add Perl runtime prefix support
  Makefile: generate Perl header from template file
</content>
</entry>
<entry>
<title>exec_cmd: rename to use dash in file name</title>
<updated>2018-04-11T09:11:00Z</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2018-04-10T21:26:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d807c4a01db2b06db047fc6d5d18ac25c8f05bd7'/>
<id>urn:sha1:d807c4a01db2b06db047fc6d5d18ac25c8f05bd7</id>
<content type='text'>
This is more consistent with the project style. The majority of Git's
source files use dashes in preference to underscores in their file names.

Signed-off-by: Stefan Beller &lt;sbeller@google.com&gt;
</content>
</entry>
<entry>
<title>exec_cmd: RUNTIME_PREFIX on some POSIX systems</title>
<updated>2018-04-11T09:10:28Z</updated>
<author>
<name>Dan Jacques</name>
<email>dnj@google.com</email>
</author>
<published>2018-04-10T15:05:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=226c0ddd0d63dd6c8dde497c755af2ad1f02e0c1'/>
<id>urn:sha1:226c0ddd0d63dd6c8dde497c755af2ad1f02e0c1</id>
<content type='text'>
Enable Git to resolve its own binary location using a variety of
OS-specific and generic methods, including:

- procfs via "/proc/self/exe" (Linux)
- _NSGetExecutablePath (Darwin)
- KERN_PROC_PATHNAME sysctl on BSDs.
- argv0, if absolute (all, including Windows).

This is used to enable RUNTIME_PREFIX support for non-Windows systems,
notably Linux and Darwin. When configured with RUNTIME_PREFIX, Git will
do a best-effort resolution of its executable path and automatically use
this as its "exec_path" for relative helper and data lookups, unless
explicitly overridden.

Small incidental formatting cleanup of "exec_cmd.c".

Signed-off-by: Dan Jacques &lt;dnj@google.com&gt;
Thanks-to: Robbie Iannucci &lt;iannucci@google.com&gt;
Thanks-to: Junio C Hamano &lt;gitster@pobox.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>repository: initialize the_repository in main()</title>
<updated>2018-03-05T19:14:03Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2018-03-03T11:35:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b2f0eceecf266e60fa95970e0973a8f23f911fb1'/>
<id>urn:sha1:b2f0eceecf266e60fa95970e0973a8f23f911fb1</id>
<content type='text'>
This simplifies initialization of struct repository and anything
inside. Easier to read. Easier to add/remove fields.

Everything will go through main() common-main.c so this should cover all
programs, including t/helper.

Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
