Received: by 2002:ab2:3319:0:b0:1ef:7a0f:c32d with SMTP id i25csp282559lqc; Thu, 7 Mar 2024 18:22:14 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWPCLU2cSvda3ZGb4LYCehvVnLEdjTd9AaWmLPRgek4s/vxgENpIRL3IHtLKwG1OYeppql6kwRylRH9Z08eoquXg9gE4Vftxybuso10nA== X-Google-Smtp-Source: AGHT+IFDW52VH3JfK4a0eKdy4hKrW5sKF9jhvsKk6yEkGkghv3pC5ZaMGgW+7IjJN1EHSqZ9JNgz X-Received: by 2002:a05:6871:411:b0:221:35e9:6fc4 with SMTP id d17-20020a056871041100b0022135e96fc4mr2037114oag.0.1709864534417; Thu, 07 Mar 2024 18:22:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709864534; cv=pass; d=google.com; s=arc-20160816; b=nb0WsDiI+BMldqC3F8d2Lpv7LoTCbumO53E/lxj5renzVnGfR21VxAd3/C05orS5KW QlIsha90a42fBkb/DjQLTuot0sYuTowunsVnqEn1zk4yXuulvFiEks7U4zy2sJQtMnNd yi2XCRn9kWPqfToRNhj1Zv8sn+AyyUzGLe1XveSFesNTdvjAdhWIMLVwHKKQNIqj0wkF DDkFyn6FIcpY6xwAN4//WvlCRk0aOytlNQ5nH0WoyZGU7yia8FcucAu4QDg/r/UNSawl mTUo2tI8gzASw3g7TBb3JO59/vnXGUdXMePtzLHu6edAuaNGN6qoSqfA3fCR5ExIuYu9 BN7Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date; bh=/EutPK0HdmOS0UeJrGeQcfHS+d8XmRh374DvT6rSIwg=; fh=I7VxFVTWj/OgIvTYNSh2m7PuCz4ObXIyJZ9164lF7wM=; b=xSkJG3IKqjKj5Dp03jATqdDZ2Qop3QIHMjQNEksK1G8zFMppvLWzTgnaJQf+r4/uux VcUM3KqeV/eb7H14mwayxtMqAn2XA7M4PQiEAPaiJCnYk8hN1vaID065IKXJM0bPVBUY e39eDNQKoTautK4uWiNK/fOBIhUuHEKMiki4KUaOSwxLd+x+54KHZbDiPC17P/7aeUHC M0D55y6DYIRHr4guFFPl3uzV6lA9nBKb2pPQofUahDXYU2Yd+F34ZzXe1O8kGDHSqI15 LUEr1hV2hmqha6YrTq2b6IiRfhZW5ma7Ad+LUZ56HOSAjNf3AivmKLX3xt6aagyY64zH iV/g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-96449-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96449-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id r32-20020a632060000000b005dc905460f4si14856065pgm.3.2024.03.07.18.22.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Mar 2024 18:22:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-96449-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-96449-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96449-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id D0191B21B26 for ; Fri, 8 Mar 2024 02:22:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6DDFF23766; Fri, 8 Mar 2024 02:22:02 +0000 (UTC) Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D00FA1D546; Fri, 8 Mar 2024 02:22:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709864522; cv=none; b=uKvXqChZOAEHB7cA+ZoTq7objI36WebpkwMSATR3wYSk7UfTThx11W3WAxSC0GfQzpvHKYeT228NqzZzeNHausORNYhk7ozqUq4C+1QHhjdyJomWZ+uKI3rcBmvqCye05QoDInssnEPiry8CEmDNK52xUSO68JiXAbWXkUbSfcU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709864522; c=relaxed/simple; bh=9k5wS4nfjnGWJxJjGHHRF+euX7yLf9FPEjDUuPmmKm4=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=mz3bDQRsQyjR9l5FX/WM0BBYyJ+Jlejjw+Ck5bjdiHuzUh8BnqM0OZgjEbB3o0IdiHLqrf9GymUfr3cInni77fy+KJ6U4QhIt6+S/vHHB+tKCVpZG9W+cr2OoRkrJvemFJiIHN3Q9lUepJPn08rOB5780mOgatH3nmNy71PtjJE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 91C9BC43390; Fri, 8 Mar 2024 02:22:00 +0000 (UTC) Date: Thu, 7 Mar 2024 21:23:56 -0500 From: Steven Rostedt To: Kassey Li Cc: , , , Subject: Re: [PATCH v2] workqueue: add function in event of workqueue_activate_work Message-ID: <20240307212356.2e4d77d7@gandalf.local.home> In-Reply-To: <20240308021818.2306176-1-quic_yingangl@quicinc.com> References: <20240308021818.2306176-1-quic_yingangl@quicinc.com> X-Mailer: Claws Mail 3.19.1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Fri, 8 Mar 2024 10:18:18 +0800 Kassey Li wrote: > The trace event "workqueue_activate_work" only print work struct. > However, function is the region of interest in a full sequence of work. > Current workqueue_activate_work trace event output: >=20 > workqueue_activate_work: work struct ffffff88b4a0f450 >=20 > With this change, workqueue_activate_work will print the function name, > align with workqueue_queue_work/execute_start/execute_end event. >=20 > workqueue_activate_work: work struct ffffff80413a78b8 function=3Dvmst= at_update >=20 > Signed-off-by: Kassey Li > --- > Changelog: > v1: https://lore.kernel.org/all/20240308010929.1955339-1-quic_yingangl@qu= icinc.com/ > v1->v2: > - do not follow checkpatch in TRACE_EVENT() macros > - add sample "workqueue_activate_work: work struct ffffff80413a78b8 funct= ion=3Dvmstat_update" =46rom a tracing POV, Reviewed-by: Steven Rostedt (Google) -- Steve > --- > include/trace/events/workqueue.h | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) >=20 > diff --git a/include/trace/events/workqueue.h b/include/trace/events/work= queue.h > index 262d52021c23..6ef5b7254070 100644 > --- a/include/trace/events/workqueue.h > +++ b/include/trace/events/workqueue.h > @@ -64,13 +64,15 @@ TRACE_EVENT(workqueue_activate_work, > =20 > TP_STRUCT__entry( > __field( void *, work ) > + __field( void *, function) > ), > =20 > TP_fast_assign( > __entry->work =3D work; > + __entry->function =3D work->func; > ), > =20 > - TP_printk("work struct %p", __entry->work) > + TP_printk("work struct %p function=3D%ps ", __entry->work, __entry->fun= ction) > ); > =20 > /**