Closed Bug 983540 Opened 10 years ago Closed 6 years ago

B2G compositor high CPU usage when open camera or webRTC app

Categories

(Firefox OS Graveyard :: Hardware, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: pchang, Unassigned)

Details

Attachments

(1 file)

For buri/leo device, I found the compositor high CPU usage during camera or WebRTC(need to apply bug 976397).

From gecko profiler, I saw the following two CPU bottleneck.

CompositorParent::Composite
->LayerManagerComposite::Render
->LayerManagerComposite::EndFrame
->CompositorOGL::EndFrame
->__ioctl

CompositorParent::Composite
->LayerManagerComposite::Render
->CompositorOGL::DrawQuad
->memcpy
Attached file profile_29350_b2g.sym
Attached profiler from my leo device
(In reply to peter chang[:pchang][:peter] from comment #0)
> For buri/leo device, I found the compositor high CPU usage during camera or
> WebRTC(need to apply bug 976397).
> 
> From gecko profiler, I saw the following two CPU bottleneck.
> 
> CompositorParent::Composite
> ->LayerManagerComposite::Render
> ->LayerManagerComposite::EndFrame
> ->CompositorOGL::EndFrame
> ->__ioctl
> 

This is most likely the eglSwapBuffers() call, so spending time there is normal.

> CompositorParent::Composite
> ->LayerManagerComposite::Render
> ->CompositorOGL::DrawQuad
> ->memcpy

This is probably texture upload, but I don't know how video works on b2g. I'd hope we would use a gralloc buffer there so there wouldn't be any upload necessary on the compositor side...
(In reply to James Willcox (:snorp) (jwillcox@mozilla.com) from comment #2)
> (In reply to peter chang[:pchang][:peter] from comment #0)
> > For buri/leo device, I found the compositor high CPU usage during camera or
> > WebRTC(need to apply bug 976397).
> > 
> > From gecko profiler, I saw the following two CPU bottleneck.
> > 
> > CompositorParent::Composite
> > ->LayerManagerComposite::Render
> > ->LayerManagerComposite::EndFrame
> > ->CompositorOGL::EndFrame
> > ->__ioctl
> > 
> 
> This is most likely the eglSwapBuffers() call, so spending time there is
> normal.
That's right.
> 
> > CompositorParent::Composite
> > ->LayerManagerComposite::Render
> > ->CompositorOGL::DrawQuad
> > ->memcpy
> 
> This is probably texture upload, but I don't know how video works on b2g.
> I'd hope we would use a gralloc buffer there so there wouldn't be any upload
> necessary on the compositor side...

During my testing on leo, I think camera or webrtc uses gralloc buffer already. Therefore, I assume there won't have too much high CPU usage on compositor thread.

And I didn't find the high CPU issue on Nexus 4.

Later I will try to check CPU loading is still high if I skip the ImageLayer's DrawQuad on leo device.
(In reply to peter chang[:pchang][:peter] from comment #3) 
> During my testing on leo, I think camera or webrtc uses gralloc buffer
> already. Therefore, I assume there won't have too much high CPU usage on
> compositor thread.
> 
> And I didn't find the high CPU issue on Nexus 4.
> 
> Later I will try to check CPU loading is still high if I skip the
> ImageLayer's DrawQuad on leo device.

I still could see high cpu loading after skip ImageLayer's DrawQuad. Therefore, the effort of DrawQuad is not related to content format.
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: