Closed Bug 1329114 Opened 3 years ago Closed 3 years ago

Properly embed subprocess profiles in the profile object

Categories

(Core :: Gecko Profiler, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: mstange, Assigned: mstange)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

At the moment, profiles from content and plugin processes are embedded in the "threads" array, as stringified JSON. So the threads array contains both regular objects (for the actual threads of the main process) and strings (for the subprocess profiles).
This is not a nice API.
The profile object should have a separate array of subprocess profiles, and those profiles should be embedded as objects and not as strings.
This may be a nice way to structure things:

> profile = {
>   meta: {
>     interval: 1,
>     abi: "x86_64-gcc3"
>     ...
>   }
>   processes: {
>     {
>       meta: { processType, pid, ... },
>       thread: [ { ... }, { ... } ],
>     },
>     {
>       meta: { processType, pid, ... },
>       thread: [ { ... }, { ... } ],
>     }
>   }
> }
Comment on attachment 8856138 [details]
Bug 1329114 - Update talos symbolication to work with profile format version 5.

https://reviewboard.mozilla.org/r/128086/#review130650

looks good to me
Attachment #8856138 - Flags: review?(jmaher) → review+
Assignee: nobody → mstange
Status: NEW → ASSIGNED
Comment on attachment 8856137 [details]
Bug 1329114 - Put profiles from other processes into a 'processes' array, not into the threads array, and don't stringify them.

https://reviewboard.mozilla.org/r/128084/#review132268

Sorry for the slow review!
Attachment #8856137 - Flags: review?(n.nethercote) → review+
Pushed by mstange@themasta.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/a62279f9eb61
Put profiles from other processes into a 'processes' array, not into the threads array, and don't stringify them. r=njn
https://hg.mozilla.org/integration/mozilla-inbound/rev/6a7c42113fab
Update talos symbolication to work with profile format version 5. r=jmaher
Pushed by archaeopteryx@coole-files.de:
https://hg.mozilla.org/integration/mozilla-inbound/rev/4a4cf63c95a1
Update talos symbolication to work with profile format version 5: remove unused json import from symbolication.py. r=lint-fix
You need to log in before you can comment on or make changes to this bug.