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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3C89FC433EF for ; Sun, 22 May 2022 20:10:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349706AbiEVUKA (ORCPT ); Sun, 22 May 2022 16:10:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230015AbiEVUJv (ORCPT ); Sun, 22 May 2022 16:09:51 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7DE8F3632F for ; Sun, 22 May 2022 13:09:49 -0700 (PDT) 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 ams.source.kernel.org (Postfix) with ESMTPS id 395CCB80D7A for ; Sun, 22 May 2022 20:09:48 +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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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