Blame doxygen-1.7.1-dot-crash.patch
|
Than Ngo |
633de6 |
--- a/src/dot.cpp
|
|
Than Ngo |
633de6 |
+++ b/src/dot.cpp
|
|
Than Ngo |
633de6 |
@@ -734,6 +734,8 @@
|
|
Than Ngo |
633de6 |
|
|
Than Ngo |
633de6 |
//--------------------------------------------------------------------
|
|
Than Ngo |
633de6 |
|
|
Than Ngo |
633de6 |
+#define DIRECT_DOT_RUN 1
|
|
Than Ngo |
633de6 |
+
|
|
Than Ngo |
633de6 |
DotManager *DotManager::m_theInstance = 0;
|
|
Than Ngo |
633de6 |
|
|
Than Ngo |
633de6 |
DotManager *DotManager::instance()
|
|
Than Ngo |
633de6 |
@@ -750,6 +752,7 @@
|
|
Than Ngo |
633de6 |
m_dotRuns.setAutoDelete(TRUE);
|
|
Than Ngo |
633de6 |
m_dotMaps.setAutoDelete(TRUE);
|
|
Than Ngo |
633de6 |
m_queue = new DotRunnerQueue;
|
|
Than Ngo |
633de6 |
+#ifndef DIRECT_DOT_RUN
|
|
Than Ngo |
633de6 |
int i;
|
|
Than Ngo |
633de6 |
int numThreads = QMIN(32,Config_getInt("DOT_NUM_THREADS"));
|
|
Than Ngo |
633de6 |
if (numThreads==0) numThreads = QMAX(1,QThread::idealThreadCount()+1);
|
|
Than Ngo |
633de6 |
@@ -767,6 +770,7 @@
|
|
Than Ngo |
633de6 |
}
|
|
Than Ngo |
633de6 |
}
|
|
Than Ngo |
633de6 |
ASSERT(m_workers.count()>0);
|
|
Than Ngo |
633de6 |
+#endif
|
|
Than Ngo |
633de6 |
}
|
|
Than Ngo |
633de6 |
|
|
Than Ngo |
633de6 |
DotManager::~DotManager()
|
|
Than Ngo |
633de6 |
@@ -834,11 +838,17 @@
|
|
Than Ngo |
633de6 |
portable_sysTimerStart();
|
|
Than Ngo |
633de6 |
// fill work queue with dot operations
|
|
Than Ngo |
633de6 |
DotRunner *dr;
|
|
Than Ngo |
633de6 |
+ int prev=1;
|
|
Than Ngo |
633de6 |
for (li.toFirst();(dr=li.current());++li)
|
|
Than Ngo |
633de6 |
{
|
|
Than Ngo |
633de6 |
+#ifdef DIRECT_DOT_RUN
|
|
Than Ngo |
633de6 |
+ msg("Running dot for graph %d/%d\n",prev,numDotRuns);
|
|
Than Ngo |
633de6 |
+ if(!dr->run()) return FALSE;
|
|
Than Ngo |
633de6 |
+ prev++;
|
|
Than Ngo |
633de6 |
+ };
|
|
Than Ngo |
633de6 |
+#else
|
|
Than Ngo |
633de6 |
m_queue->enqueue(dr);
|
|
Than Ngo |
633de6 |
}
|
|
Than Ngo |
633de6 |
- int prev=1;
|
|
Than Ngo |
633de6 |
// wait for the queue to become empty
|
|
Than Ngo |
633de6 |
while ((i=m_queue->count())>0)
|
|
Than Ngo |
633de6 |
{
|
|
Than Ngo |
633de6 |
@@ -865,6 +875,7 @@
|
|
Than Ngo |
633de6 |
{
|
|
Than Ngo |
633de6 |
m_workers.at(i)->wait();
|
|
Than Ngo |
633de6 |
}
|
|
Than Ngo |
633de6 |
+#endif
|
|
Than Ngo |
633de6 |
portable_sysTimerStop();
|
|
Than Ngo |
633de6 |
if (setPath)
|
|
Than Ngo |
633de6 |
{
|