<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/trace.c, branch v2.32.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.32.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.32.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2020-05-11T18:18:01Z</updated>
<entry>
<title>http, imap-send: stop using CURLOPT_VERBOSE</title>
<updated>2020-05-11T18:18:01Z</updated>
<author>
<name>Jonathan Tan</name>
<email>jonathantanmy@google.com</email>
</author>
<published>2020-05-11T17:43:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7167a62b9e2f648adc11411446f876f2458722a5'/>
<id>urn:sha1:7167a62b9e2f648adc11411446f876f2458722a5</id>
<content type='text'>
Whenever GIT_CURL_VERBOSE is set, teach Git to behave as if
GIT_TRACE_CURL=1 and GIT_TRACE_CURL_NO_DATA=1 is set, instead of setting
CURLOPT_VERBOSE.

This is to prevent inadvertent revelation of sensitive data. In
particular, GIT_CURL_VERBOSE redacts neither the "Authorization" header
nor any cookies specified by GIT_REDACT_COOKIES.

Unifying the tracing mechanism also has the future benefit that any
improvements to the tracing mechanism will benefit both users of
GIT_CURL_VERBOSE and GIT_TRACE_CURL, and we do not need to remember to
implement any improvement twice.

Signed-off-by: Jonathan Tan &lt;jonathantanmy@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>packfile: drop release_pack_memory()</title>
<updated>2019-08-13T19:21:33Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2019-08-12T20:50:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9827d4c185e4da728f51cd77c54a38c9de62495f'/>
<id>urn:sha1:9827d4c185e4da728f51cd77c54a38c9de62495f</id>
<content type='text'>
Long ago, in 97bfeb34df (Release pack windows before reporting out of
memory., 2006-12-24), we taught xmalloc() and friends to try unmapping
pack windows when malloc() failed. It's unlikely that his helps a lot in
practice, and it has some downsides. First, the downsides:

  1. It makes xmalloc() not thread-safe. We've worked around this in
     pack-objects.c, which installs its own locking version of the
     try_to_free_routine(). But other threaded code doesn't.

  2. It makes the system as a whole harder to reason about. Functions
     which allocate heap memory under the hood may have farther-reaching
     effects than expected.

That might be worth the tradeoff if there's a benefit. But in practice,
it seems unlikely. We're generally dealing with mmap'd files, so the OS
is going to do a much better job at responding to memory pressure by
dropping individual pages (the exception is systems with NO_MMAP, but
even there the OS can probably respond just as well with swapping).

So the only thing we're really freeing is address space. On 64-bit
systems, we have plenty of that to go around. On 32-bit systems, it
could possibly help. But around the same time we made two other changes:
77ccc5bbd1 (Introduce new config option for mmap limit., 2006-12-23) and
60bb8b1453 (Fully activate the sliding window pack access., 2006-12-23).
Together that means that a 32-bit system should have no more than 256MB
total of packed-git mmaps at one time, split between a few 32MB windows.
It's unlikely we have any address space problems since then, but we
don't have any data since the features were all added at the same time.

Likewise, xmmap() will try to free memory. At first glance, it seems
like we'd need this (when we try to mmap a new window, we might need to
close an old one to save address space on a 32-bit system). But we're
saved again by core.packedGitLimit: if we're going to exceed our 256MB
limit, we'll close an existing window before we even call mmap().

So it seems unlikely that this feature is actually doing anything
useful. And while we don't have reports of it harming anything (probably
because it rarely if ever kicks in), it would be nice to simplify the
system overall. This patch drops the whole try_to_free system from
xmalloc(), as well as the manual pack memory release in xmmap().

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>trace.h: support nested performance tracing</title>
<updated>2018-08-18T16:47:46Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2018-08-18T14:41:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c46c406ae1ee30f64a13083edfa5683d2685fd61'/>
<id>urn:sha1:c46c406ae1ee30f64a13083edfa5683d2685fd61</id>
<content type='text'>
Performance measurements are listed right now as a flat list, which is
fine when we measure big blocks. But when we start adding more and
more measurements, some of them could be just part of a bigger
measurement and a flat list gives a wrong impression that they are
executed at the same level instead of nested.

