Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp1665862ioo; Sun, 22 May 2022 23:37:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxhAg2CcssebwtigVP0doyLzdYnmpofqEPCyvt/GNqfBje0WCSk7H6hPtbsX3YY9rXGse2c X-Received: by 2002:a17:902:9a07:b0:161:fdc3:3b9d with SMTP id v7-20020a1709029a0700b00161fdc33b9dmr12304424plp.94.1653287830009; Sun, 22 May 2022 23:37:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653287830; cv=none; d=google.com; s=arc-20160816; b=jbfsuBkg88eXt0EZvZqG8o47aa7Rp6YCz3WaVCZp7YcfM1t4J9LgBCBbJn3jTZRSh/ CSlExvIsYZMR0gVXsMzeJffbPZxgM2SV+8A0BPP5z9/X1BPPuYR6GOkFHKpM5zlTr+FV qqmkUGpDAotd3OVNrEzpT3sU+FISFC9+981KrydzK8pP4dsRMbaen5r1I/XXQTA7i1Oq G4yISBQ0mw58J5nYFO+bJnK+kpN8QKe0nWYjEK+PMvmajI0V7nEyZpQyY4yGmMz9cM30 DKzyy/gxi1x8eJgZMujOUTggzLEQqnNRndbDYa/gQVmNRRsZFrzf6ANBxnkkvWVIKMEK KmhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=5G5kDDi5efIcmI9dCVPwGMSFFdPYyW9BVw/srxc4rV8=; b=TN4K8SyeLeA3XtzS+BQEAwAD5gWvgAYzHUMTf6gmNctAKXPcybUED8/RUrdTf9aP+X oANpzUBtpn4qKe0nou7t5xqH5+ZdtXjdGClUTzxUAaDH6QILe9ylGCNEUjJ85vVk7qrc YaN9LA4s7UH8YvLfkbveWwI526PTCme0LIlJtVkgumCtxzfQB70w7A3B5G5+Y4/C99qR eUc3yE7Sy1GS3dGRtEdRg7FX9G7N1VKXZgrdopmszb7LySuibPIDNqKNAQkO6D7aDKRd 9OkxkDvFH2v6BOMDtQyR2qiI1weM09oC+6XN48/aibUw6jGqEeIRjaxbn6u080/catOE WYDg== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id e15-20020a656bcf000000b003c6aa1dce5fsi8853954pgw.872.2022.05.22.23.37.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 May 2022 23:37:09 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B49D449F05; Sun, 22 May 2022 23:10:53 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349573AbiEVUJ7 (ORCPT + 99 others); Sun, 22 May 2022 16:09:59 -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 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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