Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2245)

Unified Diff: base/process_util_linux.cc

Issue 12285016: cros: Use /var/run/debugfs_gpu for graphics memory info (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/process_util_linux.cc
diff --git a/base/process_util_linux.cc b/base/process_util_linux.cc
index 92e7c472f9f00b6e80a8f5bd26ac0d9b0420af05..6355e375dcbc996504475ca346d271631ccdc196 100644
--- a/base/process_util_linux.cc
+++ b/base/process_util_linux.cc
@@ -683,14 +683,14 @@ bool GetSystemMemoryInfo(SystemMemoryInfoKB* meminfo) {
break;
}
}
-#endif
- // Check for graphics memory data and report if present. Synchronously
- // reading files in /sys is fast.
+ // Report on Chrome OS GEM object graphics memory. /var/run/debugfs_gpu is a
+ // bind mount into /sys/kernel/debug and synchronously reading the in-memory
+ // files in /sys is fast.
#if defined(ARCH_CPU_ARM_FAMILY)
- FilePath geminfo_file("/sys/kernel/debug/dri/0/exynos_gem_objects");
+ FilePath geminfo_file("/var/run/debugfs_gpu/exynos_gem_objects");
#else
- FilePath geminfo_file("/sys/kernel/debug/dri/0/i915_gem_objects");
+ FilePath geminfo_file("/var/run/debugfs_gpu/i915_gem_objects");
#endif
std::string geminfo_data;
meminfo->gem_objects = -1;
@@ -718,6 +718,7 @@ bool GetSystemMemoryInfo(SystemMemoryInfoKB* meminfo) {
meminfo->gem_size += mali_size;
}
#endif // defined(ARCH_CPU_ARM_FAMILY)
+#endif // defined(OS_CHROMEOS)
return true;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698