QtxAcqHistTracker: Implement complete algo; add depend graph
The dependency graph class enables us to perform analysis on the qutex acquisition history data. By generating the graph and detecting cycles in it, we can find true gridlocks. We use this graph analysis code to implement the algorithmically complete version of the gridlock detector.
This commit is contained in:
@@ -13,6 +13,7 @@ namespace smo {
|
||||
// Forward declarations
|
||||
class Qutex;
|
||||
class AsynchronousContinuationChainLink;
|
||||
class DependencyGraph;
|
||||
|
||||
/**
|
||||
* @brief QutexAcquisitionHistoryTracker - Tracks acquisition history for
|
||||
@@ -125,6 +126,16 @@ public:
|
||||
bool completelyTraceContinuationHistoryForGridlockOn(
|
||||
Qutex &firstFailedQutex);
|
||||
|
||||
/**
|
||||
* @brief Generates a dependency graph among known continuations, based on
|
||||
* the currently known acquisition history. There may well be a cyclical
|
||||
* dependency which hasn't been reported to the history tracker yet.
|
||||
* @param dontAcquireLock If true, skips acquiring the internal spinlock
|
||||
* (assumes caller already holds it)
|
||||
*/
|
||||
[[nodiscard]] std::unique_ptr<DependencyGraph>&& generateGraph(
|
||||
bool dontAcquireLock = false);
|
||||
|
||||
// Disable copy constructor and assignment operator
|
||||
QutexAcquisitionHistoryTracker(
|
||||
const QutexAcquisitionHistoryTracker&) = delete;
|
||||
|
||||
Reference in New Issue
Block a user