Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp4066975pxu; Mon, 12 Oct 2020 08:39:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzN7ls0YZbysDncVSgsKUL+W2PCMUohbgO9jq7g8vighA21lQVYcxontXBp1g55im5pmMqe X-Received: by 2002:a50:bc01:: with SMTP id j1mr15329368edh.66.1602517195722; Mon, 12 Oct 2020 08:39:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602517195; cv=none; d=google.com; s=arc-20160816; b=Ye9WEEg4H+88SslszrFeMI2D3PyeQeO/ReKwCQ5ipeGa74Sy3KMtDJFY4iIffEkwNM HmW5j5yTV34mTktVFFACQjRFT+nTfNlvscHYNtnc5i1VMYoaxYGRXsXFiNbbDXQexSzH xvSwvc7J+eQDJtbEQtTG3zc9BE8qf+D5ZD0hcM3Y4JotaACrL3FxzVAVj1PqdI38PbSd 2ujY7tLouv01ut3DWKANPzuxPStPArIcD9OB8KkrbH4pVO/SMTWUGs7JNqGf7HYmMEEl kzi229+cQpgA3mijQnJjCmAxc9KPhEjhZCjBFHzcs4hB/h8Cd0+/QgCv8tJBWEQ9Fw/f EU0Q== 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=qQVAtk3WNXNi7dlkgN6dMbx+UPU6jG3C6lrrMf+WBhM=; b=0wMQf7dI3DHIolr7IvmfNlARaIV/MyqtIDy78nsvY8hHpoCIpECyW5vnI+ulhCJrdO dkt6Ip6fz6FRMis54hNTeeVeEw9pSwtI+IdQ7Nq0MMHz+xda7lJPxl6UjkVpz5FP3VS0 tPISBkPEO4P80bA04NULhffovBalA/zJEWzUfkvDK2o/wR5cvOTZO+3GDF5LUTcOA7Do wVax+twafymEaTCh4ZlSV+ZfEtn+GWmFAEsGCIUv2UmRp09D73rpeGVUTWJB1LjavOrS cSPhu9r3r7Xeb0hnQ7h7a2faGR7yWfobOECgPsz+rVw8eQ05N5ADpZiCJlcBq6DF4b1r qNcg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ay1si12445286edb.3.2020.10.12.08.39.32; Mon, 12 Oct 2020 08:39:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390046AbgJLPhx (ORCPT + 99 others); Mon, 12 Oct 2020 11:37:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:42782 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389121AbgJLPhw (ORCPT ); Mon, 12 Oct 2020 11:37:52 -0400 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A340F20575; Mon, 12 Oct 2020 15:37:50 +0000 (UTC) Date: Mon, 12 Oct 2020 11:37:48 -0400 From: Steven Rostedt To: Rob Clark Cc: Rob Clark , LKML , Ingo Molnar , "Peter Zijlstra (Intel)" , Phil Auld , Valentin Schneider , Thara Gopinath , Randy Dunlap , Vincent Donnefort , Mel Gorman , Andrew Morton , Jens Axboe , Marcelo Tosatti , Frederic Weisbecker , Ilias Stamatis , Liang Chen , Ben Dooks , Peter Zijlstra , "J. Bruce Fields" Subject: Re: [PATCH] kthread: Add kthread_work tracepoints Message-ID: <20201012113748.1182eb1c@gandalf.local.home> In-Reply-To: References: <20201010180323.126634-1-robdclark@gmail.com> <20201012095955.0741313b@gandalf.local.home> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; 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 Mon, 12 Oct 2020 08:14:50 -0700 Rob Clark wrote: > > DEFINE_EVENT(sched_kthread_work_execute_template, sched_kthread_work_execute_start, > > TP_PROTO(struct kthread_work *work), > > TP_ARGS(work)); > > > > DEFINE_EVENT(sched_kthread_work_execute_template, sched_kthread_work_execute_end, > > TP_PROTO(struct kthread_work *work), > > TP_ARGS(work)); > > > > As events are cheap, classes are expensive (size wise), and a TRACE_EVENT() > > is really just a CLASS and EVENT for a single instance. > > I think we cannot quite do this, because we should not rely on being Ah I missed seeing that one used work->func and the other passed in the function. > able to dereference work after it finishes. Although I suppose I > could just define it to explicitly pass the fxn ptr to both > tracepoints.. But yes, I would rather see that. It could save up to 5K in text and data. -- Steve