summaryrefslogtreecommitdiff
path: root/src/VBox/Main/src-server/linux/PerformanceLinux.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/VBox/Main/src-server/linux/PerformanceLinux.cpp')
-rw-r--r--src/VBox/Main/src-server/linux/PerformanceLinux.cpp12
1 files changed, 7 insertions, 5 deletions
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())
{