diff --git a/interfaces/innerkits/dump_catcher/dfx_dump_catcher.cpp b/interfaces/innerkits/dump_catcher/dfx_dump_catcher.cpp index 61691b6dac619e0418216ab7bb791f2cec99b06f..95d7f2589eb53e2907f94651fc6b3b2747d189f8 100644 --- a/interfaces/innerkits/dump_catcher/dfx_dump_catcher.cpp +++ b/interfaces/innerkits/dump_catcher/dfx_dump_catcher.cpp @@ -664,7 +664,9 @@ void DfxDumpCatcher::CollectKernelStack(pid_t pid, int waitMilliSeconds) void DfxDumpCatcher::AsyncGetAllTidKernelStack(pid_t pid, int waitMilliSeconds) { ReadProcessStatus(halfProcStatus_, pid); - ReadProcessWchan(halfProcWchan_, pid, false, true); + if (IsLinuxKernel()) { + ReadProcessWchan(halfProcWchan_, pid, false, true); + } if (g_asyncThreadRunning) { DFXLOGI("pid(%{public}d) get kernel stack thread is running, not get pid(%{public}d)", g_kernelStackPid, pid); return;