Closed PeterPitterling closed 1 year ago
All the USER profiling events (hardclocks) in the Global Hardclock report are shown as "UNKNOWN". You would have to to look at individual processes to see the User function names (see kipid output). Even then, translating the IP address collected by the trace into a function name is not an easy task. There are a few requirements to get this information:
It is odd that the UNKNOWN shows "SYS". It should show "USER", which is what I see in the collections I have. I may need your KI data understand why you see SYS beside of UNKNOWN.
You can contact me directly at mark.ray@hpe.com.
A bit more information. The CPU State when the Hardclock event occurs is determined by the "preempt_cnt".
static inline int get_cpu_state(void arg1) { hardclock_t rec_ptr = arg1; int preempt_cnt = rec_ptr->preempt_count;
if (preempt_cnt == PREEMPT_USER) {
return HC_USER;
} else if (HARDIRQ_VAL(preempt_cnt) > 1 || SOFTIRQ_VAL(preempt_cnt)) {
return HC_INTR;
} else if ((rec_ptr->pid == 0)) {
return HC_IDLE;
} else {
return HC_SYS;
}
}
So i would need to understand what this preempt_count is and see if it is not what I expect to see. I would need to put a printf in the code to show this in the trace data.
The issue was caused by having some kernel addresses in a 3rd party DLKM which could not be found in the kallsyms file. So there were both unknown Kernel symbols and User symbols, and kiinfo was just reporting the state of the last event logged. This will be fixed in the next release of LinuxKI as it now keep trace of both Kernel and User "unknown" symbols. For example:
**** GLOBAL HARDCLOCK REPORT **** Count USER% SYS% INTR% IDLE% 1139513 2.36% 0.60% 0.00% 97.04%
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Kernel Functions executed during profile Count Pct State Function ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 26853 2.36% USER UNKNOWN 652 0.06% SYS UNKNOWN 351 0.03% SYS __schedule 251 0.02% SYS cshook_systemcalltable_pre_compat_sys_ioctl 241 0.02% SYS do_task_stat 233 0.02% SYS lookup_fast 172 0.02% SYS m_sys_openat
Fixed in LinuxKI 7.7, which is now available.
data collected by ./runki -R -a ... what is missing to get anything meaningful for UNKNOWN? SLES15.3 kernel ..