From cba113ca2826bc4814be2f69a7704c865a37d4ea Mon Sep 17 00:00:00 2001 From: Felix Geyer Date: Fri, 29 Jul 2011 17:55:18 +0200 Subject: Imported Upstream version 4.1.0-dfsg --- src/VBox/Main/src-server/linux/PerformanceLinux.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/VBox/Main/src-server/linux/PerformanceLinux.cpp') diff --git a/src/VBox/Main/src-server/linux/PerformanceLinux.cpp b/src/VBox/Main/src-server/linux/PerformanceLinux.cpp index 16ef7f81c..75c9a4c77 100644 --- a/src/VBox/Main/src-server/linux/PerformanceLinux.cpp +++ b/src/VBox/Main/src-server/linux/PerformanceLinux.cpp @@ -1,4 +1,4 @@ -/* $Id: PerformanceLinux.cpp $ */ +/* $Id: PerformanceLinux.cpp 37713 2011-06-30 15:14:13Z vboxsync $ */ /** @file * @@ -6,7 +6,7 @@ */ /* - * Copyright (C) 2008 Oracle Corporation + * Copyright (C) 2008-2011 Oracle Corporation * * This file is part of VirtualBox Open Source Edition (OSE), as * available from http://www.virtualbox.org. This file is free software; @@ -74,9 +74,11 @@ int CollectorLinux::preCollect(const CollectorHints& hints, uint64_t /* iTick */ { VMProcessStats vmStats; int rc = getRawProcessStats(*it, &vmStats.cpuUser, &vmStats.cpuKernel, &vmStats.pagesUsed); - if (RT_FAILURE(rc)) - return rc; - mProcessStats[*it] = vmStats; + /* On failure, do NOT stop. Just skip the entry. Having the stats for + * one (probably broken) process frozen/zero is a minor issue compared + * to not updating many process stats and the host cpu stats. */ + if (RT_SUCCESS(rc)) + mProcessStats[*it] = vmStats; } if (hints.isHostCpuLoadCollected() || mProcessStats.size()) { -- cgit v1.2.3