ek9_query_lock_analysis

Answers first: status, then deadlockCount, lockIdentityCount, enterSiteCount, keyBodyCount, crossThreadEdgeCount and nextStep (the one drill-down worth calling); lockIdentityCount 0 = no MutexLock anywhere, deadlock structurally impossible.

Category: Enquiry · Compare: Lock Catalogue / Deadlock Detective

When to use it

'Does this workspace have any lock or deadlock risk at all' is one call with no arguments - the headline counts before any lock drill-down.

When not to use it

Details

Zero parameters; whole-workspace only, no module scoping. status is 'ok' (analysis ran, counts live) or 'not-compiled' (no compiled program, or compilation failed before PRE_IR_CHECKS produced a LockAnalysis — nextStep ek9_compile). nextStep on 'ok': deadlockCount>0 -> ek9_query_deadlock_chain, lockIdentityCount>0 -> ek9_query_lock_identity, otherwise none — lockIdentityCount==0 means no MutexLock use anywhere, so structural deadlock is impossible.

Arguments

None of its own.

Recorded calls

Real calls, recorded against small projects and checked on every build - a changed answer fails it.

No compiled program

Request

{ }

Response

{
  "meta" : {
    "serverMs" : "<timing>"
  },
  "nextStep" : "ek9_compile",
  "note" : "No compiled program is available - nothing can be queried until the workspace compiles.",
  "status" : "not-compiled"
}

Populated workspace

Request

{ }

Response

{
  "crossThreadEdgeCount" : 0,
  "deadlockCount" : 0,
  "enterSiteCount" : 1,
  "functionSummaryCount" : 3,
  "keyBodyCount" : 1,
  "lockIdentityCount" : 1,
  "meta" : {
    "serverMs" : "<timing>"
  },
  "nextStep" : "ek9_query_lock_identity",
  "status" : "ok"
}

No locks workspace

Request

{ }

Response

{
  "crossThreadEdgeCount" : 0,
  "deadlockCount" : 0,
  "enterSiteCount" : 0,
  "functionSummaryCount" : 2,
  "keyBodyCount" : 0,
  "lockIdentityCount" : 0,
  "meta" : {
    "serverMs" : "<timing>"
  },
  "nextStep" : "none - no MutexLock use anywhere, structural deadlock is impossible",
  "status" : "ok"
}