|
@@ -18,6 +18,7 @@
|
|
|
/**
|
|
|
* DOC: Implements general SM debug framework
|
|
|
*/
|
|
|
+#include <qdf_threads.h>
|
|
|
#include <wlan_sm_engine.h>
|
|
|
#include <wlan_sm_engine_dbg.h>
|
|
|
|
|
@@ -47,6 +48,8 @@ void wlan_sm_save_history(struct wlan_sm *sm,
|
|
|
p_memento->final_state = final_state;
|
|
|
p_memento->event_type = event_type;
|
|
|
p_memento->time = qdf_get_log_timestamp();
|
|
|
+ qdf_scnprintf(p_memento->pid_name, WLAN_SM_PID_MAX_LEN, "%.6s",
|
|
|
+ qdf_get_current_comm());
|
|
|
}
|
|
|
|
|
|
void wlan_sm_history_init(struct wlan_sm *sm)
|
|
@@ -74,8 +77,8 @@ static void wlan_sm_print_history_entry(struct wlan_sm *sm,
|
|
|
return;
|
|
|
|
|
|
sm_engine_nofl_err(
|
|
|
- "| 0x%016llx |%6d |%11d |%23s[%3d] |%19s[%2d] |%19s[%2d] |",
|
|
|
- ent->time, i, ent->trace_type,
|
|
|
+ "| 0x%016llx |%6d |%6s |%11d |%23s[%3d] |%19s[%2d] |%19s[%2d] |",
|
|
|
+ ent->time, i, ent->pid_name, ent->trace_type,
|
|
|
event_name ? event_name : "UNKNOWN_EVENT",
|
|
|
ent->event_type,
|
|
|
sm->state_info[ent->initial_state].name,
|
|
@@ -84,8 +87,8 @@ static void wlan_sm_print_history_entry(struct wlan_sm *sm,
|
|
|
ent->final_state);
|
|
|
} else {
|
|
|
sm_engine_nofl_err(
|
|
|
- "| 0x%016llx |%6d |%11d |%28d |%19s[%2d] |%19s[%2d] |",
|
|
|
- ent->time, i, ent->trace_type,
|
|
|
+ "| 0x%016llx |%6d |%6s |%11d |%28d |%19s[%2d] |%19s[%2d] |",
|
|
|
+ ent->time, i, ent->pid_name, ent->trace_type,
|
|
|
ent->event_type,
|
|
|
sm->state_info[ent->initial_state].name,
|
|
|
ent->initial_state,
|
|
@@ -106,8 +109,8 @@ void wlan_sm_print_history(struct wlan_sm *sm)
|
|
|
*/
|
|
|
qdf_spin_lock_bh(&p_sm_history->sm_history_lock);
|
|
|
|
|
|
- sm_engine_nofl_err("|%19s |%6s |%11s |%28s |%23s |%23s |", "Time",
|
|
|
- "Index", "Trace Type", "Event",
|
|
|
+ sm_engine_nofl_err("|%19s |%6s |%6s |%11s |%28s |%23s |%23s |", "Time",
|
|
|
+ "Index", "PID", "Trace Type", "Event",
|
|
|
"Initial State", "Final State");
|
|
|
|
|
|
for (i = 0; i < WLAN_SM_ENGINE_HISTORY_SIZE; i++) {
|
|
@@ -134,8 +137,8 @@ static void wlan_sm_print_fs_history_entry(struct wlan_sm *sm,
|
|
|
return;
|
|
|
|
|
|
qdf_debugfs_printf(
|
|
|
- m, "| 0x%016llx |%6d |%11d |%23s[%3d] |%19s[%2d] |%19s[%2d] |\n",
|
|
|
- ent->time, i, ent->trace_type,
|
|
|
+ m, "| 0x%016llx |%6d |%6s |%11d |%23s[%3d] |%19s[%2d] |%19s[%2d] |\n",
|
|
|
+ ent->time, i, ent->pid_name, ent->trace_type,
|
|
|
event_name ? event_name : "UNKNOWN_EVENT",
|
|
|
ent->event_type,
|
|
|
sm->state_info[ent->initial_state].name,
|
|
@@ -144,8 +147,8 @@ static void wlan_sm_print_fs_history_entry(struct wlan_sm *sm,
|
|
|
ent->final_state);
|
|
|
} else {
|
|
|
qdf_debugfs_printf(
|
|
|
- m, "| 0x%016llx |%6d |%11d |%28d |%19s[%2d] |%19s[%2d] |\n",
|
|
|
- ent->time, i, ent->trace_type,
|
|
|
+ m, "| 0x%016llx |%6d |%6s |%11d |%28d |%19s[%2d] |%19s[%2d] |\n",
|
|
|
+ ent->time, i, ent->pid_name, ent->trace_type,
|
|
|
ent->event_type,
|
|
|
sm->state_info[ent->initial_state].name,
|
|
|
ent->initial_state,
|
|
@@ -165,8 +168,8 @@ void wlan_sm_print_fs_history(struct wlan_sm *sm, qdf_debugfs_file_t m)
|
|
|
* Save a pointer to next write location and increment pointer.
|
|
|
*/
|
|
|
qdf_spin_lock_bh(&p_sm_history->sm_history_lock);
|
|
|
- qdf_debugfs_printf(m, "|%19s |%6s |%11s |%28s |%23s |%23s |\n", "Time",
|
|
|
- "Index", "Trace Type", "Event",
|
|
|
+ qdf_debugfs_printf(m, "|%19s |%6s |%6s |%11s |%28s |%23s |%23s |\n", "Time",
|
|
|
+ "Index", "PID", "Trace Type", "Event",
|
|
|
"Initial State", "Final State");
|
|
|
|
|
|
for (i = 0; i < WLAN_SM_ENGINE_HISTORY_SIZE; i++) {
|