diff options
author | Benny Baumann <BenBE@geshi.org> | 2022-05-29 23:03:56 +0200 |
---|---|---|
committer | Benny Baumann <BenBE@geshi.org> | 2022-05-31 13:55:43 +0200 |
commit | 2999fff88eef0cad39dbbc0054bdf8af9a92215e (patch) | |
tree | 59789d67f430d134c5dbe7f48ddf4bbb21bd244b /linux/LinuxProcessList.c | |
parent | 2613db4b0d714b2525ae388680523f55b80451b8 (diff) |
Refactor code for rendering command line cache
Fixes #1008
Diffstat (limited to 'linux/LinuxProcessList.c')
-rw-r--r-- | linux/LinuxProcessList.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/linux/LinuxProcessList.c b/linux/LinuxProcessList.c index e799661a..45b045c8 100644 --- a/linux/LinuxProcessList.c +++ b/linux/LinuxProcessList.c @@ -1351,7 +1351,8 @@ static bool LinuxProcessList_readCmdlineFile(Process* process, openat_arg_t proc if (process->procExeDeleted) filename[filenameLen - markerLen] = '\0'; - process->mergedCommand.exeChanged |= oldExeDeleted ^ process->procExeDeleted; + if (oldExeDeleted != process->procExeDeleted) + process->mergedCommand.lastUpdate = 0; } Process_updateExe(process, filename); @@ -1557,7 +1558,8 @@ static bool LinuxProcessList_recurseProcTree(LinuxProcessList* this, openat_arg_ lp->m_lrs = (proc->isUserlandThread && parent) ? ((const LinuxProcess*)parent)->m_lrs : 0; } - proc->mergedCommand.exeChanged |= prev ^ proc->usesDeletedLib; + if (prev != proc->usesDeletedLib) + proc->mergedCommand.lastUpdate = 0; } if ((ss->flags & PROCESS_FLAG_LINUX_SMAPS) && !Process_isKernelThread(proc)) { |