]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'jh/fsmonitor-prework'
authorJunio C Hamano <gitster@pobox.com>
Mon, 1 Mar 2021 22:02:56 +0000 (14:02 -0800)
committerJunio C Hamano <gitster@pobox.com>
Mon, 1 Mar 2021 22:02:56 +0000 (14:02 -0800)
Preliminary changes to fsmonitor integration.

* jh/fsmonitor-prework:
  fsmonitor: refactor initialization of fsmonitor_last_update token
  fsmonitor: allow all entries for a folder to be invalidated
  fsmonitor: log FSMN token when reading and writing the index
  fsmonitor: log invocation of FSMonitor hook to trace2
  read-cache: log the number of scanned files to trace2
  read-cache: log the number of lstat calls to trace2
  preload-index: log the number of lstat calls to trace2
  p7519: add trace logging during perf test
  p7519: move watchman cleanup earlier in the test
  p7519: fix watchman watch-list test on Windows
  p7519: do not rely on "xargs -d" in test

1  2 
fsmonitor.c
read-cache.c
t/perf/p7519-fsmonitor.sh

diff --cc fsmonitor.c
index fe9e9d7baf44502da0c6378c09fa5caad2b38aa4,e12214b30071e7241fb3c2f37c1457954495161c..23f8a0c97ebb4b6e5829a70e0fd9da344f710eae
@@@ -87,10 -82,16 +87,14 @@@ int read_fsmonitor_extension(struct ind
        }
        istate->fsmonitor_dirty = fsmonitor_dirty;
  
 -      if (!istate->split_index &&
 -          istate->fsmonitor_dirty->bit_size > istate->cache_nr)
 -              BUG("fsmonitor_dirty has more entries than the index (%"PRIuMAX" > %u)",
 -                  (uintmax_t)istate->fsmonitor_dirty->bit_size, istate->cache_nr);
 +      if (!istate->split_index)
 +              assert_index_minimum(istate, istate->fsmonitor_dirty->bit_size);
  
-       trace_printf_key(&trace_fsmonitor, "read fsmonitor extension successful");
+       trace2_data_string("index", NULL, "extension/fsmn/read/token",
+                          istate->fsmonitor_last_update);
+       trace_printf_key(&trace_fsmonitor,
+                        "read fsmonitor extension successful '%s'",
+                        istate->fsmonitor_last_update);
        return 0;
  }
  
diff --cc read-cache.c
Simple merge
Simple merge