lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87fa307d-85cc-4fc0-bf66-234bd97ac377@quicinc.com>
Date: Fri, 8 Mar 2024 14:11:22 +0800
From: Kassey Li <quic_yingangl@...cinc.com>
To: Steven Rostedt <rostedt@...dmis.org>, Tejun Heo <tj@...nel.org>
CC: <mhiramat@...nel.org>, <mathieu.desnoyers@...icios.com>,
        <linux-kernel@...r.kernel.org>, <linux-trace-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] workqueue: add function in event of
 workqueue_activate_work



On 2024/3/8 10:23, Steven Rostedt wrote:
> On Fri, 8 Mar 2024 10:18:18 +0800
> Kassey Li <quic_yingangl@...cinc.com> 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.
>>
>>      workqueue_activate_work: work struct ffffff80413a78b8 function=vmstat_update
>>
>> Signed-off-by: Kassey Li <quic_yingangl@...cinc.com>
>> ---
>> Changelog:
>> v1: https://lore.kernel.org/all/20240308010929.1955339-1-quic_yingangl@quicinc.com/
>> v1->v2:
>> - do not follow checkpatch in TRACE_EVENT() macros
>> - add sample "workqueue_activate_work: work struct ffffff80413a78b8 function=vmstat_update"
> 
>  From a tracing POV,
> 
> Reviewed-by: Steven Rostedt (Google) <rostedt@...dmis.org>
> 
> -- Steve

thank you Steve.

add Tejun to review this change.

> 
>> ---
>>   include/trace/events/workqueue.h | 4 +++-
>>   1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/include/trace/events/workqueue.h b/include/trace/events/workqueue.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,
>>   
>>   	TP_STRUCT__entry(
>>   		__field( void *,	work	)
>> +		__field( void *,	function)
>>   	),
>>   
>>   	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)
>>   );
>>   
>>   /**
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