diff options
author | David Howells <dhowells@redhat.com> | 2009-11-19 13:11:08 -0500 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2009-11-19 13:11:08 -0500 |
commit | 52bd75fdb135d6133d878ae60c6e7e3f4ebc1cfc (patch) | |
tree | 4fad4fa37ce533c520a4575e5b7df90e19c6a666 /fs/fscache/stats.c | |
parent | 4fbf4291aa15926cd4fdca0ffe9122e89d0459db (diff) |
FS-Cache: Add counters for entry/exit to/from cache operation functions
Count entries to and exits from cache operation table functions. Maintain
these as a single counter that's added to or removed from as appropriate.
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'fs/fscache/stats.c')
-rw-r--r-- | fs/fscache/stats.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/fs/fscache/stats.c b/fs/fscache/stats.c index 65deb99e756b..20233fb44bfd 100644 --- a/fs/fscache/stats.c +++ b/fs/fscache/stats.c | |||
@@ -93,6 +93,23 @@ atomic_t fscache_n_checkaux_okay; | |||
93 | atomic_t fscache_n_checkaux_update; | 93 | atomic_t fscache_n_checkaux_update; |
94 | atomic_t fscache_n_checkaux_obsolete; | 94 | atomic_t fscache_n_checkaux_obsolete; |
95 | 95 | ||
96 | atomic_t fscache_n_cop_alloc_object; | ||
97 | atomic_t fscache_n_cop_lookup_object; | ||
98 | atomic_t fscache_n_cop_lookup_complete; | ||
99 | atomic_t fscache_n_cop_grab_object; | ||
100 | atomic_t fscache_n_cop_update_object; | ||
101 | atomic_t fscache_n_cop_drop_object; | ||
102 | atomic_t fscache_n_cop_put_object; | ||
103 | atomic_t fscache_n_cop_sync_cache; | ||
104 | atomic_t fscache_n_cop_attr_changed; | ||
105 | atomic_t fscache_n_cop_read_or_alloc_page; | ||
106 | atomic_t fscache_n_cop_read_or_alloc_pages; | ||
107 | atomic_t fscache_n_cop_allocate_page; | ||
108 | atomic_t fscache_n_cop_allocate_pages; | ||
109 | atomic_t fscache_n_cop_write_page; | ||
110 | atomic_t fscache_n_cop_uncache_page; | ||
111 | atomic_t fscache_n_cop_dissociate_pages; | ||
112 | |||
96 | /* | 113 | /* |
97 | * display the general statistics | 114 | * display the general statistics |
98 | */ | 115 | */ |
@@ -192,6 +209,26 @@ static int fscache_stats_show(struct seq_file *m, void *v) | |||
192 | atomic_read(&fscache_n_op_deferred_release), | 209 | atomic_read(&fscache_n_op_deferred_release), |
193 | atomic_read(&fscache_n_op_release), | 210 | atomic_read(&fscache_n_op_release), |
194 | atomic_read(&fscache_n_op_gc)); | 211 | atomic_read(&fscache_n_op_gc)); |
212 | |||
213 | seq_printf(m, "CacheOp: alo=%d luo=%d luc=%d gro=%d\n", | ||
214 | atomic_read(&fscache_n_cop_alloc_object), | ||
215 | atomic_read(&fscache_n_cop_lookup_object), | ||
216 | atomic_read(&fscache_n_cop_lookup_complete), | ||
217 | atomic_read(&fscache_n_cop_grab_object)); | ||
218 | seq_printf(m, "CacheOp: upo=%d dro=%d pto=%d atc=%d syn=%d\n", | ||
219 | atomic_read(&fscache_n_cop_update_object), | ||
220 | atomic_read(&fscache_n_cop_drop_object), | ||
221 | atomic_read(&fscache_n_cop_put_object), | ||
222 | atomic_read(&fscache_n_cop_attr_changed), | ||
223 | atomic_read(&fscache_n_cop_sync_cache)); | ||
224 | seq_printf(m, "CacheOp: rap=%d ras=%d alp=%d als=%d wrp=%d ucp=%d dsp=%d\n", | ||
225 | atomic_read(&fscache_n_cop_read_or_alloc_page), | ||
226 | atomic_read(&fscache_n_cop_read_or_alloc_pages), | ||
227 | atomic_read(&fscache_n_cop_allocate_page), | ||
228 | atomic_read(&fscache_n_cop_allocate_pages), | ||
229 | atomic_read(&fscache_n_cop_write_page), | ||
230 | atomic_read(&fscache_n_cop_uncache_page), | ||
231 | atomic_read(&fscache_n_cop_dissociate_pages)); | ||
195 | return 0; | 232 | return 0; |
196 | } | 233 | } |
197 | 234 | ||