|
|
Chromium Code Reviews
DescriptionReduce unique_ptr scope to save memory
There are a few functions where unique_ptrs are used but not destroyed right after their usage.
This will increase the peak memory usage.
Added extra scopes around these unique-ptrs to destroy them right after their usage.
BUG=657213
CQ_INCLUDE_TRYBOTS=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
Committed: https://crrev.com/0643d7f805b69c2fd595540791dc6a62ca195254
Cr-Commit-Position: refs/heads/master@{#431464}
Patch Set 1 #Patch Set 2 : fix code comments #
Total comments: 2
Messages
Total messages: 31 (22 generated)
Description was changed from ========== fix format by git cl format add extra scope for some functions to enable unique_ptr to be destroyed right after its usage BUG=crbug.com/657213 ========== to ========== fix format by git cl format add extra scope for some functions to enable unique_ptr to be destroyed right after its usage BUG=crbug.com/657213 CQ_INCLUDE_TRYBOTS=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 ==========
Description was changed from ========== fix format by git cl format add extra scope for some functions to enable unique_ptr to be destroyed right after its usage BUG=crbug.com/657213 CQ_INCLUDE_TRYBOTS=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 ========== to ========== There are a few functions where unique_ptr are used but not destroyed right after its usage. This will potentially increase the memory pressure. Added extra scopes around these unique-ptrs to destroy them right after their usage. BUG=657213 CQ_INCLUDE_TRYBOTS=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 ==========
The CQ bit was checked by chengx@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Description was changed from ========== There are a few functions where unique_ptr are used but not destroyed right after its usage. This will potentially increase the memory pressure. Added extra scopes around these unique-ptrs to destroy them right after their usage. BUG=657213 CQ_INCLUDE_TRYBOTS=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 ========== to ========== There are a few functions where unique_ptr are used but not destroyed right after its usage. This will potentially increase the memory pressure. Added extra scopes around these unique-ptrs to destroy them right after their usage. BUG=657213 CQ_INCLUDE_TRYBOTS=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 ==========
The CQ bit was checked by chengx@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Description was changed from ========== There are a few functions where unique_ptr are used but not destroyed right after its usage. This will potentially increase the memory pressure. Added extra scopes around these unique-ptrs to destroy them right after their usage. BUG=657213 CQ_INCLUDE_TRYBOTS=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 ========== to ========== There are a few functions where unique_ptrs are used but not destroyed right after their usage. This will potentially increase the memory pressure. Added extra scopes around these unique-ptrs to destroy them right after their usage. BUG=657213 CQ_INCLUDE_TRYBOTS=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 ==========
Description was changed from ========== There are a few functions where unique_ptrs are used but not destroyed right after their usage. This will potentially increase the memory pressure. Added extra scopes around these unique-ptrs to destroy them right after their usage. BUG=657213 CQ_INCLUDE_TRYBOTS=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 ========== to ========== There are a few functions where unique_ptrs are used but not destroyed right after their usage. This will increase the peak memory usage. Added extra scopes around these unique-ptrs to destroy them right after their usage. BUG=657213 CQ_INCLUDE_TRYBOTS=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 ==========
chengx@chromium.org changed reviewers: + jbauman@chromium.org, stanisc@chromium.org
PTAL!
lgtm
lgtm https://codereview.chromium.org/2490553004/diff/20001/gpu/command_buffer/serv... File gpu/command_buffer/service/gles2_cmd_decoder.cc (right): https://codereview.chromium.org/2490553004/diff/20001/gpu/command_buffer/serv... gpu/command_buffer/service/gles2_cmd_decoder.cc:13895: width, height, border, format, type, zero.get()); You could consider something like replacing zero.get() with std::vector<char>(pixel_size). That would allocate and zero the buffer in place and free it right after returning from glTexImage2D call. But the end result would be exactly the same and the existing implementation is probably more straightforward.
Thanks, I will commit the cl. https://codereview.chromium.org/2490553004/diff/20001/gpu/command_buffer/serv... File gpu/command_buffer/service/gles2_cmd_decoder.cc (right): https://codereview.chromium.org/2490553004/diff/20001/gpu/command_buffer/serv... gpu/command_buffer/service/gles2_cmd_decoder.cc:13895: width, height, border, format, type, zero.get()); On 2016/11/09 22:33:03, stanisc wrote: > You could consider something like replacing zero.get() with > std::vector<char>(pixel_size). That would allocate and zero the buffer in place > and free it right after returning from glTexImage2D call. > But the end result would be exactly the same and the existing implementation is > probably more straightforward. Thanks for your suggestion. I will the current version for now.
Description was changed from ========== There are a few functions where unique_ptrs are used but not destroyed right after their usage. This will increase the peak memory usage. Added extra scopes around these unique-ptrs to destroy them right after their usage. BUG=657213 CQ_INCLUDE_TRYBOTS=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 ========== to ========== Reduce unique_ptr scope to save memory There are a few functions where unique_ptrs are used but not destroyed right after their usage. This will increase the peak memory usage. Added extra scopes around these unique-ptrs to destroy them right after their usage. BUG=657213 CQ_INCLUDE_TRYBOTS=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 ==========
The CQ bit was checked by chengx@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: cast_shell_android on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/cast_shell_a...)
The CQ bit was checked by chengx@chromium.org
The CQ bit was unchecked by chengx@chromium.org
The CQ bit was checked by chengx@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Description was changed from ========== Reduce unique_ptr scope to save memory There are a few functions where unique_ptrs are used but not destroyed right after their usage. This will increase the peak memory usage. Added extra scopes around these unique-ptrs to destroy them right after their usage. BUG=657213 CQ_INCLUDE_TRYBOTS=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 ========== to ========== Reduce unique_ptr scope to save memory There are a few functions where unique_ptrs are used but not destroyed right after their usage. This will increase the peak memory usage. Added extra scopes around these unique-ptrs to destroy them right after their usage. BUG=657213 CQ_INCLUDE_TRYBOTS=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 ==========
Message was sent while issue was closed.
Committed patchset #2 (id:20001)
Message was sent while issue was closed.
Description was changed from ========== Reduce unique_ptr scope to save memory There are a few functions where unique_ptrs are used but not destroyed right after their usage. This will increase the peak memory usage. Added extra scopes around these unique-ptrs to destroy them right after their usage. BUG=657213 CQ_INCLUDE_TRYBOTS=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 ========== to ========== Reduce unique_ptr scope to save memory There are a few functions where unique_ptrs are used but not destroyed right after their usage. This will increase the peak memory usage. Added extra scopes around these unique-ptrs to destroy them right after their usage. BUG=657213 CQ_INCLUDE_TRYBOTS=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 Committed: https://crrev.com/0643d7f805b69c2fd595540791dc6a62ca195254 Cr-Commit-Position: refs/heads/master@{#431464} ==========
Message was sent while issue was closed.
Patchset 2 (id:??) landed as https://crrev.com/0643d7f805b69c2fd595540791dc6a62ca195254 Cr-Commit-Position: refs/heads/master@{#431464} |
