diff --git a/source/module/monitor_kernel_lib.c b/source/module/monitor_kernel_lib.c index 78451d0..508e35b 100644 --- a/source/module/monitor_kernel_lib.c +++ b/source/module/monitor_kernel_lib.c @@ -109,7 +109,7 @@ static int init_sa_buffer(void) { } /** - * @brief diag task info | brief | user stack | kernel stack | proc chains | raw + * @brief diag task info | brief | kernel stack | proc chains | raw * stack * * @param p @@ -203,16 +203,7 @@ static void clear_all_watch(void) { memset(kernel_wtimer_list, 0, sizeof(kernel_wtimer_list)); } -/** - * @brief diag task info, for work queue - * - * @param work - */ -void diag_task_info_work(struct work_struct *work) { - - kernel_watch_timer *k_watch_timer = - container_of(work, kernel_watch_timer, wk); - +void diag_task_info(kernel_watch_timer *k_watch_timer) { if (k_watch_timer->threshold_over_count <= 0) // if no threshold reached return; @@ -287,6 +278,18 @@ void diag_task_info_work(struct work_struct *work) { printk(KERN_INFO "-------------------------------------\n"); return; } + +/** + * @brief diag task info, for work queue + * + * @param work + */ +void diag_task_info_work(struct work_struct *work) { + kernel_watch_timer *k_watch_timer = + container_of(work, kernel_watch_timer, wk); + diag_task_info(k_watch_timer); +} + /** * @brief all module function init. orig_X | buffer * @@ -428,7 +431,8 @@ enum hrtimer_restart check_variable_cb(struct hrtimer *timer) { k_watch_timer->tv = ktime_get_real(); // highpri_wq queue_work(system_highpri_wq, &k_watch_timer->wk); - // restart timer after 5s + diag_task_info(k_watch_timer); + // restart timer after dump_reset_sec sec hrtimer_forward(timer, timer->base->get_time(), ktime_set(dump_reset_sec, 0)); } else {