diff options
author | Tom Zanussi <tom.zanussi@linux.intel.com> | 2017-09-22 14:58:18 -0500 |
---|---|---|
committer | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2017-10-04 13:05:42 -0400 |
commit | 83c07ecc4203728e85fc4a2ce6fdf25d16ea118e (patch) | |
tree | c104ef79f4e69ac38d0f30b1abef8bc7101f4d87 /kernel/trace/tracing_map.c | |
parent | a15f7fc20389a8827d5859907568b201234d4b79 (diff) |
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.
Link: http://lkml.kernel.org/r/c8d9dc39d269a8abf88bf4102d0dfc65deb0fc7f.1506105045.git.tom.zanussi@linux.intel.com
Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/tracing_map.c')
-rw-r--r-- | kernel/trace/tracing_map.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/trace/tracing_map.c b/kernel/trace/tracing_map.c index 305039b122fa..07e75344725b 100644 --- a/kernel/trace/tracing_map.c +++ b/kernel/trace/tracing_map.c @@ -428,7 +428,8 @@ __tracing_map_insert(struct tracing_map *map, void *key, bool lookup_only) if (test_key && test_key == key_hash && 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; } |