Add trace_performance_enter() and trace_performance_leave() to allow
indent these nested measurements. For now it does not help much
because the only nested thing is (lazy) name hash initialization
(e.g. called in diff-index from "git status"). This will help more
because I'm going to add some more tracing that's actually nested.

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>
<entry>
<title>trace.c: export trace_setup_key</title>
<updated>2018-03-30T19:49:57Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2018-03-30T18:34:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=cb50761959c0c30aa9c44098db3a72db06570238'/>
<id>urn:sha1:cb50761959c0c30aa9c44098db3a72db06570238</id>
<content type='text'>
This is so that we can print traces based on this key outside trace.c.

Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
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>trace.c: move strbuf_release() out of print_trace_line()</title>
<updated>2018-01-16T20:16:54Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2018-01-15T10:59:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=33011e769c2dd3eaa63e5b480e5845c5d370ab13'/>
<id>urn:sha1:33011e769c2dd3eaa63e5b480e5845c5d370ab13</id>
<content type='text'>
The function is about printing a trace line, not releasing the buffer it
receives too. Move strbuf_release() back outside. This makes it easier
to see how strbuf is managed.

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>
<entry>
<title>trace: avoid unnecessary quoting</title>
<updated>2018-01-16T20:16:54Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2018-01-15T10:59:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1fbdab21bb452ca4732bf088539247047465b99d'/>
<id>urn:sha1:1fbdab21bb452ca4732bf088539247047465b99d</id>
<content type='text'>
Trace output which contains arbitrary strings (e.g., the
arguments to commands which we are running) is always passed
through sq_quote_buf(). That function always adds
single-quotes, even if the output consists of vanilla
characters. This can make the output a bit hard to read.

Let's avoid the quoting if there are no characters which a
shell would interpret. Trace output doesn't necessarily need
to be shell-compatible, but:

  - the shell language is a good ballpark for what humans
    consider readable (well, humans versed in command line
    tools)

  - the run_command bits can be cut-and-pasted to a shell,
    and we'll keep that property

  - it covers any cases which would make the output
    visually ambiguous (e.g., embedded whitespace or quotes)

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
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>
<entry>
<title>sq_quote_argv: drop maxlen parameter</title>
<updated>2018-01-16T20:16:54Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2018-01-15T10:59:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e35f11c29391e557964a39204fae6b89afab6a2a'/>
<id>urn:sha1:e35f11c29391e557964a39204fae6b89afab6a2a</id>
<content type='text'>
No caller passes anything but "0" for this parameter, which
requests that the function ignore it completely. In fact, in
all of history there was only one such caller, and it went
away in 7f51f8bc2b (alias: use run_command api to execute
aliases, 2011-01-07).

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
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>
<entry>
<title>trace: improve performance while category is disabled</title>
<updated>2017-12-06T17:43:02Z</updated>
<author>
<name>Gennady Kupava</name>
<email>gkupava@bloomberg.net</email>
</author>
<published>2017-11-26T20:11:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8eeb25c6795af71400537e8ab064407d7998e0e2'/>
<id>urn:sha1:8eeb25c6795af71400537e8ab064407d7998e0e2</id>
<content type='text'>
Move just enough code from trace.c into trace.h header so all code
necessary to determine that trace is disabled could be inlined to
calling functions.  Then perform the check if the trace key is
enabled sooner in call chain.

Signed-off-by: Gennady Kupava &lt;gkupava@bloomberg.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>trace: remove trace key normalization</title>
<updated>2017-11-27T01:19:08Z</updated>
<author>
<name>Gennady Kupava</name>
<email>gkupava@bloomberg.net</email>
</author>
<published>2017-11-26T20:11:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=406102a731145d39c497e384857ac9f9d2bdccb2'/>
<id>urn:sha1:406102a731145d39c497e384857ac9f9d2bdccb2</id>
<content type='text'>
Trace key normalization is not used, not strictly necessary,
complicates the code and would negatively affect compilation speed if
moved to header.

New trace_default_key key or existing separate marco could be used
instead of passing NULL as a key.

Signed-off-by: Gennady Kupava &lt;gkupava@bloomberg.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Replace Free Software Foundation address in license notices</title>
<updated>2017-11-09T04:21:21Z</updated>
<author>
<name>Todd Zullinger</name>
<email>tmz@pobox.com</email>
</author>
<published>2017-11-07T05:39:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=484257925fada31045aefec7484fd663f7c40c2f'/>
<id>urn:sha1:484257925fada31045aefec7484fd663f7c40c2f</id>
<content type='text'>
The mailing address for the FSF has changed over the years.  Rather than
updating the address across all files, refer readers to gnu.org, as the
GNU GPL documentation now suggests for license notices.  The mailing
address is retained in the full license files (COPYING and LGPL-2.1).

The old address is still present in t/diff-lib/COPYING.  This is
intentional, as the file is used in tests and the contents are not
expected to change.

Signed-off-by: Todd Zullinger &lt;tmz@pobox.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
