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

Unified Diff: trunk/src/build/android/pylib/android_commands.py

Issue 111773002: Revert 239784 "Make page_cycler.py fully measure memory for each..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years 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 | trunk/src/tools/perf/measurements/media.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/build/android/pylib/android_commands.py
===================================================================
--- trunk/src/build/android/pylib/android_commands.py (revision 239788)
+++ trunk/src/build/android/pylib/android_commands.py (working copy)
@@ -25,6 +25,8 @@
import screenshot
import system_properties
+from utils import host_path_finder
+
try:
from pylib import pexpect
except:
@@ -1499,6 +1501,20 @@
logging.warning('Could not find disk IO stats.')
return None
+ def PurgeUnpinnedAshmem(self):
+ """Purges the unpinned ashmem memory for the whole system.
+
+ This can be used to make memory measurements more stable in particular.
+ """
+ host_path = host_path_finder.GetMostRecentHostPath('purge_ashmem')
+ if not host_path:
+ raise Exception('Could not find the purge_ashmem binary.')
+ device_path = os.path.join(constants.TEST_EXECUTABLE_DIR, 'purge_ashmem')
+ self.PushIfNeeded(host_path, device_path)
+ if self.RunShellCommand(device_path, log_result=True):
+ return
+ raise Exception('Error while purging ashmem.')
+
def GetMemoryUsageForPid(self, pid):
"""Returns the memory usage for given pid.
« no previous file with comments | « no previous file | trunk/src/tools/perf/measurements/media.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698