<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/trace2.h, branch v2.45.3</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.45.3</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.45.3'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2024-06-10T16:16:19Z</updated>
<entry>
<title>__attribute__: trace2_region_enter_printf() is like "printf"</title>
<updated>2024-06-10T16:16:19Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-06-08T18:37:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=89e78c7cdad1ac70d16c0ceb79b3ff95dfadd2bb'/>
<id>urn:sha1:89e78c7cdad1ac70d16c0ceb79b3ff95dfadd2bb</id>
<content type='text'>
The last part of the parameter list the function takes is like
parameters to printf.  Mark it as such.

An existing call that formats a value of type size_t using "%d" was
found by the compiler with the help with this annotation; fix it.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>trace2: fix signature of trace2_def_param() macro</title>
<updated>2023-11-23T01:30:32Z</updated>
<author>
<name>Jeff Hostetler</name>
<email>jeffhostetler@github.com</email>
</author>
<published>2023-11-22T19:18:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=abcdb978ea13010357ef2bf265f7bf0c55f96dbe'/>
<id>urn:sha1:abcdb978ea13010357ef2bf265f7bf0c55f96dbe</id>
<content type='text'>
Add `struct key_value_info` argument to `trace2_def_param()`.

In dc90208497 (trace2: plumb config kvi, 2023-06-28) a `kvi`
argument was added to `trace2_def_param_fl()` but the macro
was not up updated. Let's fix that.

Signed-off-by: Jeff Hostetler &lt;jeffhostetler@github.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'bb/use-trace2-counters-for-fsync-stats'</title>
<updated>2023-08-02T16:37:23Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2023-08-02T16:37:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=52d9dc20e1ddd5ac6b9e9113983b2f8d6977e6b0'/>
<id>urn:sha1:52d9dc20e1ddd5ac6b9e9113983b2f8d6977e6b0</id>
<content type='text'>
Instead of inventing a custom counter variables for debugging,
use existing trace2 facility in the fsync customization codepath.

* bb/use-trace2-counters-for-fsync-stats:
  wrapper: use trace2 counters to collect fsync stats
</content>
</entry>
<entry>
<title>Merge branch 'bb/trace2-comment-fix'</title>
<updated>2023-07-28T16:45:21Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2023-07-28T16:45:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c8a33b44c5a56c7b2c7778506acdc71e5365ec1f'/>
<id>urn:sha1:c8a33b44c5a56c7b2c7778506acdc71e5365ec1f</id>
<content type='text'>
In-code comment fix.

* bb/trace2-comment-fix:
  trace2: fix a comment
</content>
</entry>
<entry>
<title>Merge branch 'tb/refs-exclusion-and-packed-refs'</title>
<updated>2023-07-21T20:47:26Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2023-07-21T20:47:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=39fe402d6727efb6c98ddca19fae1f094ffaa6b3'/>
<id>urn:sha1:39fe402d6727efb6c98ddca19fae1f094ffaa6b3</id>
<content type='text'>
Enumerating refs in the packed-refs file, while excluding refs that
match certain patterns, has been optimized.

* tb/refs-exclusion-and-packed-refs:
  ls-refs.c: avoid enumerating hidden refs where possible
  upload-pack.c: avoid enumerating hidden refs where possible
  builtin/receive-pack.c: avoid enumerating hidden references
  refs.h: implement `hidden_refs_to_excludes()`
  refs.h: let `for_each_namespaced_ref()` take excluded patterns
  revision.h: store hidden refs in a `strvec`
  refs/packed-backend.c: add trace2 counters for jump list
  refs/packed-backend.c: implement jump lists to avoid excluded pattern(s)
  refs/packed-backend.c: refactor `find_reference_location()`
  refs: plumb `exclude_patterns` argument throughout
  builtin/for-each-ref.c: add `--exclude` option
  ref-filter.c: parameterize match functions over patterns
  ref-filter: add `ref_filter_clear()`
  ref-filter: clear reachable list pointers after freeing
  ref-filter.h: provide `REF_FILTER_INIT`
  refs.c: rename `ref_filter`
