[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220522160943.5e5950e0@gandalf.local.home>
Date: Sun, 22 May 2022 16:09:43 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Vasily Averin <vvs@...nvz.org>
Cc: Hyeonggon Yoo <42.hyeyoo@...il.com>,
Andrew Morton <akpm@...ux-foundation.org>, kernel@...nvz.org,
linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...hat.com>,
linux-mm@...ck.org, Shakeel Butt <shakeelb@...gle.com>,
Roman Gushchin <roman.gushchin@...ux.dev>,
Vlastimil Babka <vbabka@...e.cz>,
Matthew Wilcox <willy@...radead.org>,
Joonsoo Kim <iamjoonsoo.kim@....com>,
David Rientjes <rientjes@...gle.com>,
Pekka Enberg <penberg@...nel.org>,
Christoph Lameter <cl@...ux.com>,
Michal Hocko <mhocko@...e.com>,
Muchun Song <songmuchun@...edance.com>
Subject: Re: [PATCH v4] tracing: add 'accounted' entry into output of
allocation tracepoints
On Sun, 22 May 2022 07:33:08 +0300
Vasily Averin <vvs@...nvz.org> wrote:
> > slab_flags=SLAB_RECLAIM_ACCOUNT|SLAB_ACCOUNT|SLAB_STORE_USER
> > instead of just printing 'accounted=true/false'. This patch is too
> > specific to SLAB_ACCOUNT.
>
> Any extra output degrades performance.
> For my task it's not important to know SLAB flags, I just need to understand,
> is current allocation accounted or not.
If you do save the flags in the event, you can report that on output with
the __print_flags() macro:
TP_fast_assign(
[..]
__entry->sflags = s ? s->flags;
[..]
)
TP_printk("... slab_flags=%s ..",
[..]
__print_flags(sflags, "|",
{ SLAB_CONSISTENCY_CHECKS, "CONSISTENCY_CHECKS" },
{ SLAB_RED_ZONE, "RED_ZONE" },
{ SLAB_POISON, "POISON" },
{ SLAB_HWCACHE_ALIGN, "HWCACHE_ALIGN" },
{ SLAB_CACHE_DMA, "CACHE_DMA" },
{ SLAB_CACHE_DMA32, "CACHE_DMA32" },
{ SLAB_STORE_USER, "STORE_USER" },
{ SLAB_PANIC, "PANIC" }), ... )
And you get the flag output looking nicely, and all the processing is done
on the reader path.
That's if you find it useful at all.
-- Steve
Powered by blists - more mailing lists