Skip to content

Commit

Permalink
tracing: Remove lookups from tracing_map hitcount
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tom Zanussi authored and Steven Rostedt (VMware) committed Oct 4, 2017
1 parent a15f7fc commit 83c07ec
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kernel/trace/tracing_map.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 83c07ec

Please sign in to comment.