New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 916807 link

Starred by 2 users

Issue metadata

Status: Started
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug

Blocking:
issue 721674



Sign in to add a comment

Accelerated video decoding textures are not correctly back-linked in memory-infra

Project Member Reported by mcasas@chromium.org, Dec 20

Issue description

See, e.g. https://i.imgur.com/3tJThzL.png (https://imgur.com/a/7Y01lQ9)
trace a memory-infra while playing back a video, and find the gpu
category, gpu/gl/textures/context_group_XXX/texture_* have
|effective_size| not zero, meaning that the mem infra doesn't know on
behalf of whom did the GPU allocate those textures, and if you hover
over the arrow, doesn't show anything useful.

Do the accountancy on renderer's GpuVideoDecoder who commanded the
allocation of those textures to fix this.
 
Blocking: 721674
Project Member

Comment 2 by bugdroid1@chromium.org, Dec 21

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f02517f921654cd95652fe18a4789873d7e26e31

commit f02517f921654cd95652fe18a4789873d7e26e31
Author: Miguel Casas <mcasas@chromium.org>
Date: Fri Dec 21 23:21:49 2018

GpuVideoDecoder: add OnMemoryDump capability

ToT memory-infra dump shows the Textures allocated for GPU video
decoding, but it has no idea of the Renderer client on behalf of
whom the GPU-side allocation has happened, see e.g. [1].

This CL adds GpuVideoDecoder::OnMemoryDump(), with the
appropriate OwnershipEdge, so that:
- The textures from the GPU process are reported with
  |effective_size| 0 and a renderer owner, e.g. [2].
- The Renderer has a new gpu sub-category |video_decoding|
  with the textures reporting both |size| and |effective_size|,
  and to which those in the GPU process can refer to, e.g. [3].

There's a bunch of changes to GpuVideoAcceleratorFactories{Impl}
to be able to access the gpu::ContextSupport (intermediate types
are not available to media/filters); also media/filters can't
depend on ui/gl, so this CL adds a trivial trace_util.{cc,h} to
media/video, respecting the hierarchies.

[1] https://i.imgur.com/3tJThzL.png (https://imgur.com/a/7Y01lQ9)
[2] https://i.imgur.com/KqJ8jQf.jpg  (https://imgur.com/a/jrXGM49)
[3] https://i.imgur.com/f0u5xeR.png (https://imgur.com/a/zrlSVke)

Bug: 916807
Change-Id: Iffbb3cf8911ff6009a7f4989409e1bb6a95cf719
Reviewed-on: https://chromium-review.googlesource.com/c/1385546
Commit-Queue: Miguel Casas <mcasas@chromium.org>
Reviewed-by: Dan Sanders <sandersd@chromium.org>
Cr-Commit-Position: refs/heads/master@{#618662}
[modify] https://crrev.com/f02517f921654cd95652fe18a4789873d7e26e31/content/browser/media/android/browser_gpu_video_accelerator_factories.cc
[modify] https://crrev.com/f02517f921654cd95652fe18a4789873d7e26e31/content/browser/media/android/browser_gpu_video_accelerator_factories.h
[modify] https://crrev.com/f02517f921654cd95652fe18a4789873d7e26e31/content/renderer/media/gpu/gpu_video_accelerator_factories_impl.cc
[modify] https://crrev.com/f02517f921654cd95652fe18a4789873d7e26e31/content/renderer/media/gpu/gpu_video_accelerator_factories_impl.h
[modify] https://crrev.com/f02517f921654cd95652fe18a4789873d7e26e31/media/filters/gpu_video_decoder.cc
[modify] https://crrev.com/f02517f921654cd95652fe18a4789873d7e26e31/media/filters/gpu_video_decoder.h
[modify] https://crrev.com/f02517f921654cd95652fe18a4789873d7e26e31/media/video/BUILD.gn
[modify] https://crrev.com/f02517f921654cd95652fe18a4789873d7e26e31/media/video/gpu_video_accelerator_factories.h
[modify] https://crrev.com/f02517f921654cd95652fe18a4789873d7e26e31/media/video/mock_gpu_video_accelerator_factories.h
[add] https://crrev.com/f02517f921654cd95652fe18a4789873d7e26e31/media/video/trace_util.cc
[add] https://crrev.com/f02517f921654cd95652fe18a4789873d7e26e31/media/video/trace_util.h

Sign in to add a comment