提交 83c07ecc 编写于 作者: T Tom Zanussi 提交者: Steven Rostedt (VMware)

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.comSigned-off-by: NTom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: NSteven Rostedt (VMware) <rostedt@goodmis.org>
上级 a15f7fc2
...@@ -428,7 +428,8 @@ __tracing_map_insert(struct tracing_map *map, void *key, bool lookup_only) ...@@ -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 && if (test_key && test_key == key_hash && entry->val &&
keys_match(key, entry->val->key, map->key_size)) { keys_match(key, entry->val->key, map->key_size)) {
atomic64_inc(&map->hits); if (!lookup_only)
atomic64_inc(&map->hits);
return entry->val; return entry->val;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册