Skip to content

Commit

Permalink
workqueue: tracing the name of the workqueue instead of it's address
Browse files Browse the repository at this point in the history
This patch tracing workqueue name instead of it's address, the
new format is as follows.

workqueue_queue_work: work struct=0000000084e3df56 function=
drm_fb_helper_dirty_work workqueue=events req_cpu=256 cpu=1

This tell us to know which workqueue our work is queued.

Signed-off-by: Zqiang <qiang.zhang@windriver.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
  • Loading branch information
Zqiang authored and Tejun Heo committed Jan 19, 2021
1 parent 93e8629 commit 7bf9c4a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/trace/events/workqueue.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,20 @@ TRACE_EVENT(workqueue_queue_work,
TP_STRUCT__entry(
__field( void *, work )
__field( void *, function)
__field( void *, workqueue)
__field( const char *, workqueue)
__field( unsigned int, req_cpu )
__field( unsigned int, cpu )
),

TP_fast_assign(
__entry->work = work;
__entry->function = work->func;
__entry->workqueue = pwq->wq;
__entry->workqueue = pwq->wq->name;
__entry->req_cpu = req_cpu;
__entry->cpu = pwq->pool->cpu;
),

TP_printk("work struct=%p function=%ps workqueue=%p req_cpu=%u cpu=%u",
TP_printk("work struct=%p function=%ps workqueue=%s req_cpu=%u cpu=%u",
__entry->work, __entry->function, __entry->workqueue,
__entry->req_cpu, __entry->cpu)
);
Expand Down

0 comments on commit 7bf9c4a

Please sign in to comment.