qcacmn: Save jiffies value for QDF timer
Save the jiffies value in a per-timer context in qdf_mc_timer_t while processing qdf_mc_timer_start and scheduler_mc_timer_callback. It will help the debugger to know the exact time gap between the start and stop/expiry of the QDF timer. Change-Id: Ia79011971184de9390632253417ee35dc7d26cf8 CRs-Fixed: 3283746
This commit is contained in:

committed by
Madan Koyyalamudi

parent
65d7505a94
commit
2888b71da7
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2014-2019, 2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -72,6 +73,8 @@ typedef struct qdf_mc_timer_s {
|
||||
qdf_mutex_t lock;
|
||||
QDF_TIMER_TYPE type;
|
||||
QDF_TIMER_STATE state;
|
||||
qdf_time_t timer_start_jiffies;
|
||||
qdf_time_t timer_end_jiffies;
|
||||
} qdf_mc_timer_t;
|
||||
|
||||
|
||||
|
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2014-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -692,6 +693,12 @@ QDF_STATUS qdf_mc_timer_start(qdf_mc_timer_t *timer, uint32_t expiration_time)
|
||||
|
||||
timer->state = QDF_TIMER_STATE_RUNNING;
|
||||
|
||||
/* Save the jiffies value in a per-timer context in qdf_mc_timer_t
|
||||
* It will help the debugger to know the exact time at which the host
|
||||
* starts the QDF timer.
|
||||
*/
|
||||
timer->timer_start_jiffies = jiffies;
|
||||
|
||||
/* get the thread ID on which the timer is being started */
|
||||
timer->platform_info.thread_id = current->pid;
|
||||
|
||||
|
@@ -605,6 +605,13 @@ void scheduler_mc_timer_callback(qdf_mc_timer_t *timer)
|
||||
if (!timer)
|
||||
return;
|
||||
|
||||
/*
|
||||
* Save the jiffies value in a per-timer context in qdf_mc_timer_t.
|
||||
* It will help the debugger to know the exact time at which the host
|
||||
* stops/expiry of the QDF timer.
|
||||
*/
|
||||
timer->timer_end_jiffies = jiffies;
|
||||
|
||||
qdf_spin_lock_irqsave(&timer->platform_info.spinlock);
|
||||
|
||||
switch (timer->state) {
|
||||
|
Reference in New Issue
Block a user