Closed Bug 915857 Opened 11 years ago Closed 11 years ago

Check-in merge-profiles.py

Categories

(Core :: Gecko Profiler, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla26

People

(Reporter: BenWa, Assigned: BenWa)

References

Details

Attachments

(2 files, 1 obsolete file)

Attachment #803977 - Flags: review?(vdjeric)
Comment on attachment 803977 [details] [diff] [review]
patch

- Add a comment to the top of the file about what the script does and how it does it

>+    filedata = []
>+    symtable = dict()

Nit: camel case

>+        match = re.match('profile_([0-9]*)_(.*)\.sym', fname)

I think you meant 'profile_([0-9]+)_(.+)\.sym'

>+        if match is None:
>+            raise Exception("Filename '" + fname + "' doesn't match expected pattern")

Nit: consistent string quotes
>+                    frame['location'] = pid + frame['location']

Hmm, will you be able to distinguish (pid=12, location=3) from (pid=1, location=23)

>+    result = dict()
>+    result['profileJSON'] = dict()
>+    result['profileJSON']['meta'] = meta
>+    result['profileJSON']['libs'] = libs
>+    result['profileJSON']['threads'] = threads
>+    result['symbolicationTable'] = symtable
>+    result['format'] = 'profileJSONWithSymbolicationTable,1'

You could also do this in one or two lines, e.g. result = {'profileJSON': {'meta': meta, 'libs': libs, 'threads': threads, .. }. Just a suggestion

>+print "Usage: merge-profile.py profile_....sym profile_....sym > merged.sym"

print "Usage: merge-profile.py profile_<pid1>_<pname1>.sym profile_<pid2>_<pname2>.sym > merged.sym"
Attachment #803977 - Flags: review?(vdjeric) → review+
Blocks: 914654
Attached patch patchSplinter Review
Assignee: nobody → bgirard
Attachment #803977 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #804079 - Flags: review+
https://hg.mozilla.org/mozilla-central/rev/ed734d586569
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
Attached patch patch (b2g18)Splinter Review
merge-profiles.py, and enough of the changeset from bug 788022 to add 'startTime' logging to the profilers.

NOTE: This flag is now for security issues only. Please see https://wiki.mozilla.org/Release_Management/B2G_Landing to better understand the B2G approval process and landings.

[Approval Request Comment]
Bug caused by (feature/regressing bug #): 914658
User impact if declined: unable to merge profiles
Testing completed: run on local builds
Risk to taking this patch (and alternatives if risky): minimal
String or UUID changes made by this patch: none
Attachment #809460 - Flags: review?(bgirard)
Attachment #809460 - Flags: approval-mozilla-b2g18?
Attachment #809460 - Flags: review?(bgirard) → review+
Attachment #809460 - Flags: approval-mozilla-b2g18? → approval-mozilla-b2g18-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: