Skip to content

Commit 83c07ec

Browse files
tzanussirostedt
authored andcommitted
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>
1 parent a15f7fc commit 83c07ec

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎kernel/trace/tracing_map.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,8 @@ __tracing_map_insert(struct tracing_map *map, void *key, bool lookup_only)
428428

429429
if (test_key && test_key == key_hash && entry->val &&
430430
keys_match(key, entry->val->key, map->key_size)) {
431-
atomic64_inc(&map->hits);
431+
if (!lookup_only)
432+
atomic64_inc(&map->hits);
432433
return entry->val;
433434
}
434435

0 commit comments

Comments
 (0)