summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorzy <[email protected]>2023-12-13 22:42:39 -0500
committerzy <[email protected]>2023-12-13 22:42:39 -0500
commit5d9fd19ddb02326e3d6d9534b899376afe8d9049 (patch)
tree96c5866cc2ecb39b22e8fa7c240f8549526e7d80 /source
parentcdde5566bfaa99a74ac561f4617cb630bb6dcc9f (diff)
diag_task_info
Diffstat (limited to 'source')
-rw-r--r--source/module/monitor_kernel_lib.c28
1 files changed, 16 insertions, 12 deletions
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 {