<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/diffcore-rename.c, branch gitk-resize-error</title>
<subtitle>Fork of git SCM with my patches.</subtitle>
<id>http://git.kilabit.info/git/atom?h=gitk-resize-error</id>
<link rel='self' href='http://git.kilabit.info/git/atom?h=gitk-resize-error'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/'/>
<updated>2021-08-24T22:32:39Z</updated>
<entry>
<title>Merge branch 'en/ort-perf-batch-15'</title>
<updated>2021-08-24T22:32:39Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-08-24T22:32:39Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=08ac213965dd861b7182ee7072b613ae29c72ae1'/>
<id>urn:sha1:08ac213965dd861b7182ee7072b613ae29c72ae1</id>
<content type='text'>
Final batch for "merge -sort" optimization.

* en/ort-perf-batch-15:
  merge-ort: remove compile-time ability to turn off usage of memory pools
  merge-ort: reuse path strings in pool_alloc_filespec
  merge-ort: store filepairs and filespecs in our mem_pool
  diffcore-rename, merge-ort: add wrapper functions for filepair alloc/dealloc
  merge-ort: switch our strmaps over to using memory pools
  merge-ort: set up a memory pool
  merge-ort: add pool_alloc, pool_calloc, and pool_strndup wrappers
  diffcore-rename: use a mem_pool for exact rename detection's hashmap
  merge-ort: rename str{map,intmap,set}_func()
</content>
</entry>
<entry>
<title>Merge branch 'ah/plugleaks'</title>
<updated>2021-08-04T20:28:52Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-08-04T20:28:52Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=31f9acf9ce29ae210b54997f7fb388a2dc543d53'/>
<id>urn:sha1:31f9acf9ce29ae210b54997f7fb388a2dc543d53</id>
<content type='text'>
Leak plugging.

* ah/plugleaks:
  reset: clear_unpack_trees_porcelain to plug leak
  builtin/rebase: fix options.strategy memory lifecycle
  builtin/merge: free found_ref when done
  builtin/mv: free or UNLEAK multiple pointers at end of cmd_mv
  convert: release strbuf to avoid leak
  read-cache: call diff_setup_done to avoid leak
  ref-filter: also free head for ATOM_HEAD to avoid leak
  diffcore-rename: move old_dir/new_dir definition to plug leak
  builtin/for-each-repo: remove unnecessary argv copy to plug leak
  builtin/submodule--helper: release unused strbuf to avoid leak
  environment: move strbuf into block to plug leak
  fmt-merge-msg: free newly allocated temporary strings when done
