|
|
Created:
6 years, 7 months ago by dshwang Modified:
6 years, 7 months ago CC:
chromium-reviews, piman+watch_chromium.org, jam, darin-cc_chromium.org Base URL:
https://chromium.googlesource.com/chromium/src.git@master Visibility:
Public. |
DescriptionSyncPointManager never returns 0.
When the next sync point overflow occurs, it returns 1, not 0.
BUG=365904, 373452
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=270997
Patch Set 1 #Patch Set 2 : rebase to ToT #
Messages
Total messages: 17 (0 generated)
It's follow-up CL of https://codereview.chromium.org/279303003 Could you review?
We've concerned about sync point overflow, but we've ignored because it might take several years. But now it became possible issue, so I submitted this CL.
lgtm
lgtm
The CQ bit was checked by dongseong.hwang@intel.com
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dongseong.hwang@intel.com/288153004/1
The CQ bit was unchecked by commit-bot@chromium.org
Failed to apply patch for @master/content/common/gpu/sync_point_manager.cc: While running svn add @master --force --config-dir /b/infra_internal/commit_queue/subversion_config --non-interactive; svn: '@master' is just a peg revision. Maybe try '@master@' instead? Patch: @master/content/common/gpu/sync_point_manager.cc Index: content/common/gpu/sync_point_manager.cc diff --git @master/content/common/gpu/sync_point_manager.cc @master/content/common/gpu/sync_point_manager.cc index 9383574faf9eb1039d8111f0b8ff46389425335f..5aa4b7e8e8c51f07bee35cb715c046c1bf59f579 100644 --- a/@master/content/common/gpu/sync_point_manager.cc +++ b/@master/content/common/gpu/sync_point_manager.cc @@ -26,6 +26,9 @@ SyncPointManager::~SyncPointManager() { uint32 SyncPointManager::GenerateSyncPoint() { base::AutoLock lock(lock_); uint32 sync_point = next_sync_point_++; + // When an integer overflow occurs, don't return 0. + if (!sync_point) + sync_point = next_sync_point_++; // Note: wrapping would take days for a buggy/compromized renderer that would // insert sync points in a loop, but if that were to happen, better explicitly
The CQ bit was checked by dongseong.hwang@intel.com
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dongseong.hwang@intel.com/288153004/20001
The CQ bit was unchecked by commit-bot@chromium.org
Failed to apply patch for @master/content/common/gpu/sync_point_manager.cc: While running svn add @master --force --config-dir /b/infra_internal/commit_queue/subversion_config --non-interactive; svn: '@master' is just a peg revision. Maybe try '@master@' instead? Patch: @master/content/common/gpu/sync_point_manager.cc Index: content/common/gpu/sync_point_manager.cc diff --git @master/content/common/gpu/sync_point_manager.cc @master/content/common/gpu/sync_point_manager.cc index 9383574faf9eb1039d8111f0b8ff46389425335f..5aa4b7e8e8c51f07bee35cb715c046c1bf59f579 100644 --- a/@master/content/common/gpu/sync_point_manager.cc +++ b/@master/content/common/gpu/sync_point_manager.cc @@ -26,6 +26,9 @@ SyncPointManager::~SyncPointManager() { uint32 SyncPointManager::GenerateSyncPoint() { base::AutoLock lock(lock_); uint32 sync_point = next_sync_point_++; + // When an integer overflow occurs, don't return 0. + if (!sync_point) + sync_point = next_sync_point_++; // Note: wrapping would take days for a buggy/compromized renderer that would // insert sync points in a loop, but if that were to happen, better explicitly
The CQ bit was checked by phajdan.jr@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dongseong.hwang@intel.com/288153004/20001
Message was sent while issue was closed.
Change committed as 270997
Message was sent while issue was closed.
Mind changing this also in in_process_command_buffer.cc in the SyncPointManager class there (for tests)?
Message was sent while issue was closed.
On 2014/05/16 16:59:01, sievers wrote: > Mind changing this also in in_process_command_buffer.cc in the SyncPointManager > class there (for tests)? I don't fully understand your question. Could you repeat the question? By the way, in_process_command_buffer also uses sync_point_manager. uint32 InProcessCommandBuffer::InsertSyncPoint() { uint32 sync_point = g_sync_point_manager.Get().GenerateSyncPoint(); QueueTask(base::Bind(&InProcessCommandBuffer::RetireSyncPointOnGpuThread, base::Unretained(this), sync_point)); return sync_point; } |