From: Alex Vandiver <alexmv@dropbox.com>
To: git@vger.kernel.org
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>,
Ben Peart <peartben@gmail.com>
Subject: [PATCH 2/6] fsmonitor: Stop inline'ing mark_fsmonitor_valid / _invalid
Date: Tue, 2 Jan 2018 19:04:52 -0800 [thread overview]
Message-ID: <9bb36cea369530b980f6542e3e0f24dc142a20a8.1514948078.git.alexmv@dropbox.com> (raw)
In-Reply-To: <20180103030456.8181-1-alexmv@dropbox.com>
In-Reply-To: <023b0090bc7dc0ff9c3bee1efce8c85fdba27de3.1514948078.git.alexmv@dropbox.com>
These were inline'd when they were first introduced, presumably as an
optimization for cases when they were called in tight loops. This
complicates using these functions, as untracked_cache_invalidate_path
is defined in dir.h.
Leave the inline'ing up to the compiler's decision, for ease of use.
Signed-off-by: Alex Vandiver <alexmv@dropbox.com>
---
fsmonitor.c | 18 ++++++++++++++++++
fsmonitor.h | 17 ++---------------
2 files changed, 20 insertions(+), 15 deletions(-)
diff --git a/fsmonitor.c b/fsmonitor.c
index 0af7c4edb..df084235b 100644
--- a/fsmonitor.c
+++ b/fsmonitor.c
@@ -194,6 +194,24 @@ void refresh_fsmonitor(struct index_state *istate)
istate->fsmonitor_last_update = last_update;
}
+void mark_fsmonitor_valid(struct cache_entry *ce)
+{
+ if (core_fsmonitor) {
+ ce->ce_flags |= CE_FSMONITOR_VALID;
+ trace_printf_key(&trace_fsmonitor, "mark_fsmonitor_clean '%s'", ce->name);
+ }
+}
+
+void mark_fsmonitor_invalid(struct index_state *istate, struct cache_entry *ce)
+{
+ if (core_fsmonitor) {
+ ce->ce_flags &= ~CE_FSMONITOR_VALID;
+ untracked_cache_invalidate_path(istate, ce->name);
+ trace_printf_key(&trace_fsmonitor, "mark_fsmonitor_invalid '%s'", ce->name);
+ }
+}
+
+
void add_fsmonitor(struct index_state *istate)
{
int i;
diff --git a/fsmonitor.h b/fsmonitor.h
index cd3cc0ccf..6328745b2 100644
--- a/fsmonitor.h
+++ b/fsmonitor.h
@@ -46,13 +46,7 @@ extern 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.
*/
-static inline void mark_fsmonitor_valid(struct cache_entry *ce)
-{
- if (core_fsmonitor) {
- ce->ce_flags |= CE_FSMONITOR_VALID;
- trace_printf_key(&trace_fsmonitor, "mark_fsmonitor_clean '%s'", ce->name);
- }
-}
+extern void mark_fsmonitor_valid(struct cache_entry *ce);
/*
* Clear the given cache entry's CE_FSMONITOR_VALID bit and invalidate
@@ -61,13 +55,6 @@ static inline void mark_fsmonitor_valid(struct cache_entry *ce)
* trigger an lstat() or invalidate the untracked cache for the
* corresponding directory
*/
-static inline void mark_fsmonitor_invalid(struct index_state *istate, struct cache_entry *ce)
-{
- if (core_fsmonitor) {
- ce->ce_flags &= ~CE_FSMONITOR_VALID;
- untracked_cache_invalidate_path(istate, ce->name);
- trace_printf_key(&trace_fsmonitor, "mark_fsmonitor_invalid '%s'", ce->name);
- }
-}
+extern void mark_fsmonitor_invalid(struct index_state *istate, struct cache_entry *ce);
#endif
--
2.15.1.31.gddce0adfe
next prev parent reply other threads:[~2018-01-03 3:05 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-03 3:04 [PATCH v2 0/6] Minor fsmonitor bugfixes, use with `git diff` Alex Vandiver
2018-01-03 3:04 ` [PATCH 1/6] Fix comments to agree with argument name Alex Vandiver
2018-01-03 3:04 ` Alex Vandiver [this message]
2018-01-04 22:27 ` [PATCH 2/6] fsmonitor: Stop inline'ing mark_fsmonitor_valid / _invalid Johannes Schindelin
2018-01-08 20:27 ` Ben Peart
2018-01-03 3:04 ` [PATCH 3/6] fsmonitor: Update helper tool, now that flags are filled later Alex Vandiver
2018-01-04 23:03 ` Johannes Schindelin
2018-01-03 3:04 ` [PATCH 4/6] fsmonitor: Make output of test-dump-fsmonitor more concise Alex Vandiver
2018-01-04 22:33 ` Johannes Schindelin
2018-01-08 20:33 ` Ben Peart
2018-01-03 3:04 ` [PATCH 5/6] fsmonitor: Remove debugging lines from t/t7519-status-fsmonitor.sh Alex Vandiver
2018-01-03 3:04 ` [PATCH 6/6] fsmonitor: Use fsmonitor data in `git diff` Alex Vandiver
2018-01-04 22:46 ` Johannes Schindelin
2018-01-05 22:22 ` Junio C Hamano
2018-01-08 20:58 ` Ben Peart
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9bb36cea369530b980f6542e3e0f24dc142a20a8.1514948078.git.alexmv@dropbox.com \
--to=alexmv@dropbox.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=peartben@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).