</content>
</entry>
<entry>
<title>merge-ort: store filepairs and filespecs in our mem_pool</title>
<updated>2021-07-30T16:01:19Z</updated>
<author>
<name>Elijah Newren</name>
<email>newren@gmail.com</email>
</author>
<published>2021-07-30T11:47:42Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=f239fff4c183b231134115bc3b38b4f8e3982d3e'/>
<id>urn:sha1:f239fff4c183b231134115bc3b38b4f8e3982d3e</id>
<content type='text'>
For the testcases mentioned in commit 557ac0350d ("merge-ort: begin
performance work; instrument with trace2_region_* calls", 2020-10-28),
this change improves the performance as follows:

                            Before                  After
    no-renames:       198.1 ms ±  2.6 ms     198.5 ms ±  3.4 ms
    mega-renames:     715.8 ms ±  4.0 ms     679.1 ms ±  5.6 ms
    just-one-mega:    276.8 ms ±  4.2 ms     271.9 ms ±  2.8 ms

Signed-off-by: Elijah Newren &lt;newren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>diffcore-rename, merge-ort: add wrapper functions for filepair alloc/dealloc</title>
<updated>2021-07-30T16:01:19Z</updated>
<author>
<name>Elijah Newren</name>
<email>newren@gmail.com</email>
</author>
<published>2021-07-30T11:47:41Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=a8791ef6492bf702ba70352009cbd28fb581c6e2'/>
<id>urn:sha1:a8791ef6492bf702ba70352009cbd28fb581c6e2</id>
<content type='text'>
We want to be able to allocate filespecs and filepairs using a mem_pool.
However, filespec data will still remain outside the pool (perhaps in
the future we could plumb the pool through the various diff APIs to
allocate the filespec data too, but for now we are limiting the scope).
Add some extra functions to allocate these appropriately based on the
non-NULL-ness of opt-&gt;priv-&gt;pool, as well as some extra functions to
handle correctly deallocating the relevant parts of them.  A future
commit will make use of these new functions.

Signed-off-by: Elijah Newren &lt;newren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>diffcore-rename: use a mem_pool for exact rename detection's hashmap</title>
<updated>2021-07-30T16:01:18Z</updated>
<author>
<name>Elijah Newren</name>
<email>newren@gmail.com</email>
</author>
<published>2021-07-30T11:47:37Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=fa0e936fbb683dbce70b797ae8a5be6b88f48d88'/>
<id>urn:sha1:fa0e936fbb683dbce70b797ae8a5be6b88f48d88</id>
<content type='text'>
Exact rename detection, via insert_file_table(), uses a hashmap to store
files by oid.  Use a mem_pool for the hashmap entries so these can all be
allocated and deallocated together.

For the testcases mentioned in commit 557ac0350d ("merge-ort: begin
performance work; instrument with trace2_region_* calls", 2020-10-28),
this change improves the performance as follows:

                            Before                  After
    no-renames:      204.2  ms ±  3.0  ms   202.5  ms ±  3.2  ms
    mega-renames:      1.076 s ±  0.015 s     1.072 s ±  0.012 s
    just-one-mega:   364.1  ms ±  7.0  ms   357.3  ms ±  3.9  ms

Signed-off-by: Elijah Newren &lt;newren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'en/rename-limits-doc'</title>
<updated>2021-07-28T20:18:03Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-07-28T20:18:02Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=268055bfdec5cc2228ade6f3ff7094632568c82a'/>
<id>urn:sha1:268055bfdec5cc2228ade6f3ff7094632568c82a</id>
<content type='text'>
Documentation on "git diff -l&lt;n&gt;" and diff.renameLimit have been
updated, and the defaults for these limits have been raised.

* en/rename-limits-doc:
  rename: bump limit defaults yet again
  diffcore-rename: treat a rename_limit of 0 as unlimited
  doc: clarify documentation for rename/copy limits
  diff: correct warning message when renameLimit exceeded
</content>
</entry>
<entry>
<title>diffcore-rename: move old_dir/new_dir definition to plug leak</title>
<updated>2021-07-26T19:19:20Z</updated>
<author>
<name>Andrzej Hunt</name>
<email>ajrhunt@google.com</email>
</author>
<published>2021-07-25T13:08:23Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=4e3250b7fb806f3e391239d680638ee44068ffe1'/>
<id>urn:sha1:4e3250b7fb806f3e391239d680638ee44068ffe1</id>
<content type='text'>
old_dir/new_dir are free()'d at the end of update_dir_rename_counts,
however if we return early we'll never free those strings. Therefore
we should move all new allocations after the possible early return,
avoiding a leak.

This seems like a fairly recent leak, that started happening since the
early-return was added in:
  1ad69eb0dc (diffcore-rename: compute dir_rename_counts in stages, 2021-02-27)

LSAN output from t0022:

Direct leak of 7 byte(s) in 1 object(s) allocated from:
    #0 0x486804 in strdup ../projects/compiler-rt/lib/asan/asan_interceptors.cpp:452:3
    #1 0xa71e48 in xstrdup wrapper.c:29:14
    #2 0x7db9c7 in update_dir_rename_counts diffcore-rename.c:464:12
    #3 0x7db6ae in find_renames diffcore-rename.c:1062:3
    #4 0x7d76c3 in diffcore_rename_extended diffcore-rename.c:1472:18
    #5 0x7b4cfc in diffcore_std diff.c:6705:4
    #6 0x855e46 in log_tree_diff_flush log-tree.c:846:2
    #7 0x856574 in log_tree_diff log-tree.c:955:3
    #8 0x856574 in log_tree_commit log-tree.c:986:10
    #9 0x9a9c67 in print_commit_summary sequencer.c:1329:7
    #10 0x52e623 in cmd_commit builtin/commit.c:1862:3
    #11 0x4ce83e in run_builtin git.c:475:11
    #12 0x4ccafe in handle_builtin git.c:729:3
    #13 0x4cb01c in run_argv git.c:818:4
    #14 0x4cb01c in cmd_main git.c:949:19
    #15 0x6b3f3d in main common-main.c:52:11
    #16 0x7fe397c7a349 in __libc_start_main (/lib64/libc.so.6+0x24349)

Direct leak of 7 byte(s) in 1 object(s) allocated from:
    #0 0x486804 in strdup ../projects/compiler-rt/lib/asan/asan_interceptors.cpp:452:3
    #1 0xa71e48 in xstrdup wrapper.c:29:14
    #2 0x7db9bc in update_dir_rename_counts diffcore-rename.c:463:12
    #3 0x7db6ae in find_renames diffcore-rename.c:1062:3
    #4 0x7d76c3 in diffcore_rename_extended diffcore-rename.c:1472:18
    #5 0x7b4cfc in diffcore_std diff.c:6705:4
    #6 0x855e46 in log_tree_diff_flush log-tree.c:846:2
    #7 0x856574 in log_tree_diff log-tree.c:955:3
    #8 0x856574 in log_tree_commit log-tree.c:986:10
    #9 0x9a9c67 in print_commit_summary sequencer.c:1329:7
    #10 0x52e623 in cmd_commit builtin/commit.c:1862:3
    #11 0x4ce83e in run_builtin git.c:475:11
    #12 0x4ccafe in handle_builtin git.c:729:3
    #13 0x4cb01c in run_argv git.c:818:4
    #14 0x4cb01c in cmd_main git.c:949:19
    #15 0x6b3f3d in main common-main.c:52:11
    #16 0x7fe397c7a349 in __libc_start_main (/lib64/libc.so.6+0x24349)

SUMMARY: AddressSanitizer: 14 byte(s) leaked in 2 allocation(s).

Signed-off-by: Andrzej Hunt &lt;andrzej@ahunt.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'en/ort-perf-batch-13'</title>
<updated>2021-07-17T00:42:45Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-07-17T00:42:45Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=fdbcdfcf61a64a1c2d2dd58c1a9111b45b6c1536'/>
<id>urn:sha1:fdbcdfcf61a64a1c2d2dd58c1a9111b45b6c1536</id>
<content type='text'>
Performance tweaks of "git merge -sort" around lazy fetching of objects.

* en/ort-perf-batch-13:
  merge-ort: add prefetching for content merges
  diffcore-rename: use a different prefetch for basename comparisons
  diffcore-rename: allow different missing_object_cb functions
  t6421: add tests checking for excessive object downloads during merge
  promisor-remote: output trace2 statistics for number of objects fetched
</content>
</entry>
<entry>
<title>Merge branch 'en/ort-perf-batch-12'</title>
<updated>2021-07-17T00:42:45Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-07-17T00:42:45Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=89efac81c716bb296098fd1c5482bac3ecb344c5'/>
<id>urn:sha1:89efac81c716bb296098fd1c5482bac3ecb344c5</id>
<content type='text'>
More fix-ups and optimization to "merge -sort".

* en/ort-perf-batch-12:
  merge-ort: miscellaneous touch-ups
  Fix various issues found in comments
  diffcore-rename: avoid unnecessary strdup'ing in break_idx
  merge-ort: replace string_list_df_name_compare with faster alternative
</content>
</entry>
<entry>
<title>diffcore-rename: treat a rename_limit of 0 as unlimited</title>
<updated>2021-07-15T23:54:24Z</updated>
<author>
<name>Elijah Newren</name>
<email>newren@gmail.com</email>
</author>
<published>2021-07-15T00:45:23Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=9dd29dbef01e39fe9df81ad9e5e193128d8c5ad5'/>
<id>urn:sha1:9dd29dbef01e39fe9df81ad9e5e193128d8c5ad5</id>
<content type='text'>
In commit 89973554b52c (diffcore-rename: make diff-tree -l0 mean
-l&lt;large&gt;, 2017-11-29), -l0 was given a special magical "large" value,
but one which was not large enough for some uses (as can be seen from
commit 9f7e4bfa3b6d (diff: remove silent clamp of renameLimit,
2017-11-13).  Make 0 (or a negative value) be treated as unlimited
instead and update the documentation to mention this.

Signed-off-by: Elijah Newren &lt;newren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