</content>
</entry>
<entry>
<title>wrapper: use trace2 counters to collect fsync stats</title>
<updated>2023-07-20T18:52:53Z</updated>
<author>
<name>Beat Bolli</name>
<email>dev+git@drbeat.li</email>
</author>
<published>2023-07-20T16:48:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a27eecea75b3858b4052b191143f144a7e966869'/>
<id>urn:sha1:a27eecea75b3858b4052b191143f144a7e966869</id>
<content type='text'>
As mentioned in the thread starting at [1], trace2 counters should be
used to count events instead of ad-hoc static variables.

Convert the two fsync static variables to trace2 counters, reducing the
coupling between wrapper.c and the trace2 subsystem. Adjust t/t5351 to
match the trace2 counter output format.

The counters are not per-thread because the ones being replaced also
were not.

[1] https://lore.kernel.org/git/20230627195251.1973421-2-calvinwan@google.com/

Signed-off-by: Beat Bolli &lt;dev+git@drbeat.li&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>trace2: fix a comment</title>
<updated>2023-07-20T00:02:16Z</updated>
<author>
<name>Beat Bolli</name>
<email>dev+git@drbeat.li</email>
</author>
<published>2023-07-19T23:24:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c48af99a3e516efd0873b9e8c1f1feda453e3cf1'/>
<id>urn:sha1:c48af99a3e516efd0873b9e8c1f1feda453e3cf1</id>
<content type='text'>
When the trace2 counter mechanism was added in 81071626ba (trace2: add
global counter mechanism, 2022-10-24), the name of the file where new
counters are added was misspelled in a comment.

Use the correct file name.

Signed-off-by: Beat Bolli &lt;dev+git@drbeat.li&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>refs/packed-backend.c: add trace2 counters for jump list</title>
<updated>2023-07-10T21:48:55Z</updated>
<author>
<name>Taylor Blau</name>
<email>me@ttaylorr.com</email>
</author>
<published>2023-07-10T21:12:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c489f47a649da8984a2240032e1d819e9a80ea2a'/>
<id>urn:sha1:c489f47a649da8984a2240032e1d819e9a80ea2a</id>
<content type='text'>
The previous commit added low-level tests to ensure that the packed-refs
iterator did not enumerate excluded sections of the refspace.

However, there was no guarantee that these sections weren't being
visited, only that they were being suppressed from the output. To harden
these tests, add a trace2 counter which tracks the number of regions
skipped by the packed-refs iterator, and assert on its value.

Suggested-by: Derrick Stolee &lt;derrickstolee@github.com&gt;
Signed-off-by: Taylor Blau &lt;me@ttaylorr.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>trace2: plumb config kvi</title>
<updated>2023-06-28T21:06:39Z</updated>
<author>
<name>Glen Choo</name>
<email>chooglen@google.com</email>
</author>
<published>2023-06-28T19:26:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=dc9020849773393e47c37c2834a5582374b55ecc'/>
<id>urn:sha1:dc9020849773393e47c37c2834a5582374b55ecc</id>
<content type='text'>
There is a code path starting from trace2_def_param_fl() that eventually
calls current_config_scope(), and thus it needs to have "kvi" plumbed
through it. Additional plumbing is also needed to get "kvi" to
trace2_def_param_fl(), which gets called by two code paths:

- Through tr2_cfg_cb(), which is a config callback, so it trivially
  receives "kvi" via the "struct config_context ctx" parameter.

- Through tr2_list_env_vars_fl(), which is a high level function that
  lists environment variables for tracing. This has been secretly
  behaving like git_config_from_parameters() (in that it parses config
  from environment variables/the CLI), but does not set config source
  information.

  Teach tr2_list_env_vars_fl() to be well-behaved by using
  kvi_from_param(), which is used elsewhere for CLI/environment
  variable-based config.

As a result, current_config_scope() has no more callers, so remove it.

Signed-off-by: Glen Choo &lt;chooglen@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<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>
</feed>
