Closed Bug 1616591 Opened 5 years ago Closed 5 years ago

Make APZ logging enable-able at runtime (use moz log)

Categories

(Core :: Panning and Zooming, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla75
Tracking Status
firefox75 --- fixed

People

(Reporter: kats, Assigned: kats)

References

Details

Attachments

(2 files)

It would be useful to migrate the APZ and input logging so that they can be enabled at runtime instead of requiring compile-time ifdef changes. This way people experiencing issues can enable the logs at runtime via prefs or similar and provide useful information. The networking team has similar functionality for networking bugs that seems to be helpful to them in debugging rare issues.

I have patches that build locally but I still need to do a try push to verify they build everywhere. My try push access was revoked while I was away and I'm in the process of getting that restored. I'll put the patches up for now but they might need some tweaking.

  • Some breakage in FocusState/FocusTarget was introduced when the LayersId struct
    was introduced in bug 1448490; printing LayersId type now requires using the
    cast operator to get back the underlying uint64_t.
  • Some breakage was introduced in APZCTreeManager by bug 1552608 when it
    introduced the HitTestResult structure.
  • Some breakage in SimpleVelocityTracker seems to have been there since it
    landed as it tries to access a protected member in Axis. Added a public
    method to expose this as needed.
  • Some breakage in ActiveElementManager was introduced in bug 1266595 when the
    runnable was wrapped in a RefPtr.
Assignee: nobody → kats
Status: NEW → ASSIGNED

The MOZ_LOG framework is the canonical Gecko logging framework, and provides
better control over what gets logged and where it goes, as well as provides
additional options like process/thread/timestamp prefixing of log output. This
patch does the minimum necessary to migrate the logs; each pre-existing
logging define is converted to a log module and all pre-existing log lines are
defaulted to LogLevel::Debug.

In addition, this prevents future breakage in the logging since everything
gets compiled on at least some configurations (e.g. non-Release, non-Android
builds).

Depends on D63547

Pushed by kgupta@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ddcb3e57bb7d Make all the APZ log statements build again if enabled. r=botond https://hg.mozilla.org/integration/autoland/rev/1499b7431d91 Migrate APZ logging to use the MOZ_LOG framework. r=botond
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla75
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: