<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/trace2, branch v2.40.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.40.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.40.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2022-10-24T19:45:26Z</updated>
<entry>
<title>trace2: add global counter mechanism</title>
<updated>2022-10-24T19:45:26Z</updated>
<author>
<name>Jeff Hostetler</name>
<email>jeffhost@microsoft.com</email>
</author>
<published>2022-10-24T13:41:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=81071626ba1ec54ad72de1e0a9a49c78eb87a2c8'/>
<id>urn:sha1:81071626ba1ec54ad72de1e0a9a49c78eb87a2c8</id>
<content type='text'>
Add global counters mechanism to Trace2.

The Trace2 counters mechanism adds the ability to create a set of
global counter variables and an API to increment them efficiently.
Counters can optionally report per-thread usage in addition to the sum
across all threads.

Counter events are emitted to the Trace2 logs when a thread exits and
at process exit.

Counters are an alternative to `data` and `data_json` events.

Counters are useful when you want to measure something across the life
of the process, when you don't want per-measurement events for
performance reasons, when the data does not fit conveniently within a
region, or when your control flow does not easily let you write the
final total.  For example, you might use this to report the number of
calls to unzip() or the number of de-delta steps during a checkout.

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 stopwatch timers</title>
<updated>2022-10-24T19:45:26Z</updated>
<author>
<name>Jeff Hostetler</name>
<email>jeffhost@microsoft.com</email>
</author>
<published>2022-10-24T13:41:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8ad575646c0b1e927a05650a1ec64125121ae591'/>
<id>urn:sha1:8ad575646c0b1e927a05650a1ec64125121ae591</id>
<content type='text'>
Add stopwatch timer mechanism to Trace2.

Timers are an alternative to Trace2 Regions.  Regions are useful for
measuring the time spent in various computation phases, such as the
time to read the index, time to scan for unstaged files, time to scan
for untracked files, and etc.

However, regions are not appropriate in all places.  For example,
during a checkout, it would be very inefficient to use regions to
measure the total time spent inflating objects from the ODB from
across the entire lifetime of the process; a per-unzip() region would
flood the output and significantly slow the command; and some form of
post-processing would be requried to compute the time spent in unzip().

Timers can be used to measure a series of timer intervals and emit
a single summary event (at thread and/or process exit).

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: convert ctx.thread_name from strbuf to pointer</title>
<updated>2022-10-24T19:45:26Z</updated>
<author>
<name>Jeff Hostetler</name>
<email>jeffhost@microsoft.com</email>
</author>
<published>2022-10-24T13:41:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=24a4c45da9e1255df43a87bec1f646b1efa69209'/>
<id>urn:sha1:24a4c45da9e1255df43a87bec1f646b1efa69209</id>
<content type='text'>
Convert the `tr2tls_thread_ctx.thread_name` field from a `strbuf`
to a "const char*" pointer.

The `thread_name` field is a constant string that is constructed when
the context is created.  Using a (non-const) `strbuf` structure for it
caused some confusion in the past because it implied that someone
could rename a thread after it was created.  That usage was not
intended.  Change it to a const pointer to make the intent more clear.

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: improve thread-name documentation in the thread-context</title>
<updated>2022-10-24T19:45:25Z</updated>
<author>
<name>Jeff Hostetler</name>
<email>jeffhost@microsoft.com</email>
</author>
<published>2022-10-24T13:41:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=31247936041318d441de5a2681f9bcb79459c726'/>
<id>urn:sha1:31247936041318d441de5a2681f9bcb79459c726</id>
<content type='text'>
Improve the documentation of the tr2tls_thread_ctx.thread_name field
and its relation to the tr2tls_thread_ctx.thread_id field.

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: rename the thread_name argument to trace2_thread_start</title>
<updated>2022-10-24T19:45:25Z</updated>
<author>
<name>Jeff Hostetler</name>
<email>jeffhost@microsoft.com</email>
</author>
<published>2022-10-24T13:41:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a70839cf36c9cad10e514f75fa1bec2e6180dbda'/>
<id>urn:sha1:a70839cf36c9cad10e514f75fa1bec2e6180dbda</id>
<content type='text'>
Rename the `thread_name` argument in `tr2tls_create_self()` and
`trace2_thread_start()` to be `thread_base_name` to make it clearer
that the passed argument is a component used in the construction of
the actual `struct tr2tls_thread_ctx.thread_name` variable.

The base name will be used along with the thread id to create a
unique thread name.

