Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp433838pxm; Wed, 2 Mar 2022 19:20:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJy5IUZgH2qluaEw7bvoBzVQoQ1VcIDhzYwS/cjkRWVRYeV8qwQuO1XTJfzbVX03FDv9a+FE X-Received: by 2002:a05:6a00:cc7:b0:4ec:c6f3:ad29 with SMTP id b7-20020a056a000cc700b004ecc6f3ad29mr36237202pfv.66.1646277636500; Wed, 02 Mar 2022 19:20:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646277636; cv=none; d=google.com; s=arc-20160816; b=wftaBJkdj/0GxHsWj2ezz3aYSDJVccsqML9Yyd7APzk0wbZc2ettjihOL2ApXup482 SpZNqFIn3xa9HH1jJM+RXmjgrFeXuoP6Cp7fE/bc8zIe/7r7WZYkkH+k6SmvhLK1ENhD U7NyyMc1rX5mVBvsqJj6ChW+L3ikrunQ4hG8x5CXjsR22W73YDzS/Q0gp/WrdInL7Jlz d0ibOX6sO07hncJtSGH4e93BvifEubXLa2IGLW0PiDWDBGGCGXFxoH2omu6iyGMZaDDT 887L8NBMCZqelCHXV+j4E/CgGCQzwqUW8BnePwwd0USFKuRIoS05Xy5orSKULshHIhp3 +E6g== 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=52meffS+Zhc8dWBAO4NSUPZ+7VHWvJ92kdbA1OPQL58=; b=u+/CR4VLQqL5zeLpYBptL6moPA4BJ4qTdsUKYNBB82kiwI0WxIKbq+ADIAVPxGcydi V5SRLunIIHfyTMgIlwGKvmcmFwHUInnfau0LhxBgaavLRBjFqle+peMH+wYvrI7n7PCk fHaba++8GXm41RCU/O9XJU7XWP14Wh1nqvTXMHwr35QgJXq5yR6xFv8XS4qGWpc8t5wI xGfj1q/Dus4RPBROUT2/LrgnGIVf9RZ7Q2zxVy/vgdXYADdjOdZ15/8uwR1bFIO/S6on yVjzY6py+HKDJRo6D/ao313F4BUsFOkpQg5FvB96RZiMZqEsrIGzAV8/DrcQOTgLmsy+ qN0Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t18-20020a170902e85200b0014fd9b3f52bsi926862plg.290.2022.03.02.19.20.19; Wed, 02 Mar 2022 19:20:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232004AbiCCDVA (ORCPT + 99 others); Wed, 2 Mar 2022 22:21:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231966AbiCCDU7 (ORCPT ); Wed, 2 Mar 2022 22:20:59 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB26869CD7 for ; Wed, 2 Mar 2022 19:20:14 -0800 (PST) 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 7F0FE61700 for ; Thu, 3 Mar 2022 03:20:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EA9CEC004E1; Thu, 3 Mar 2022 03:20:12 +0000 (UTC) Date: Wed, 2 Mar 2022 22:20:11 -0500 From: Steven Rostedt To: Masami Hiramatsu Cc: linux-kernel@vger.kernel.org, Ingo Molnar , Andrew Morton , Joel Fernandes , Peter Zijlstra , Tom Zanussi Subject: Re: [PATCH 0/2] tracing: Add a way to have custom events in the tracefs directory Message-ID: <20220302222011.46102726@rorschach.local.home> In-Reply-To: <20220303103101.913c64b92bc7a65e90e22eb1@kernel.org> References: <20220302032414.503960863@goodmis.org> <20220303103101.913c64b92bc7a65e90e22eb1@kernel.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=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham 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 Thu, 3 Mar 2022 10:31:01 +0900 Masami Hiramatsu wrote: > On Tue, 01 Mar 2022 22:24:14 -0500 > Steven Rostedt wrote: > > > We would like to have in production a way to record sched wakeups and > > sched switch, and be able to save the information in a small file > > with as much available as possible. Currently the wake up and sched switch > > events are 36 and 64 bytes each (plus a 4 byte ring buffer event header). > > > > By having a custom module tap into the sched switch and waking trace points > > we can bring those events down to 16 and 14 bytes respectively. > > OK, so we can use eprobe to shrink down the 'visible' log for the event, > but it still consumes the event buffer because eprobe will fetch the event > data from the event log. So to reduce the actual consumption of the > trace buffer, we have to define a new event format and callback. > Well, the buffer content itself is shrunk, and we were using eprobes to begin with for this purpose. The issue is that eprobes still needs to record the event into a temporary buffer (or the ring buffer then discard it) to copy the data into the eprobe. This makes using eprobes slower than the event it is taken from, as the event it is attached to must run first. Since we have the ability to create a custom module, to do this directly, and this is much smaller and even a bit faster than the tracepoints we are attached to. -- Steve