diff options
author | Jason M. Bills <jason.m.bills@linux.intel.com> | 2021-05-24 22:35:24 +0300 |
---|---|---|
committer | Jason M. Bills <jason.m.bills@linux.intel.com> | 2021-05-24 22:35:24 +0300 |
commit | 0e0df451ae365f09d5c0c766b253f23de26901f2 (patch) | |
tree | db4d7d3ce85e02ee01ad58a86ede02ac876aae77 /poky/meta/recipes-kernel/lttng/lttng-modules/0003-fix-mm-tracing-record-slab-name-for-kmem_cache_free-.patch | |
parent | e370fd750e2821620ec427f26f8efab0069824ff (diff) | |
parent | 7e10dee74964afa47859704886128dd256acf854 (diff) | |
download | openbmc-0e0df451ae365f09d5c0c766b253f23de26901f2.tar.xz |
Merge tag '0.52' of ssh://git-amr-1.devtools.intel.com:29418/openbmc-openbmc into update
Diffstat (limited to 'poky/meta/recipes-kernel/lttng/lttng-modules/0003-fix-mm-tracing-record-slab-name-for-kmem_cache_free-.patch')
-rw-r--r-- | poky/meta/recipes-kernel/lttng/lttng-modules/0003-fix-mm-tracing-record-slab-name-for-kmem_cache_free-.patch | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/poky/meta/recipes-kernel/lttng/lttng-modules/0003-fix-mm-tracing-record-slab-name-for-kmem_cache_free-.patch b/poky/meta/recipes-kernel/lttng/lttng-modules/0003-fix-mm-tracing-record-slab-name-for-kmem_cache_free-.patch new file mode 100644 index 000000000..71f99b80a --- /dev/null +++ b/poky/meta/recipes-kernel/lttng/lttng-modules/0003-fix-mm-tracing-record-slab-name-for-kmem_cache_free-.patch @@ -0,0 +1,91 @@ +From 49c603ef2dc6969f4454f0d849af00ee24bb7f04 Mon Sep 17 00:00:00 2001 +From: Michael Jeanson <mjeanson@efficios.com> +Date: Thu, 4 Mar 2021 16:50:12 -0500 +Subject: [PATCH 3/4] fix: mm, tracing: record slab name for kmem_cache_free() + (v5.12) + +See upstream commit: + + commit 3544de8ee6e4817278b15fe08658de49abf58954 + Author: Jacob Wen <jian.w.wen@oracle.com> + Date: Wed Feb 24 12:00:55 2021 -0800 + + mm, tracing: record slab name for kmem_cache_free() + + Currently, a trace record generated by the RCU core is as below. + + ... kmem_cache_free: call_site=rcu_core+0x1fd/0x610 ptr=00000000f3b49a66 + + It doesn't tell us what the RCU core has freed. + + This patch adds the slab name to trace_kmem_cache_free(). + The new format is as follows. + + ... kmem_cache_free: call_site=rcu_core+0x1fd/0x610 ptr=0000000037f79c8d name=dentry + ... kmem_cache_free: call_site=rcu_core+0x1fd/0x610 ptr=00000000f78cb7b5 name=sock_inode_cache + ... kmem_cache_free: call_site=rcu_core+0x1fd/0x610 ptr=0000000018768985 name=pool_workqueue + ... kmem_cache_free: call_site=rcu_core+0x1fd/0x610 ptr=000000006a6cb484 name=radix_tree_node + + We can use it to understand what the RCU core is going to free. For + example, some users maybe interested in when the RCU core starts + freeing reclaimable slabs like dentry to reduce memory pressure. + + Link: https://lkml.kernel.org/r/20201216072804.8838-1-jian.w.wen@oracle.com + +Upstream-status: backport + +Signed-off-by: Michael Jeanson <mjeanson@efficios.com> +Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> +Change-Id: I1ee2fc476614cadcc8d3ac5d8feddc7910e1aa3a +--- + instrumentation/events/lttng-module/kmem.h | 27 ++++++++++++++++++++++ + 1 file changed, 27 insertions(+) + +diff --git a/instrumentation/events/lttng-module/kmem.h b/instrumentation/events/lttng-module/kmem.h +index b134620a..d787ea54 100644 +--- a/instrumentation/events/lttng-module/kmem.h ++++ b/instrumentation/events/lttng-module/kmem.h +@@ -87,6 +87,32 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(kmem_alloc_node, kmem_cache_alloc_node, + TP_ARGS(call_site, ptr, bytes_req, bytes_alloc, gfp_flags, node) + ) + ++#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,12,0)) ++LTTNG_TRACEPOINT_EVENT(kfree, ++ ++ TP_PROTO(unsigned long call_site, const void *ptr), ++ ++ TP_ARGS(call_site, ptr), ++ ++ TP_FIELDS( ++ ctf_integer_hex(unsigned long, call_site, call_site) ++ ctf_integer_hex(const void *, ptr, ptr) ++ ) ++) ++ ++LTTNG_TRACEPOINT_EVENT(kmem_cache_free, ++ ++ TP_PROTO(unsigned long call_site, const void *ptr, const char *name), ++ ++ TP_ARGS(call_site, ptr, name), ++ ++ TP_FIELDS( ++ ctf_integer_hex(unsigned long, call_site, call_site) ++ ctf_integer_hex(const void *, ptr, ptr) ++ ctf_string(name, name) ++ ) ++) ++#else + LTTNG_TRACEPOINT_EVENT_CLASS(kmem_free, + + TP_PROTO(unsigned long call_site, const void *ptr), +@@ -114,6 +140,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(kmem_free, kmem_cache_free, + + TP_ARGS(call_site, ptr) + ) ++#endif + + #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,3,0)) + LTTNG_TRACEPOINT_EVENT_MAP(mm_page_free, kmem_mm_page_free, +-- +2.19.1 + |