Add Memory Dump Provider for CVPixelBufferRefs |
|||
Issue descriptionCVPixelBufferRefs refer to IOSurfaces and contribute to Chrome's memory usage. These aren't currently tracked in memory_infra, which is problematic as they are a potential source of leaks. We should add this instrumentation in, keeping in mind: - We want to avoid double-counting things (if these are ever used as GL textures, or referenced from more than one place, we should make sure to alias them). - Ideally we wouldn't have a memory dump provider per ref (although we could if the number of refs isn't too extreme).
,
Mar 24 2017
,
Mar 24 2017
Hmm, doing a memory-infra dump on a debug build while playing accelerated video blows up with [19775:775:0324/153531.129496:FATAL:process_memory_dump.cc(183)] Check failed: insertion_result.second. Duplicate name: gpu/gl/textures/share_group_17179869188/texture_5/face_0/level_0
,
Mar 24 2017
(oh, that's not a big deal -- the image binding for CVPixelBufferRefs is a little odd).
,
Mar 24 2017
So that I don't have to spelunk to find it, https://cs.chromium.org/chromium/src/media/gpu/ipc/service/gpu_video_decode_accelerator.cc?rcl=9e0bad82923e80164de225930fefe0986c1aa98d&l=63 texture_manager->SetLevelImage(ref, texture_target, 0, image.get(), can_bind_to_sampler ? gpu::gles2::Texture::BOUND : gpu::gles2::Texture::UNBOUND); So, 4:2:0 decoded frames will be UNBOUND even though they have an image pointer.
,
Mar 29 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4bb4e7702c8432bd1ec6843a9b7dee6f3e6e2eb3 commit 4bb4e7702c8432bd1ec6843a9b7dee6f3e6e2eb3 Author: ccameron <ccameron@chromium.org> Date: Wed Mar 29 23:03:22 2017 Add CVPixelBufferRef memory tracking Create a separate sequence number for GLImages created from CVPixelBufferRefs (previously they had no sequence number, so they would alias each other). Make VTVideoDecodeAccelerator be a dump provider. This dumps through the GLImage interface, and so it will correctly link the CVPixelBufferRefs that with the command buffer textures. Fix TextureManager's dump code to not assume that GLImage presence and texture state BOUND are related (a texture can have a GLImage but not be BOUND because it can't be textured out of directly). BUG= 704792 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel Review-Url: https://codereview.chromium.org/2771923006 Cr-Commit-Position: refs/heads/master@{#460566} [modify] https://crrev.com/4bb4e7702c8432bd1ec6843a9b7dee6f3e6e2eb3/gpu/command_buffer/service/texture_manager.cc [modify] https://crrev.com/4bb4e7702c8432bd1ec6843a9b7dee6f3e6e2eb3/media/gpu/vt_video_decode_accelerator_mac.cc [modify] https://crrev.com/4bb4e7702c8432bd1ec6843a9b7dee6f3e6e2eb3/media/gpu/vt_video_decode_accelerator_mac.h [modify] https://crrev.com/4bb4e7702c8432bd1ec6843a9b7dee6f3e6e2eb3/ui/gl/gl_image_io_surface.mm
,
Mar 29 2017
|
|||
►
Sign in to add a comment |
|||
Comment 1 by ericrk@chromium.org
, Mar 24 2017