git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2 0/2] fsmonitor inline / testing cleanup

From
Nipunn Koorapati via GitGitGadget <gitgitgadget@gmail.com>
Date
Oct 22, 2020, 00:21 UTC
Message-ID
<pull.767.v2.git.1603326066.gitgitgadget@gmail.com>
In-Reply-To
<pull.767.git.1603303474.gitgitgadget@gmail.com>
UPDATE SINCE v1
 * Removed include of dir.h from fsmonitor.h as it's no longer needed

Credit to alexmv again - I'm rebasing these changes from a couple years ago for contribution.

Full comments are available here - https://public-inbox.org/git/01ad47b4-aa5e-461a-270b-dd60032afbd1@gmail.com/ To summarize the relevant points

Re: Inlining mark_fsmonitor_[in]valid peartben said
I'm fine with these not being inline.  I was attempting to minimize the 
performance impact of the fsmonitor code when it was not even turned on. 
  Inlineing these functions allowed it to be kept to a simple test but I 
suspect (especially with modern optimizing compilers) that the overhead 
of calling a function to do that test is negligible.

Re test-dump-fsmonitor peartben suggested keeping the +- syntax as well as the summary counts dscho suggested dumping the invalid entries

Alex Vandiver (2):
  fsmonitor: stop inline'ing mark_fsmonitor_valid / _invalid
  fsmonitor: make output of test-dump-fsmonitor more concise
 fsmonitor.c                    | 19 +++++++++++++++++++
 fsmonitor.h                    | 19 ++-----------------
 t/helper/test-dump-fsmonitor.c | 14 ++++++++++++--
 3 files changed, 33 insertions(+), 19 deletions(-)
base-commit: 69986e19ffcfb9af674ae5180689ab7bbf92ed28
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-767%2Fnipunn1313%2Ffsmonitor-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-767/nipunn1313/fsmonitor-v2
Pull-Request: https://github.com/gitgitgadget/git/pull/767
Range-diff vs v1:
 1:  049989652c ! 1:  ab9c330ca8 fsmonitor: stop inline'ing mark_fsmonitor_valid / _invalid
     @@ fsmonitor.c: void refresh_fsmonitor(struct index_state *istate)
       	unsigned int i;
      
       ## fsmonitor.h ##
     +@@
     + #define FSMONITOR_H
     + 
     + #include "cache.h"
     +-#include "dir.h"
     + 
     + extern struct trace_key trace_fsmonitor;
     + 
      @@ fsmonitor.h: void refresh_fsmonitor(struct index_state *istate);
        * called any time the cache entry has been updated to reflect the
        * current state of the file on disk.
 2:  598521091a = 2:  8ff657ded1 fsmonitor: make output of test-dump-fsmonitor more concise
-- 
gitgitgadget
Previous: Nipunn KoorapatiNext: Alex Vandiver via GitGitGadget
Message 11 of 18 in “fsmonitor inline / testing cleanup”
  1. 0/2 fsmonitor inline / testing cleanupNipunn Koorapati via GitGitGadget, Oct 21, 2020
  2. 2/2 fsmonitor: make output of test-dump-fsmonitor more conciseAlex Vandiver via GitGitGadget, Oct 21, 2020
  3. 1/2 fsmonitor: stop inline'ing mark_fsmonitor_valid / _invalidAlex Vandiver via GitGitGadget, Oct 21, 2020
  4. Taylor BlauOct 21, 2020
  5. Junio C HamanoOct 21, 2020
  6. Taylor BlauOct 21, 2020
  7. Junio C HamanoOct 21, 2020
  8. Nipunn KoorapatiOct 21, 2020
  9. Taylor BlauOct 21, 2020
  10. Nipunn KoorapatiOct 21, 2020
  11. 0/2 fsmonitor inline / testing cleanupNipunn Koorapati via GitGitGadget, Oct 22, 2020
  12. 2/2 fsmonitor: make output of test-dump-fsmonitor more conciseAlex Vandiver via GitGitGadget, Oct 22, 2020
  13. 1/2 fsmonitor: stop inline'ing mark_fsmonitor_valid / _invalidAlex Vandiver via GitGitGadget, Oct 22, 2020
  14. Taylor BlauOct 22, 2020
  15. Junio C HamanoOct 22, 2020
  16. Taylor BlauOct 22, 2020
  17. Junio C HamanoOct 22, 2020
  18. Nipunn KoorapatiOct 22, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.