summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjamescook@chromium.org <jamescook@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-18 06:11:07 +0000
committerjamescook@chromium.org <jamescook@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-18 06:11:07 +0000
commite541ac7357c2178ee785764ab0415f94f5ec9bd7 (patch)
tree7ac1c39fa73463fcf13e994c6eaadc37c7dd176c
parent0af101f1808f3fa7bc847c573b3cf1902a79626e (diff)
downloadchromium_src-e541ac7357c2178ee785764ab0415f94f5ec9bd7.zip
chromium_src-e541ac7357c2178ee785764ab0415f94f5ec9bd7.tar.gz
chromium_src-e541ac7357c2178ee785764ab0415f94f5ec9bd7.tar.bz2
cros: Use /var/run/debugfs_gpu for graphics memory info
The /sys/kernel/debug file system was recently made non-world-readable, but we've added a bind mount in /var/run for this information. Switch to the new path. BUG=175828 TEST=manual, on a device about:discards shows a "Graphics" line at the bottom Review URL: https://chromiumcodereview.appspot.com/12285016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@183065 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--base/process_util_linux.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/base/process_util_linux.cc b/base/process_util_linux.cc
index 92e7c47..6355e37 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;
}