diff --git a/CHANGELOG.md b/CHANGELOG.md
index def76a24..9bcf1db9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,13 @@
+
+## 1.32.1 (2017-06-19)
+
+
+#### Features
+
+* dump pmap -XX/X if available ([fa792a6a](https://github.com/mozilla-services/autopush/commit/fa792a6a9536263bcbac8aa29da147a987ffe854))
+
+
+
## 1.32.0 (2017-06-15)
diff --git a/autopush/__init__.py b/autopush/__init__.py
index 024294e2..4ee524b7 100644
--- a/autopush/__init__.py
+++ b/autopush/__init__.py
@@ -1 +1 @@
-__version__ = '1.32.0' # pragma: nocover
+__version__ = '1.32.1' # pragma: nocover
diff --git a/autopush/memusage.py b/autopush/memusage.py
index 9a187ef4..0c5dd60c 100644
--- a/autopush/memusage.py
+++ b/autopush/memusage.py
@@ -26,14 +26,29 @@ def trap_err(func, *args, **kwargs):
buf.writelines([repr(rusage), '\n\n'])
trap_err(objgraph.show_most_common_types, limit=0, file=buf)
buf.write('\n\n')
- pmap = trap_err(subprocess.check_output, ['pmap', '-x', str(os.getpid())],
- stderr=subprocess.STDOUT)
- buf.writelines([pmap, '\n\n'])
+ trap_err(pmap_extended, buf)
trap_err(dump_rpy_heap, buf)
trap_err(get_stats_asmmemmgr, buf)
return buf.getvalue()
+def pmap_extended(stream):
+ """Write pmap (w/ the most extended stats supported) to stream"""
+ pid = str(os.getpid())
+ # -XX/-X are recent linux only
+ ex_args = ['XX', 'X', 'x']
+ while True:
+ cmd = ['pmap', '-' + ex_args.pop(0), pid]
+ try:
+ pmap = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
+ except subprocess.CalledProcessError: # pragma: nocover
+ if not ex_args:
+ raise
+ else:
+ stream.writelines([' '.join(cmd[:2]), '\n', pmap, '\n\n'])
+ break
+
+
def dump_rpy_heap(stream): # pragma: nocover
"""Write PyPy's gcdump to the specified stream"""
if not hasattr(gc, '_dump_rpy_heap'):
diff --git a/autopush/tests/test_integration.py b/autopush/tests/test_integration.py
index 225577d5..b4007743 100644
--- a/autopush/tests/test_integration.py
+++ b/autopush/tests/test_integration.py
@@ -2179,7 +2179,7 @@ def test_memusage(self):
ok_('rusage' in body)
ok_('Logger' in body)
if find_executable('pmap'):
- ok_('RSS' in body) # pmap -x output
+ ok_('RSS' in body or 'Rss' in body) # pmap -x or -XX/X output
if hasattr(sys, 'pypy_version_info'): # pragma: nocover
ok_('size: ' in body)
ok_('rpy_unicode' in body)