Closed Bug 1723813 Opened 3 years ago Closed 3 years ago

Add a profiler marker in nsSocketTransportService::Poll

Categories

(Core :: Networking, task, P2)

task

Tracking

()

RESOLVED FIXED
92 Branch
Tracking Status
firefox92 --- fixed

People

(Reporter: florian, Assigned: florian)

References

(Blocks 1 open bug, Regressed 1 open bug)

Details

(Whiteboard: [necko-triaged])

Attachments

(1 file)

This will be helpful to understand bug 1709175, and should remain generally useful afterwards.

Severity: -- → S3
Priority: -- → P2
Whiteboard: [necko-triaged]
Pushed by fqueze@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/fb900d90b4c9
Add a profiler marker in nsSocketTransportService::Poll to help understand excessive CPU use on the Socket Thread, r=mstange,necko-reviewers,valentin,gerald.
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 92 Branch

This marker is super-high volume; on a profile of fast.net, I see 30% of the CPU time used in the transfer by socketthread going to the printfcstring() calls. (~10-15% of a core). And they're all basically identical.

Perhaps this should be optional via ifdef or profiler feature. i don't think this is generally useful in enough cases to leave it in, as it affects real performance when trying to do large transfers

https://share.firefox.dev/42OOMU2

Flags: needinfo?(florian)

perhaps we should put this behind an:
#if defined(DEBUG) || defined (POLL_MARKERS)
which would avoid it bitrotting, but also avoid it interfering with profiles except when we want to actively investigate poll issues.

Profile with it #defined out: https://share.firefox.dev/3SKnAkK
CPU use is ~10%+ lower during transfer (and transfer was a bit higher, ~950-980Mbps, though that is likely not due to the change, but it should have pushed CPU even a bit higher)

(In reply to Randell Jesup [:jesup] (needinfo me) from comment #7)

Profile with it #defined out: https://share.firefox.dev/3SKnAkK

What happened to the Awake markers in the socket thread of the parent in that profile? https://share.firefox.dev/4bP50R3 They seem to finish but never start.

Flags: needinfo?(florian) → needinfo?(rjesup)

(In reply to Randell Jesup [:jesup] (needinfo me) from comment #5)

This marker is super-high volume; on a profile of fast.net, I see 30% of the CPU time used in the transfer by socketthread going to the printfcstring() calls. (~10-15% of a core). And they're all basically identical.

I see only 12 samples in nsPrintfCString::nsPrintfCString, how do you get to that 30% figure?

Flags: needinfo?(rjesup)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: