| From: Tom Zanussi <tom.zanussi@linux.intel.com> |
| Date: Tue, 5 Sep 2017 16:57:48 -0500 |
| Subject: [PATCH 36/40] tracing: Remove lookups from tracing_map hitcount |
| |
| Lookups inflate the hitcount, making it essentially useless. Only |
| inserts and updates should really affect the hitcount anyway, so |
| explicitly filter lookups out. |
| |
| Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> |
| Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> |
| --- |
| kernel/trace/tracing_map.c | 3 ++- |
| 1 file changed, 2 insertions(+), 1 deletion(-) |
| |
| --- a/kernel/trace/tracing_map.c |
| +++ b/kernel/trace/tracing_map.c |
| @@ -535,7 +535,8 @@ static inline struct tracing_map_elt * |
| if (test_key && test_key == key_hash) { |
| if (entry->val && |
| keys_match(key, entry->val->key, map->key_size)) { |
| - atomic64_inc(&map->hits); |
| + if (!lookup_only) |
| + atomic64_inc(&map->hits); |
| return entry->val; |
| } else if (unlikely(!entry->val)) { |
| /* |