Closed Bug 835589 Opened 13 years ago Closed 13 years ago

Profiler script needs more parallelism

Categories

(Firefox OS Graveyard :: GonkIntegration, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: cjones, Unassigned)

References

Details

Attachments

(1 file, 1 obsolete file)

Right now all the profiles are pulled off device serially, and then symbolicated serially. My machine with 16 HW threads is sitting twiddling its thumbs during this process. And this overhead is pretty significant in my work cycle.
I made the symbolicate step very fast for DMD by caching the results across invocations. Doing so resolved any need for parallelism for me.
One of the big delays is waiting for the files to stabilize. Paralleling that would speed things up dramatically. (as well as adding justin's caching)
Yeah, I should have added that my common case is |./profile.sh capture|, that is, pulling all profiles off device. This obviously wouldn't make a difference for |./profile.sh capture Foo|, unless we got really smart about streaming samples through symbolification.
Comment on attachment 710225 [details] Pointer to Github pull request: https://github.com/mozilla-b2g/B2G/pull/204 This patch adds a crude mechanism to launch the pull and symbolicate commands in parallel. On my laptop it drops the time required to gather profiles for 7 open applications from ~35s to ~27s.
Attachment #710225 - Flags: review?(dhylands)
I would probably do it this way instead...
Attachment #710336 - Flags: review?(gsvelto)
Summary: Profiler script needs moar parallelism → Profiler script needs more parallelism
The next optimization would be to do this: For each b2g sub-process: launch a subshell which does the following wait for 1 file to stabilize pull that 1 file symbolicate that 1 file
I went ahead and modified pull request 205 to be the fully parallelized version
Comment on attachment 710336 [details] Pointer to Github pull request: https://github.com/mozilla-b2g/B2G/pull/205 (In reply to Dave Hylands [:dhylands] from comment #8) > I went ahead and modified pull request 205 to be the fully parallelized > version This is so much better than what I had done; my bash-fu still needs a lot of practice. There's only a small issue to fix before we merge it: the single-pid functionality doesn't work anymore because it doesn't wait for the file to stabilize anymore, I've left the comment on the GitHub diff.
Attachment #710336 - Flags: review?(gsvelto) → review+
Attachment #710225 - Attachment is obsolete: true
Attachment #710225 - Flags: review?(dhylands)
- Added some more comments. - fixed the missing call to cmd_stabilize (as per review) - did a little more cleanup of the echos Merged https://github.com/mozilla-b2g/B2G/commit/739c93331486700eb5cab3c8dfbc77599be3303e
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Depends on: 838860
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: