Closed Bug 1972995 Opened 9 months ago Closed 9 months ago

Improve naming of webrtc runnables

Categories

(Core :: WebRTC, task, P3)

task

Tracking

()

RESOLVED FIXED
142 Branch
Tracking Status
firefox142 --- fixed

People

(Reporter: pehrsons, Assigned: pehrsons)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

The Runnable class implements nsINamed in Nightly to improve tracing through the profiler. The name of webrtc runnables has until now been "TaskQueueWrapper::CreateTaskRunner" which is not very helpful.

The libwebrtc TaskQueueBase::PostTask interface however includes a Location arg that could include info on the callsite a la std::source_location. That class isn't fleshed out in libwebrtc but is overriden in Chromium. We could do something similar.

Note std::source_location is c++20, but one can achieve the same with __builtin_FUNCTION et al on supported toolchains.

This does mainly two things:

  • Overrides webrtc::Location with a new class declaration in libwebrtcglue,
    that makes use of __builtin_FUNCTION et al. on supported toolchains.
  • Uses the new location info to construct a better name (through nsINamed) to
    tag invocable-wrapped runnables with, for visibility in the profiler.
Blocks: 1973646
Status: ASSIGNED → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → 142 Branch
QA Whiteboard: [qa-triage-done-c143/b142]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: