summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorccameron@chromium.org <ccameron@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-13 07:07:00 +0000
committerccameron@chromium.org <ccameron@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-13 07:07:00 +0000
commitdb7776922a4f631052a61b1d67c637acfb524bd1 (patch)
tree2508f7a2dc113e768d164574ca95bb518119b1d6
parentb02e7ec861ec98ef21ee5447a06fa1ef2e37b328 (diff)
downloadchromium_src-db7776922a4f631052a61b1d67c637acfb524bd1.zip
chromium_src-db7776922a4f631052a61b1d67c637acfb524bd1.tar.gz
chromium_src-db7776922a4f631052a61b1d67c637acfb524bd1.tar.bz2
Remove crash instrumentation, since we haven't seen a crash in
a long time (Canary just got some with single-threaded proxy, but that's a different issue). BUG=151428 Review URL: https://chromiumcodereview.appspot.com/11363207 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167317 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--cc/layer_tree_host.cc2
-rw-r--r--cc/resource_provider.cc39
-rw-r--r--cc/resource_provider.h5
-rw-r--r--cc/resource_update_controller.cc2
-rw-r--r--cc/thread_proxy.cc14
5 files changed, 1 insertions, 61 deletions
diff --git a/cc/layer_tree_host.cc b/cc/layer_tree_host.cc
index a186ed0..b969201 100644
--- a/cc/layer_tree_host.cc
+++ b/cc/layer_tree_host.cc
@@ -249,9 +249,7 @@ void LayerTreeHost::finishCommitOnImplThread(LayerTreeHostImpl* hostImpl)
DCHECK(m_proxy->isImplThread());
m_contentsTextureManager->updateBackingsInDrawingImplTree();
- ResourceProvider::debugNotifyEnterZone(0xA000000);
m_contentsTextureManager->reduceMemory(hostImpl->resourceProvider());
- ResourceProvider::debugNotifyLeaveZone();
hostImpl->setRootLayer(TreeSynchronizer::synchronizeTrees(rootLayer(), hostImpl->detachLayerTree(), hostImpl));
diff --git a/cc/resource_provider.cc b/cc/resource_provider.cc
index d60d664..0107e82 100644
--- a/cc/resource_provider.cc
+++ b/cc/resource_provider.cc
@@ -23,15 +23,6 @@
using WebKit::WebGraphicsContext3D;
-namespace {
- // Temporary variables for debugging crashes in issue 151428 in canary.
- // Do not use these!
- const int g_debugMaxResourcesTracked = 64;
- unsigned int g_debugZone = 0;
- int64 g_debugResDestroyedCount = 0;
- cc::ResourceProvider::ResourceId g_debugResDestroyed[g_debugMaxResourcesTracked] = { 0 };
-}
-
namespace cc {
static GLenum textureToStorageFormat(GLenum textureFormat)
@@ -233,7 +224,6 @@ void ResourceProvider::deleteResourceInternal(ResourceMap::iterator it)
if (resource->pixels)
delete[] resource->pixels;
- g_debugResDestroyed[g_debugResDestroyedCount % g_debugMaxResourcesTracked] = (*it).first | g_debugZone;
m_resources.erase(it);
}
@@ -352,23 +342,7 @@ const ResourceProvider::Resource* ResourceProvider::lockForRead(ResourceId id)
{
DCHECK(m_threadChecker.CalledOnValidThread());
ResourceMap::iterator it = m_resources.find(id);
-
- if (it == m_resources.end()) {
- int resourceCount = m_resources.size();
- int64 resDestroyedCount = g_debugResDestroyedCount;
- ResourceId resDestroyed[g_debugMaxResourcesTracked];
- for (int64 i = 0; i < g_debugMaxResourcesTracked; ++i)
- resDestroyed[i] = g_debugResDestroyed[i];
- ResourceId resToDestroy = id;
-
- base::debug::Alias(&resourceCount);
- base::debug::Alias(&resDestroyedCount);
- for (int64 i = 0; i < g_debugMaxResourcesTracked; ++i)
- base::debug::Alias(&resDestroyed[i]);
- base::debug::Alias(&resToDestroy);
- CHECK(it != m_resources.end());
- }
-
+ CHECK(it != m_resources.end());
Resource* resource = &it->second;
DCHECK(!resource->lockedForWrite);
DCHECK(!resource->exported);
@@ -678,15 +652,4 @@ bool ResourceProvider::transferResource(WebGraphicsContext3D* context, ResourceI
return true;
}
-void ResourceProvider::debugNotifyEnterZone(unsigned int zone)
-{
- g_debugZone = zone;
-}
-
-void ResourceProvider::debugNotifyLeaveZone()
-{
- g_debugZone = 0;
-}
-
-
} // namespace cc
diff --git a/cc/resource_provider.h b/cc/resource_provider.h
index b7fbcda..e75cda6 100644
--- a/cc/resource_provider.h
+++ b/cc/resource_provider.h
@@ -197,11 +197,6 @@ public:
DISALLOW_COPY_AND_ASSIGN(ScopedWriteLockSoftware);
};
- // Temporary functions for debugging crashes in issue 151428 in canary.
- // Do not use these!
- static void debugNotifyEnterZone(unsigned int index);
- static void debugNotifyLeaveZone();
-
private:
struct Resource {
Resource();
diff --git a/cc/resource_update_controller.cc b/cc/resource_update_controller.cc
index 69bddb1..4ff729c 100644
--- a/cc/resource_update_controller.cc
+++ b/cc/resource_update_controller.cc
@@ -217,10 +217,8 @@ void ResourceUpdateController::finalize()
void ResourceUpdateController::onTimerFired()
{
m_taskPosted = false;
- ResourceProvider::debugNotifyEnterZone(0xB000000);
if (!updateMoreTexturesIfEnoughTimeRemaining())
m_client->readyToFinalizeTextureUpdates();
- ResourceProvider::debugNotifyLeaveZone();
}
base::TimeTicks ResourceUpdateController::now() const
diff --git a/cc/thread_proxy.cc b/cc/thread_proxy.cc
index bfff733..8a50a77 100644
--- a/cc/thread_proxy.cc
+++ b/cc/thread_proxy.cc
@@ -356,9 +356,7 @@ bool ThreadProxy::reduceContentsTextureMemoryOnImplThread(size_t limitBytes, int
if (!m_layerTreeHost->contentsTextureManager())
return false;
- ResourceProvider::debugNotifyEnterZone(0x1000000);
bool reduceResult = m_layerTreeHost->contentsTextureManager()->reduceMemoryOnImplThread(limitBytes, priorityCutoff, m_layerTreeHostImpl->resourceProvider());
- ResourceProvider::debugNotifyLeaveZone();
if (!reduceResult)
return false;
@@ -658,10 +656,8 @@ void ThreadProxy::beginFrameCompleteOnImplThread(CompletionEvent* completion, Re
m_layerTreeHost->contentsTextureManager()->pushTexturePrioritiesToBackings();
m_currentResourceUpdateControllerOnImplThread = ResourceUpdateController::create(this, Proxy::implThread(), queue.Pass(), m_layerTreeHostImpl->resourceProvider(), hasImplThread());
- ResourceProvider::debugNotifyEnterZone(0x2000000);
m_currentResourceUpdateControllerOnImplThread->performMoreUpdates(
m_schedulerOnImplThread->anticipatedDrawTime());
- ResourceProvider::debugNotifyLeaveZone();
m_commitCompletionEventOnImplThread = completion;
}
@@ -684,9 +680,7 @@ void ThreadProxy::scheduledActionCommit()
DCHECK(m_currentResourceUpdateControllerOnImplThread);
// Complete all remaining texture updates.
- ResourceProvider::debugNotifyEnterZone(0x3000000);
m_currentResourceUpdateControllerOnImplThread->finalize();
- ResourceProvider::debugNotifyLeaveZone();
m_currentResourceUpdateControllerOnImplThread.reset();
// If there are linked evicted backings, these backings' resources may be put into the
@@ -752,9 +746,7 @@ ScheduledActionDrawAndSwapResult ThreadProxy::scheduledActionDrawAndSwapInternal
// prepareToDraw(), it is guarded on canDraw() as well.
LayerTreeHostImpl::FrameData frame;
- ResourceProvider::debugNotifyEnterZone(0x4000000);
bool drawFrame = m_layerTreeHostImpl->canDraw() && (m_layerTreeHostImpl->prepareToDraw(frame) || forcedDraw);
- ResourceProvider::debugNotifyLeaveZone();
if (drawFrame) {
m_layerTreeHostImpl->drawLayers(frame);
result.didDraw = true;
@@ -834,9 +826,7 @@ void ThreadProxy::didAnticipatedDrawTimeChange(base::TimeTicks time)
if (!m_currentResourceUpdateControllerOnImplThread)
return;
- ResourceProvider::debugNotifyEnterZone(0x5000000);
m_currentResourceUpdateControllerOnImplThread->performMoreUpdates(time);
- ResourceProvider::debugNotifyLeaveZone();
}
void ThreadProxy::readyToFinalizeTextureUpdates()
@@ -937,9 +927,7 @@ void ThreadProxy::layerTreeHostClosedOnImplThread(CompletionEvent* completion)
{
TRACE_EVENT0("cc", "ThreadProxy::layerTreeHostClosedOnImplThread");
DCHECK(isImplThread());
- ResourceProvider::debugNotifyEnterZone(0x6000000);
m_layerTreeHost->deleteContentsTexturesOnImplThread(m_layerTreeHostImpl->resourceProvider());
- ResourceProvider::debugNotifyLeaveZone();
m_inputHandlerOnImplThread.reset();
m_layerTreeHostImpl.reset();
m_schedulerOnImplThread.reset();
@@ -961,9 +949,7 @@ void ThreadProxy::recreateContextOnImplThread(CompletionEvent* completion, scope
{
TRACE_EVENT0("cc", "ThreadProxy::recreateContextOnImplThread");
DCHECK(isImplThread());
- ResourceProvider::debugNotifyEnterZone(0x7000000);
m_layerTreeHost->deleteContentsTexturesOnImplThread(m_layerTreeHostImpl->resourceProvider());
- ResourceProvider::debugNotifyLeaveZone();
*recreateSucceeded = m_layerTreeHostImpl->initializeRenderer(context.Pass());
if (*recreateSucceeded) {
*capabilities = m_layerTreeHostImpl->rendererCapabilities();