summaryrefslogtreecommitdiffstats
path: root/linux/LinuxProcessList.c
diff options
context:
space:
mode:
authorDenis Lisov <dennis.lissov@gmail.com>2021-12-17 14:29:01 +0300
committerBenBE <BenBE@geshi.org>2021-12-18 12:31:36 +0100
commitf782f821f7f8081cb43bbad1c37f32830a260a81 (patch)
treeb129cc1a73206554cd50784ac7d0ca7b687b44f7 /linux/LinuxProcessList.c
parent5b78ad2d53b751e8b07d67ab8070e47f77036b84 (diff)
LinuxProcessList: do not collect LRS per thread
It's a memory map property, so it's process-wide and collecting it just once should be enough.
Diffstat (limited to 'linux/LinuxProcessList.c')
-rw-r--r--linux/LinuxProcessList.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/linux/LinuxProcessList.c b/linux/LinuxProcessList.c
index a055c13e..955aec99 100644
--- a/linux/LinuxProcessList.c
+++ b/linux/LinuxProcessList.c
@@ -1473,8 +1473,9 @@ static bool LinuxProcessList_recurseProcTree(LinuxProcessList* this, openat_arg_
{
bool prev = proc->usesDeletedLib;
- if ((ss->flags & PROCESS_FLAG_LINUX_LRS_FIX) ||
- (settings->highlightDeletedExe && !proc->procExeDeleted && !proc->isKernelThread && !proc->isUserlandThread)) {
+ if (!proc->isKernelThread && !proc->isUserlandThread &&
+ ((ss->flags & PROCESS_FLAG_LINUX_LRS_FIX) || (settings->highlightDeletedExe && !proc->procExeDeleted))) {
+
// Check if we really should recalculate the M_LRS value for this process
uint64_t passedTimeInMs = pl->realtimeMs - lp->last_mlrs_calctime;
@@ -1487,6 +1488,7 @@ static bool LinuxProcessList_recurseProcTree(LinuxProcessList* this, openat_arg_
} else {
/* Copy from process structure in threads and reset if setting got disabled */
proc->usesDeletedLib = (proc->isUserlandThread && parent) ? parent->usesDeletedLib : false;
+ lp->m_lrs = (proc->isUserlandThread && parent) ? ((const LinuxProcess*)parent)->m_lrs : 0;
}
proc->mergedCommand.exeChanged |= prev ^ proc->usesDeletedLib;

© 2014-2024 Faster IT GmbH | imprint | privacy policy