Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

A new tool: TimerFirings logging

22 views
Skip to first unread message

Nicholas Nethercote

unread,
Sep 17, 2015, 1:12:15 AM9/17/15
to dev-...@lists.mozilla.org
Hi,

I just landed a new tool called "TimerFirings logging". You can use it
to identify which timers are firing most frequently in Firefox. This
is useful because timer firings are a common cause of wakeups, which
tend to increase power consumption.

This was inspired by prior work done by azakai
(https://wiki.mozilla.org/Mobile/Powersaving/Wakeups/Debugging) and
rvitillo (http://robertovitillo.com/2014/02/04/idle-wakeups-are-evil/).

The bug was https://bugzilla.mozilla.org/show_bug.cgi?id=1203427. The
documentation is at
https://developer.mozilla.org/en-US/docs/Mozilla/Performance/TimerFirings_logging.

Nick

Mike Hommey

unread,
Sep 17, 2015, 3:05:53 AM9/17/15
to Nicholas Nethercote, dev-...@lists.mozilla.org
Do GC and CC appear as timer firings? If not (which I guess is the
answer), shouldn't they?

Mike

Nicholas Nethercote

unread,
Sep 17, 2015, 3:58:26 AM9/17/15
to Mike Hommey, dev-...@lists.mozilla.org
On Thu, Sep 17, 2015 at 5:05 PM, Mike Hommey <m...@glandium.org> wrote:
>
> Do GC and CC appear as timer firings? If not (which I guess is the
> answer), shouldn't they?

At least some of them do. There are the following timers that I have seen:

- GCTimerFired
- FullGCTimerFired
- ShrinkingGCTimerFired
- InterSliceGCTimerFired
- CCTimerFired
- ICCTimerFired

I don't know if that covers all GC/CC invocations.

Nick

Andrew McCreight

unread,
Sep 17, 2015, 10:36:53 AM9/17/15
to dev-...@lists.mozilla.org
As Nick listed, the bulk of our GCs and CCs are the result of timers from nsJSEnvironment.cpp. There are some additional GCs that happen when there is a lot of allocation, and chrome JS can manually trigger immediate CCs, though I think the latter only happens in testing. The GCs triggered by allocation are likely not going to result in wakeups, because we would only do that if there is already heavy activity.

Andrew

On Thu, Sep 17, 2015 at 12:05 AM, Mike Hommey <m...@glandium.org> wrote:
On Wed, Sep 16, 2015 at 10:11:51PM -0700, Nicholas Nethercote wrote:
> Hi,
>
> I just landed a new tool called "TimerFirings logging". You can use it
> to identify which timers are firing most frequently in Firefox. This
> is useful because timer firings are a common cause of wakeups, which
> tend to increase power consumption.
>
> This was inspired by prior work done by azakai
> (https://wiki.mozilla.org/Mobile/Powersaving/Wakeups/Debugging) and
> rvitillo (http://robertovitillo.com/2014/02/04/idle-wakeups-are-evil/).
>
> The bug was https://bugzilla.mozilla.org/show_bug.cgi?id=1203427. The
> documentation is at
> https://developer.mozilla.org/en-US/docs/Mozilla/Performance/TimerFirings_logging.

Do GC and CC appear as timer firings? If not (which I guess is the
answer), shouldn't they?

Mike
_______________________________________________
dev-power mailing list
dev-...@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-power

0 new messages