summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryangwei <[email protected]>2024-01-11 15:45:05 +0800
committeryangwei <[email protected]>2024-01-11 15:48:56 +0800
commit36ff8e88357f5ab27e47262079f1c60780905c5f (patch)
treeed846a5d3a4277740f59c01397b8d4a0764b182e
parentabab760d81de686c91eee6fbff62a29cb8cce41a (diff)
🌈 style(sapp_process_latency_log): 日志中输出相对tid和线程ID
-rw-r--r--src/support/cpu_limit/cpu_limit.c2
-rw-r--r--src/timer/sapp_timer.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/support/cpu_limit/cpu_limit.c b/src/support/cpu_limit/cpu_limit.c
index e21738e..2f12b6c 100644
--- a/src/support/cpu_limit/cpu_limit.c
+++ b/src/support/cpu_limit/cpu_limit.c
@@ -280,7 +280,7 @@ static void cl_analysis(cpu_limit_inner_t *h)
cl_analysis_reduce_state(h, tid, this_stat);
if(this_stat->realtime_res_val >= 99.9 && MESA_handle_runtime_log_level_enabled(ABBR_PROCESS_LATENCY_LOG_HANDLE, RLOG_LV_FATAL))
{
- sapp_process_latency_log(RLOG_LV_FATAL, "[cpu_limit] thread:%d usage:%.2f over 99.9%%, send SIGUSR2 to tid:%d", tid, this_stat->realtime_res_val, sapp_global_val->individual_fixed.thread_obtain_id[tid]);
+ sapp_process_latency_log(RLOG_LV_FATAL, "[cpu_limit] thread:%d usage:%.2f over 99.9%%, send SIGUSR2 to thread_index:%d, tid:%llu", tid, this_stat->realtime_res_val, tid, sapp_global_val->individual_fixed.thread_obtain_id[tid]);
pthread_kill(sapp_global_val->individual_fixed.thread_obtain_id[tid], SIGUSR2);
}
}else{
diff --git a/src/timer/sapp_timer.c b/src/timer/sapp_timer.c
index 32666f9..56cda02 100644
--- a/src/timer/sapp_timer.c
+++ b/src/timer/sapp_timer.c
@@ -462,7 +462,7 @@ static void sapp_watch_dog(void)
sapp_runtime_log(RLOG_LV_FATAL, "##### detect deadlock in PID:%ld, at timestamp:%ld, thread index:%d, TID(LWP):%u, sd_notify_enable:%d, deadlock_detected:%d, deadlock_cnt:%d #####",
getpid(), ABBR_CURRENT_TIME, thread_index, sapp_global_val->individual_fixed.thread_tid[thread_index], sd_notify_enable, deadlock_detected, deadlock_cnt);
}
- sapp_process_latency_log(RLOG_LV_FATAL, "sapp_watch_dog detect deadlock at timestamp:%ld, send SIGUSR2 to tid:%d", ABBR_CURRENT_TIME, thread_index);
+ sapp_process_latency_log(RLOG_LV_FATAL, "sapp_watch_dog detect deadlock at timestamp:%ld, send SIGUSR2 to thread index:%d, tid:%llu", ABBR_CURRENT_TIME, thread_index, sapp_global_val->individual_fixed.thread_obtain_id[thread_index]);
pthread_kill(sapp_global_val->individual_fixed.thread_obtain_id[thread_index], SIGUSR2);
break;