Received: by 2002:ab2:3319:0:b0:1ef:7a0f:c32d with SMTP id i25csp270750lqc; Thu, 7 Mar 2024 17:48:59 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXg7FgZhL3UgoNhDb+/K7+wiCBgFjmwFE7fyXcC8PiAVxDSmeoqdYhXjBszq2Exhgphr0vIa5qagTsVPwml8tQofSGa8VOt3hLUOiU7Sw== X-Google-Smtp-Source: AGHT+IHfIpO0YEmd+8mDPzlu10E+WLr0PnPDecxKRi9Ti7HL3Jn8+ty2JFAi6Gqp0XQ8Nr0Z4tsn X-Received: by 2002:a17:906:66c2:b0:a45:bcaa:979c with SMTP id k2-20020a17090666c200b00a45bcaa979cmr4326290ejp.75.1709862539483; Thu, 07 Mar 2024 17:48:59 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709862539; cv=pass; d=google.com; s=arc-20160816; b=gqOOnH+oXDWVyS9JtTlH0H8xd3GT0VrmFKiRyGnCFFdAhvmc3U73RnOeD1KIfOrEAx NN4mqE/KOoiXqFWBVPjkJy89alxL4JeFhj4O8sdya7Mq8hHeKY1d1LPXeBD5wBIze7EN Ba3RfdMRibFtBEAem5h6bAOFoV7C/eEJ6+W8M6HI25Q8xspR74Hoa0eUEx04u7FnWVwc vHM5H0DwIJunqFlVTFyCxJ64IVOTkuZ88+p/6pGpTp2M7jWOM3Z9lITP7rosDTHsN0nO fVqTdihEMwzQ1n/9m6g1tmNQs4yBDvzLf1AbBil1fA9tpAl7C1vFHezDJTs74+YyQ9h2 nPWQ== 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=PEpqa2j5hTLKqzUEce7rc3PxqkvhHphevBXUt8/W88w=; fh=I7VxFVTWj/OgIvTYNSh2m7PuCz4ObXIyJZ9164lF7wM=; b=jyXnubMjNEVjhDZKz+K0HQhdX3+pyfYxgTBaAieh/k6mBXaSuTiDOPB8URdNN8aPw7 lOzk49RAYmSKTc+/x72TRuAGflZ/R2fdr+AQukOCPDrsX/5C/d9z7JXh70pJe6r3rLC+ vCTghFrTYihBE8JOFCXw9b7YeOE3/sZreEmVNzQfr+q3JWODmEECZrhe8CJZbHvWnHAB J19r698EAV+tbYqlo9gA0/3oDPMTqy2OXpfu/P/tRJfR1s1/wa5OyWNTxu38LlVOiDKH yCi2c3DAuTlrex3e1gF1Wx+x32BMUApi6xVB46sXX5voWGQC9OSby7jTaQcPAbU5hjew zPPw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-96438-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96438-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id x10-20020a1709065aca00b00a455c1335fesi4199970ejs.676.2024.03.07.17.48.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Mar 2024 17:48:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-96438-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-96438-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96438-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 398031F227D3 for ; Fri, 8 Mar 2024 01:48:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E8A2822EE8; Fri, 8 Mar 2024 01:48:50 +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 6D3142420B; Fri, 8 Mar 2024 01:48:50 +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=1709862530; cv=none; b=F8X6ZiHyPQtH1PGGs1xMtgcrsQKdk8HxiIzEMTzuHONvWbc1Wa/SOu4kjTZT+JVSD8Oa24JPFfEpCBtGhvmtbprTBqhFgl/5YJ0UHuvh6WUzCmTsvJo5rmigFTbV9pMlsAvWLyYNMFo6L3IJk39ozn/m/AKrUbPawsRpzRZ1kWo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709862530; c=relaxed/simple; bh=ofSIEp5CwaZZFkWkQrZ9LK1wrqP7l0qC/vb6L14yvhE=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=g0talkvn9mxUeL4qeX8lbLrT20eHFQlwnVkF0BRIxJyLoTYk3iZ8hWvOYSlTL7+gKI8KravHiU/QqykSEbAtdN2yK+c8rLRJYIrqO+rzzGttUxH/kH9RRefaafZKKOrH+H2jj/JMStVivc5tiPeMTn8m7N9j+ftwLsFIlbpSqnY= 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 60945C433C7; Fri, 8 Mar 2024 01:48:49 +0000 (UTC) Date: Thu, 7 Mar 2024 20:50:44 -0500 From: Steven Rostedt To: Kassey Li Cc: , , , Subject: Re: [PATCH] workqueue: add function in event of workqueue_activate_work Message-ID: <20240307205044.1caf9fe2@gandalf.local.home> In-Reply-To: <20240308010929.1955339-1-quic_yingangl@quicinc.com> References: <20240308010929.1955339-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: 7bit On Fri, 8 Mar 2024 09:09:29 +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: > > workqueue_activate_work: work struct ffffff88b4a0f450 > > With this change, workqueue_activate_work will print the function name, > align with workqueue_queue_work/execute_start/execute_end event. > > checkpatch.pl will report below error for the space: > > ERROR: space prohibited after that open parenthesis '(' > #28: FILE: include/trace/events/workqueue.h:67: > + __field( void *, function) > > total: 1 errors, 0 warnings, 16 lines checked > > fix this error. > > Signed-off-by: Kassey Li > --- > include/trace/events/workqueue.h | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/include/trace/events/workqueue.h b/include/trace/events/workqueue.h > index 262d52021c23..a42c1a293459 100644 > --- a/include/trace/events/workqueue.h > +++ b/include/trace/events/workqueue.h > @@ -63,14 +63,16 @@ TRACE_EVENT(workqueue_activate_work, > TP_ARGS(work), > > TP_STRUCT__entry( > - __field( void *, work ) > + __field(void *, work) > + __field(void *, function) Note, please do not follow checkpatch in TRACE_EVENT() macros. It simply doesn't understand it. The above is supposed to be similar to structure formatting. ie: struct __entry { void *work; void *function; }; TP_STRUCT__entry( __field( void *, work ) __field( void *, function ) ), That looks much better. -- Steve > > TP_fast_assign( > __entry->work = work; > + __entry->function = work->func; > ), > > - TP_printk("work struct %p", __entry->work) > + TP_printk("work struct %p function=%ps ", __entry->work, __entry->function) > ); > > /**