From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id A727FC433F5 for ; Sun, 22 May 2022 21:19:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 320B78D000B; Sun, 22 May 2022 17:19:47 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2D4618D0009; Sun, 22 May 2022 17:19:47 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0D5088D000B; Sun, 22 May 2022 17:19:47 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id E737E8D0009 for ; Sun, 22 May 2022 17:19:46 -0400 (EDT) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay11.hostedemail.com (Postfix) with ESMTP id 7E83D80AFB for ; Sun, 22 May 2022 20:09:50 +0000 (UTC) X-FDA: 79494469740.23.5072CA5 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf29.hostedemail.com (Postfix) with ESMTP id C2F95120017 for ; Sun, 22 May 2022 20:09:39 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7CB3660DC7; Sun, 22 May 2022 20:09:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 29A73C385AA; Sun, 22 May 2022 20:09:45 +0000 (UTC) Date: Sun, 22 May 2022 16:09:43 -0400 From: Steven Rostedt To: Vasily Averin Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com>, Andrew Morton , kernel@openvz.org, linux-kernel@vger.kernel.org, Ingo Molnar , linux-mm@kvack.org, Shakeel Butt , Roman Gushchin , Vlastimil Babka , Matthew Wilcox , Joonsoo Kim , David Rientjes , Pekka Enberg , Christoph Lameter , Michal Hocko , Muchun Song Subject: Re: [PATCH v4] tracing: add 'accounted' entry into output of allocation tracepoints Message-ID: <20220522160943.5e5950e0@gandalf.local.home> In-Reply-To: <1621d82a-439d-0657-2b7e-5e90c42c2087@openvz.org> References: <0c73ce5c-3625-6187-820e-1277e168b3bc@openvz.org> <1621d82a-439d-0657-2b7e-5e90c42c2087@openvz.org> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Stat-Signature: 1wkof78wn8xhs1aszykcnguapck95b85 X-Rspam-User: Authentication-Results: imf29.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf29.hostedemail.com: domain of "SRS0=tYa+=V6=goodmis.org=rostedt@kernel.org" designates 139.178.84.217 as permitted sender) smtp.mailfrom="SRS0=tYa+=V6=goodmis.org=rostedt@kernel.org" X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: C2F95120017 X-HE-Tag: 1653250179-247477 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Sun, 22 May 2022 07:33:08 +0300 Vasily Averin 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