Files
linuxkit/kernel/patches-4.14.x-rt/0061-0003-tracing-Remove-lookups-from-tracing_map-hitcount.patch
Tiejun Chen 9a88a5e986 Upgrade -rt patches to v4.14.29-rt25
Signed-off-by: Tiejun Chen <tiejun.china@gmail.com>
2018-03-30 21:10:01 -07:00

31 lines
1.1 KiB
Diff

From: Tom Zanussi <tom.zanussi@linux.intel.com>
Date: Fri, 22 Sep 2017 14:58:18 -0500
Subject: [PATCH 03/48] 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>
(cherry picked from commit 83c07ecc4203728e85fc4a2ce6fdf25d16ea118e)
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
@@ -428,7 +428,8 @@ static inline struct tracing_map_elt *
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;
}