diff --git a/mozilla/testing/performance/talos/cmanager_win32.py b/mozilla/testing/performance/talos/cmanager_win32.py
index 92ae39787da..d851b4d2332 100644
--- a/mozilla/testing/performance/talos/cmanager_win32.py
+++ b/mozilla/testing/performance/talos/cmanager_win32.py
@@ -77,16 +77,22 @@ class CounterManager:
hq = self.registeredCounters[counter][0]
win32pdh.EnumObjects(None, None, 0, 1)
counterListLength = len(self.registeredCounters[counter][1])
- expandedCounterPaths = \
+ try:
+ expandedCounterPaths = \
win32pdh.ExpandCounterPath('\\process(%s*)\\%s' % (self.childProcess, counter))
+ except:
+ return
for expandedPath in expandedCounterPaths:
alreadyInCounterList = False
for singleCounter in self.registeredCounters[counter][1]:
if expandedPath == singleCounter[1]:
alreadyInCounterList = True
if not alreadyInCounterList:
- counterHandle = win32pdh.AddCounter(hq, expandedPath)
- self.registeredCounters[counter][1].append((counterHandle, expandedPath))
+ try:
+ counterHandle = win32pdh.AddCounter(hq, expandedPath)
+ self.registeredCounters[counter][1].append((counterHandle, expandedPath))
+ except:
+ continue
if counterListLength != len(self.registeredCounters[counter][1]):
try:
win32pdh.CollectQueryData(hq)
@@ -135,13 +141,23 @@ class CounterManager:
hc = win32pdh.AddCounter(hq, path)
except:
win32pdh.CloseQuery(hq)
+ #assume that this is a memory counter for the system, not a process counter
+ path = win32pdh.MakeCounterPath((None, 'Memory', None, None, -1 , counter))
+ hq = win32pdh.OpenQuery()
+ try:
+ hc = win32pdh.AddCounter(hq, path)
+ except:
+ win32pdh.CloseQuery(hq)
self.registeredCounters[counter] = [hq, [(hc, path)]]
self.updateCounterPathsForChildProcesses(counter)
def stopMonitor(self):
- for counter in self.registeredCounters:
- for singleCounter in self.registeredCounters[counter][1]:
- win32pdh.RemoveCounter(singleCounter[0])
- win32pdh.CloseQuery(self.registeredCounters[counter][0])
- self.registeredCounters.clear()
+ try:
+ for counter in self.registeredCounters:
+ for singleCounter in self.registeredCounters[counter][1]:
+ win32pdh.RemoveCounter(singleCounter[0])
+ win32pdh.CloseQuery(self.registeredCounters[counter][0])
+ self.registeredCounters.clear()
+ except:
+ print 'failed to stopMonitor'
diff --git a/mozilla/testing/performance/talos/run_tests.py b/mozilla/testing/performance/talos/run_tests.py
index bffced9a094..e01d8d5631f 100755
--- a/mozilla/testing/performance/talos/run_tests.py
+++ b/mozilla/testing/performance/talos/run_tests.py
@@ -65,6 +65,8 @@ def shortName(name):
return "rss"
elif name == "XRes":
return "xres"
+ elif name == "Modified Page List Bytes":
+ return "modlistbytes"
else:
return name
@@ -267,7 +269,7 @@ def results_from_graph(links, results_server):
first_results = 'RETURN:
'
last_results = ''
full_results = '\nRETURN:
Details:
'
- memory_metric = ['memset', 'rss', 'pbytes', 'xres']
+ memory_metric = ['memset', 'rss', 'pbytes', 'xres', 'modlistbytes']
lines = links.split('\n')
for line in lines:
if line == "":
diff --git a/mozilla/testing/performance/talos/sample.config b/mozilla/testing/performance/talos/sample.config
index 18820e6ea4e..2cdb962d528 100755
--- a/mozilla/testing/performance/talos/sample.config
+++ b/mozilla/testing/performance/talos/sample.config
@@ -75,8 +75,10 @@ env :
# counters : ['Private Bytes', 'RSS']
# Possible values on Linux:
# counters : ['Private Bytes', 'RSS', 'XRes']
-# Standard windows values:
+# Standard winxp/vista values:
# counters : ['Working Set', 'Private Bytes', '% Processor Time']
+# Standard w7 values:
+# counters : ['Working Set', 'Private Bytes', '% Processor Time', 'Modified Page List Bytes']
# to set up a new test it must have the correct configuration options and drop information in a standard format
# the format is seen in the regular expressions in ttest.py
@@ -89,6 +91,7 @@ tests :
cycles : 20
timeout: 150
win_counters : []
+ w7_counters : []
linux_counters : []
mac_counters : []
shutdown : True
@@ -99,6 +102,7 @@ tests :
resolution : 1
cycles : 20
win_counters : []
+ w7_counters : []
linux_counters : []
mac_counters : []
shutdown : True
@@ -110,6 +114,7 @@ tests :
resolution : 1
cycles : 20
win_counters : []
+ w7_counters : []
linux_counters : []
mac_counters : []
shutdown : True
@@ -121,6 +126,7 @@ tests :
resolution : 1
cycles : 20
win_counters : []
+ w7_counters : []
linux_counters : []
mac_counters : []
shutdown : True
@@ -132,6 +138,7 @@ tests :
resolution : 1
cycles : 20
win_counters : []
+ w7_counters : []
linux_counters : []
mac_counters : []
shutdown : True
@@ -143,6 +150,7 @@ tests :
resolution : 1
cycles : 20
win_counters : []
+ w7_counters : []
linux_counters : []
mac_counters : []
shutdown : True
@@ -153,6 +161,7 @@ tests :
resolution : 1
cycles : 20
win_counters : []
+ w7_counters : []
linux_counters : []
mac_counters : []
shutdown : True
@@ -163,6 +172,7 @@ tests :
resolution : 1
cycles : 20
win_counters : []
+ w7_counters : []
linux_counters : []
mac_counters : []
shutdown : True
@@ -172,6 +182,7 @@ tests :
resolution : 20
cycles : 1
win_counters : ['Working Set', 'Private Bytes', '% Processor Time']
+ w7_counters : ['Working Set', 'Private Bytes', '% Processor Time', 'Modified Page List Bytes']
linux_counters : [ 'Private Bytes', 'RSS']
mac_counters : [ 'Private Bytes', 'RSS']
shutdown : True
@@ -181,6 +192,7 @@ tests :
resolution : 20
cycles : 1
win_counters : ['Working Set', 'Private Bytes', '% Processor Time']
+ w7_counters : ['Working Set', 'Private Bytes', '% Processor Time', 'Modified Page List Bytes']
linux_counters : [ 'Private Bytes', 'RSS']
mac_counters : [ 'Private Bytes', 'RSS']
shutdown : True
@@ -190,6 +202,7 @@ tests :
resolution : 1
cycles : 1
win_counters : ['Working Set', 'Private Bytes', '% Processor Time']
+ w7_counters : ['Working Set', 'Private Bytes', '% Processor Time', 'Modified Page List Bytes']
linux_counters : [ 'Private Bytes', 'RSS']
mac_counters : [ 'Private Bytes', 'RSS']
shutdown : False
@@ -199,6 +212,7 @@ tests :
resolution : 1
cycles : 1
win_counters : []
+ w7_counters : []
linux_counters : []
mac_counters : []
shutdown : False
@@ -208,6 +222,7 @@ tests :
resolution : 1
cycles : 1
win_counters : []
+ w7_counters : []
linux_counters : []
mac_counters : []
shutdown : False
@@ -217,6 +232,7 @@ tests :
resolution : 1
cycles : 1
win_counters : []
+ w7_counters : []
linux_counters : []
mac_counters : []
shutdown : False
@@ -226,6 +242,7 @@ tests :
resolution : 1
cycles : 1
win_counters : []
+ w7_counters : []
linux_counters : []
mac_counters : []
shutdown : False
@@ -235,6 +252,7 @@ tests :
resolution : 20
cycles : 1
win_counters : []
+ w7_counters : []
linux_counters : []
mac_counters : []
shutdown : False
@@ -254,6 +272,7 @@ tests :
resolution : 1
cycles : 1
win_counters : []
+ w7_counters : []
linux_counters : []
mac_counters : []
shutdown : False
@@ -263,6 +282,7 @@ tests :
resolution : 1
cycles : 1
win_counters : []
+ w7_counters : []
linux_counters : []
mac_counters : []
shutdown : False
@@ -272,6 +292,7 @@ tests :
resolution : 1
cycles : 1
win_counters : []
+ w7_counters : []
linux_counters : []
mac_counters : []
shutdown : False
@@ -281,6 +302,7 @@ tests :
resolution : 1
cycles : 1
win_counters : []
+ w7_counters : []
linux_counters : []
mac_counters : []
shutdown : False
@@ -290,6 +312,7 @@ tests :
resolution : 1
cycles : 1
win_counters : []
+ w7_counters : []
linux_counters : []
mac_counters : []
shutdown : False
@@ -299,6 +322,7 @@ tests :
resolution : 1
cycles : 1
win_counters : []
+ w7_counters : []
linux_counters : []
mac_counters : []
shutdown : False
@@ -308,6 +332,7 @@ tests :
resolution : 1
cycles : 1
win_counters : []
+ w7_counters : []
linux_counters : []
mac_counters : []
shutdown : False
@@ -317,6 +342,7 @@ tests :
resolution : 1
cycles : 1
win_counters : []
+ w7_counters : []
linux_counters : []
mac_counters : []
shutdown : False
diff --git a/mozilla/testing/performance/talos/ttest.py b/mozilla/testing/performance/talos/ttest.py
index 520382a04d2..9ec003c20cc 100644
--- a/mozilla/testing/performance/talos/ttest.py
+++ b/mozilla/testing/performance/talos/ttest.py
@@ -91,8 +91,13 @@ class TTest(object):
self.platform_type = 'linux_'
self._ffprocess = LinuxProcess()
elif platform.system() in ("Windows", "Microsoft"):
+ if '5.1' in platform.version(): #winxp
+ self.platform_type = 'win_'
+ elif '6.1' in platform.version(): #w7
+ self.platform_type = 'w7_'
+ else:
+ raise talosError('unsupported windows version')
self.cmanager = __import__('cmanager_win32')
- self.platform_type = 'win_'
self._ffprocess = Win32Process()
elif platform.system() == "Darwin":
self.cmanager = __import__('cmanager_mac')