<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/Documentation/technical/api-trace2.txt, branch v2.37.4</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.37.4</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.37.4'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2022-06-02T19:51:35Z</updated>
<entry>
<title>usage.c: add a non-fatal bug() function to go with BUG()</title>
<updated>2022-06-02T19:51:35Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2022-06-02T12:25:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0cc05b044fd690f37565262a5b09f60c203c5218'/>
<id>urn:sha1:0cc05b044fd690f37565262a5b09f60c203c5218</id>
<content type='text'>
Add a bug() function to use in cases where we'd like to indicate a
runtime BUG(), but would like to defer the BUG() call because we're
possibly accumulating more bug() callers to exhaustively indicate what
went wrong.

We already have this sort of facility in various parts of the
codebase, just in the form of ad-hoc re-inventions of the
functionality that this new API provides. E.g. this will be used to
replace optbug() in parse-options.c, and the 'error("BUG:[...]' we do
in a loop in builtin/receive-pack.c.

Unlike the code this replaces we'll log to trace2 with this new bug()
function (as with other usage.c functions, including BUG()), we'll
also be able to avoid calls to xstrfmt() in some cases, as the bug()
function itself accepts variadic sprintf()-like arguments.

Any caller to bug() can follow up such calls with BUG_if_bug(),
which will BUG() out (i.e. abort()) if there were any preceding calls
to bug(), callers can also decide not to call BUG_if_bug() and leave
the resulting BUG() invocation until exit() time. There are currently
no bug() API users that don't call BUG_if_bug() themselves after a
for-loop, but allowing for not calling BUG_if_bug() keeps the API
flexible. As the tests and documentation here show we'll catch missing
BUG_if_bug() invocations in our exit() wrapper.

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>trace2 docs: add missing full stop</title>
<updated>2022-05-04T17:31:05Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2022-05-03T10:26:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a6c80c313c1138eb0e6c040cb78274ca28991c90'/>
<id>urn:sha1:a6c80c313c1138eb0e6c040cb78274ca28991c90</id>
<content type='text'>
Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>trace2 docs: clarify what `varargs` is all about</title>
<updated>2022-05-04T17:31:05Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2022-05-03T10:26:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=236d1177ba893b1101de5b330cd4eb116e4eb9d3'/>
<id>urn:sha1:236d1177ba893b1101de5b330cd4eb116e4eb9d3</id>
<content type='text'>
Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>trace2 docs: fix a JSON formatted example</title>
<updated>2022-05-04T17:31:04Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2022-05-03T10:26:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c4667b17fb67482b2b6d3787ff496e5c75ab2075'/>
<id>urn:sha1:c4667b17fb67482b2b6d3787ff496e5c75ab2075</id>
<content type='text'>
The example was not in valid JSON format due to a duplicate key "sid".

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>trace2 docs: surround more terms in backticks</title>
<updated>2022-05-04T17:31:04Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2022-05-03T10:26:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1c538b951fce8743a8f81cb35d3a9901b11df624'/>
<id>urn:sha1:1c538b951fce8743a8f81cb35d3a9901b11df624</id>
<content type='text'>
Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>trace2 docs: "printf" is not an English word</title>
<updated>2022-05-04T17:31:04Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2022-05-03T10:26:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c191b9188b371ca4850386e44122ecfa6ee74a01'/>
<id>urn:sha1:c191b9188b371ca4850386e44122ecfa6ee74a01</id>
<content type='text'>
We append an ellipsis and enclose it in backticks to indicate that it is
a function elsewhere, let's also use that here.

While at it, ensure the same for `waitpid()`.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>trace2 docs: a couple of grammar fixes</title>
<updated>2022-05-04T17:31:04Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2022-05-03T10:26:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3188d3c0b9a9e7029183cff86743b5a7ae9902dc'/>
<id>urn:sha1:3188d3c0b9a9e7029183cff86743b5a7ae9902dc</id>
<content type='text'>
Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</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>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>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>
</feed>
