Closed
Bug 1483478
Opened 6 years ago
Closed 6 years ago
Android AWSY test should store about:memory dumps as artifacts
Categories
(Testing :: General, enhancement, P2)
Tracking
(firefox65 fixed)
RESOLVED
FIXED
mozilla65
Tracking | Status | |
---|---|---|
firefox65 | --- | fixed |
People
(Reporter: glandium, Assigned: gbrown)
References
Details
Attachments
(1 file, 1 obsolete file)
2.12 KB,
patch
|
glandium
:
review+
|
Details | Diff | Splinter Review |
On platforms that use the actual AWSY test, we get about:memory dumps for every measurement, which is extremely useful when looking at regressions. But the android pseudo-AWSY test doesn't do the same, and that makes things harder to track down. For instance, for bug 1482797, I ended up patching the test to emit a dump like the real AWSY does, but couldn't figure out how to get that out of the emulator, so I ended up connecting to an interactive task on taskcluster, and manually adb pull the files when they appeared.
Assignee | ||
Comment 1•6 years ago
|
||
On the host, environment variable MOZ_UPLOAD_DIR provides a magic location for artifacts. So if runtestsremote.py ran self.device.pull(remote_dir, os.environ['MOZ_UPLOAD_DIR']) then any files written to remote_dir would become available as artifacts. I'm not sure how to share remote_dir between remote test harness and test: If runtestsremote.py uses remote_dir = '/sdcard/tests/artifacts', how does test_awsy_lite.html discover that location (or vice versa)?
Priority: -- → P3
Assignee | ||
Updated•6 years ago
|
Assignee: nobody → gbrown
Priority: P3 → P2
Assignee | ||
Comment 2•6 years ago
|
||
In my first attempt here, I tried calling + var memDumper = Cc["@mozilla.org/memory-info-dumper;1"].getService(Ci.nsIMemoryInfoDumper); + memDumper.dumpMemoryInfoToTempDir(aLabel, /* anonymize = */ false, + /* minimize = */ false); That generated unified-memory-report-<aLabel>-<pid>.json.gz in fennec's app_tmpdir/memory-reports - great! BUT, the file was empty - 0 length. Hmm.
Assignee | ||
Comment 3•6 years ago
|
||
I have better luck with dumpMemoryReportsToNamedFile - not sure why. https://treeherder.mozilla.org/#/jobs?repo=try&tier=1%2C2%2C3&selectedJob=213270180&revision=742acb8f65df007d0914025e6ce9fe59a7e8fc91
Assignee | ||
Comment 4•6 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&tier=1%2C2%2C3&searchStr=android&selectedJob=213394183&revision=d6fe33678c6d21babfe328e48b454a76e4b5789c demonstrates memory dump artifacts like https://queue.taskcluster.net/v1/task/A2cv1UneTEuY8Jip2Sr0lA/runs/0/artifacts/public/test_info//fresh-start.json.gz
Attachment #9027037 -
Flags: review?(mh+mozilla)
Reporter | ||
Comment 5•6 years ago
|
||
Comment on attachment 9027037 [details] [diff] [review] save memory dumps as artifacts in test_awsy_lite Review of attachment 9027037 [details] [diff] [review]: ----------------------------------------------------------------- ::: mobile/android/tests/browser/chrome/test_awsy_lite.html @@ +39,4 @@ > SimpleTest.requestLongerTimeout(3); // several long waits and GCs make for a long-running test > SimpleTest.requestCompleteLog(); // so that "PERFHERDER_DATA" can be scraped from the log > > + function checkpoint(aName, aSimpleName) { It feels like it would be better to generate the simple name from aName, by filtering for [a-zA-Z0-9 ] and then replacing " " with "-".
Attachment #9027037 -
Flags: review?(mh+mozilla)
Reporter | ||
Comment 6•6 years ago
|
||
(In reply to Geoff Brown [:gbrown] from comment #1) > On the host, environment variable MOZ_UPLOAD_DIR provides a magic location > for artifacts. So if runtestsremote.py ran > > self.device.pull(remote_dir, os.environ['MOZ_UPLOAD_DIR']) That's not part of your patch, though.
Assignee | ||
Comment 7•6 years ago
|
||
(In reply to Mike Hommey [:glandium] from comment #6) > (In reply to Geoff Brown [:gbrown] from comment #1) > > On the host, environment variable MOZ_UPLOAD_DIR provides a magic location > > for artifacts. So if runtestsremote.py ran > > > > self.device.pull(remote_dir, os.environ['MOZ_UPLOAD_DIR']) > > That's not part of your patch, though. Sorry, should have explained that. The harness already pulls from self.remoteMozLog to MOZ_UPLOAD_DIR. This patch leverages that by writing the memory dumps to self.remoteMozLog.
Assignee | ||
Comment 8•6 years ago
|
||
Now using regex replacement to derive filenames from labels. https://treeherder.mozilla.org/#/jobs?repo=try&tier=1%2C2%2C3&selectedJob=213506250&revision=0f38ea45e82b2612a9a25961733632d146753b14
Attachment #9027037 -
Attachment is obsolete: true
Attachment #9027191 -
Flags: review?(mh+mozilla)
Reporter | ||
Updated•6 years ago
|
Attachment #9027191 -
Flags: review?(mh+mozilla) → review+
Pushed by gbrown@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/510f4bccd603 Store memory dump artifacts in awsy-lite; r=glandium
Comment 10•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/510f4bccd603
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox65:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
You need to log in
before you can comment on or make changes to this bug.
Description
•