Skip to content

Commit 9a797f7

Browse files
author
CKI KWF Bot
committed
Merge: kmem/tracing: add kmem name to kmem_cache_alloc tracepoint
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10/-/merge_requests/1691 JIRA: https://issues.redhat.com/browse/RHEL-124143 This patch is a backport of the following upstream commit: commit dfd04ad Author: Wander Lairson Costa <wander@redhat.com> Date: Mon Aug 25 09:59:26 2025 -0300 Signed-off-by: Charles Haithcock <chaithco@redhat.com> Approved-by: Luiz Capitulino <luizcap@redhat.com> Approved-by: Herton R. Krzesinski <herton@redhat.com> Approved-by: Rafael Aquini <raquini@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: CKI GitLab Kmaint Pipeline Bot <26919896-cki-kmaint-pipeline-bot@users.noreply.gitlab.com>
2 parents 6c55121 + a4fed22 commit 9a797f7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

include/trace/events/kmem.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ TRACE_EVENT(kmem_cache_alloc,
2222
TP_STRUCT__entry(
2323
__field( unsigned long, call_site )
2424
__field( const void *, ptr )
25+
__string( name, s->name )
2526
__field( size_t, bytes_req )
2627
__field( size_t, bytes_alloc )
2728
__field( unsigned long, gfp_flags )
@@ -32,6 +33,7 @@ TRACE_EVENT(kmem_cache_alloc,
3233
TP_fast_assign(
3334
__entry->call_site = call_site;
3435
__entry->ptr = ptr;
36+
__assign_str(name);
3537
__entry->bytes_req = s->object_size;
3638
__entry->bytes_alloc = s->size;
3739
__entry->gfp_flags = (__force unsigned long)gfp_flags;
@@ -41,9 +43,10 @@ TRACE_EVENT(kmem_cache_alloc,
4143
(s->flags & SLAB_ACCOUNT)) : false;
4244
),
4345

44-
TP_printk("call_site=%pS ptr=%p bytes_req=%zu bytes_alloc=%zu gfp_flags=%s node=%d accounted=%s",
46+
TP_printk("call_site=%pS ptr=%p name=%s bytes_req=%zu bytes_alloc=%zu gfp_flags=%s node=%d accounted=%s",
4547
(void *)__entry->call_site,
4648
__entry->ptr,
49+
__get_str(name),
4750
__entry->bytes_req,
4851
__entry->bytes_alloc,
4952
show_gfp_flags(__entry->gfp_flags),

0 commit comments

Comments
 (0)