This commit does not change how the `thread_name` field is
allocated or stored within the `tr2tls_thread_ctx` structure.

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>tr2tls: clarify TLS terminology</title>
<updated>2022-10-24T19:45:25Z</updated>
<author>
<name>Jeff Hostetler</name>
<email>jeffhost@microsoft.com</email>
</author>
<published>2022-10-24T13:41:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5bbb9251378b0e62bb06e72bda0574e06dee4933'/>
<id>urn:sha1:5bbb9251378b0e62bb06e72bda0574e06dee4933</id>
<content type='text'>
Reduce or eliminate use of the term "TLS" in the Trace2 code.

The term "TLS" has two popular meanings: "thread-local storage" and
"transport layer security".  In the Trace2 source, the term is associated
with the former.  There was concern on the mailing list about it refering
to the latter.

Update the source and documentation to eliminate the use of the "TLS" term
or replace it with the phrase "thread-local storage" to reduce ambiguity.

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 size_t alloc,nr_open_regions in tr2tls_thread_ctx</title>
<updated>2022-10-24T19:45:25Z</updated>
<author>
<name>Jeff Hostetler</name>
<email>jeffhost@microsoft.com</email>
</author>
<published>2022-10-24T13:41:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=545ddca0c32cb3ccdffed4aa9f063c84b432940c'/>
<id>urn:sha1:545ddca0c32cb3ccdffed4aa9f063c84b432940c</id>
<content type='text'>
Use "size_t" rather than "int" for the "alloc" and "nr_open_regions"
fields in the "tr2tls_thread_ctx".  These are used by ALLOC_GROW().

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: shows scope unconditionally in addition to key-value pair</title>
<updated>2022-08-12T04:05:00Z</updated>
<author>
<name>Teng Long</name>
<email>dyroneteng@gmail.com</email>
</author>
<published>2022-08-12T02:56:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=35ae40ead34f29c827abf101ba4e5412c2e67ab0'/>
<id>urn:sha1:35ae40ead34f29c827abf101ba4e5412c2e67ab0</id>
<content type='text'>
When we specify GIT_TRACE2_CONFIG_PARAMS or trace2.configparams,
trace2 will prints "interesting" config values to log. Sometimes,
when a config set in multiple scope files, the following output
looks like (the irrelevant fields are omitted here as "..."):

...| def_param    |  ...  | core.multipackindex:false
...| def_param    |  ...  | core.multipackindex:false
...| def_param    |  ...  | core.multipackindex:false

As the log shows, even each config in different scope is dumped, but
we don't know which scope it comes from. Therefore, it's better to
add the scope names as well to make them be more recognizable. For
example, when execute:

    $ GIT_TRACE2_PERF=1 \
    &gt; GIT_TRACE2_CONFIG_PARAMS=core.multipackIndex \
    &gt; git rev-list --test-bitmap HEAD"

The following is the ouput (the irrelevant fields are omitted here
as "..."):

Format normal:
... git.c:461 ... def_param scope:system core.multipackindex=false
... git.c:461 ... def_param scope:global core.multipackindex=false
... git.c:461 ... def_param scope:local core.multipackindex=false

Format perf:

... | def_param    | ... | scope:system | core.multipackindex:false
... | def_param    | ... | scope:global | core.multipackindex:false
... | def_param    | ... | scope:local  | core.multipackindex:false

Format event:

{"event":"def_param", ... ,"scope":"system","param":"core.multipackindex","value":"false"}
{"event":"def_param", ... ,"scope":"global","param":"core.multipackindex","value":"false"}
{"event":"def_param", ... ,"scope":"local","param":"core.multipackindex","value":"false"}

Signed-off-by: Teng Long &lt;dyroneteng@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>trace2: use designated initializers for "struct tr2_dst"</title>
<updated>2022-02-24T23:58:55Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2022-02-24T09:33:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4996e0b015bd1dbb921bc359438e1385e7c87fd7'/>
<id>urn:sha1:4996e0b015bd1dbb921bc359438e1385e7c87fd7</id>
<content type='text'>
Convert the "static struct tr2_dst" assignments in trace2/* to use
designated initializers. I don't think it improves readability to
include the explicit 0-ing out of the
fd/initialized/need_close/too_many_files members, so let's have those
be initialized implicitly by the compiler.

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: use designated initializers for "struct tr2_tgt"</title>
<updated>2022-02-24T23:58:31Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2022-02-24T09:32:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=98593057d0caee3432d170f4b895ef7bcf27fbd0'/>
<id>urn:sha1:98593057d0caee3432d170f4b895ef7bcf27fbd0</id>
<content type='text'>
As with the preceding commit, change another set of file-level struct
assignments to use designated initializers.

As before the "= NULL" assignments are redundant, but we're keeping
them for self-documentation purposes. The comments left to explain the
pre-image can now be removed in favor of working code that relays the
same information to the reader.

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>
</feed>
