@@ -98,33 +98,35 @@ def generateCSVRows(db: Db, arch: Arch, options: dict[str, str | bool], lines: l
9898 # Make rows for each object
9999 for obj in objects :
100100
101- # See how many tasks it is from
102- fromTasks : set [Ent ] = set ()
103- fromTasksFiltered : set [Ent ] = set ()
101+ # Match the graph's lockset-based classification (computed in
102+ # buildEdgeInfo via classify_shared_objects). Shared = reached from
103+ # multiple task roots without a consistent lock. Protected = reached
104+ # from multiple task roots with a consistent lock. Single-task
105+ # objects are neither.
104106 edgeKeys = incoming [obj ] if obj in incoming else set ()
107+ fromTasksFiltered : set [Ent ] = set ()
108+ isShared = False
105109 for edgeKey in edgeKeys :
106110 info = edgeInfo [edgeKey ]
107- if not info ['filtered' ] and refStr ( info [ 'ref' ]) not in interruptDisabledRefs :
111+ if not info ['filtered' ]:
108112 fromTasksFiltered .update (info ['from' ])
109- fromTasks .update (info ['from' ])
110- shared = len (fromTasks ) > 1
111- if options [OBJECTS ] == 'shared only' and not shared :
113+ if info ['shared' ]:
114+ isShared = True
115+
116+ if options [OBJECTS ] == 'shared only' and not isShared :
112117 continue
113118
114119 # Info for each column for all rows of the object
115120 objectName = getLongName (obj , options )
116- shared = 'x' if len (fromTasksFiltered ) > 1 else '-'
121+ shared = 'x' if isShared else '-'
122+ protected = 'x' if (len (fromTasksFiltered ) > 1 and not isShared ) else '-'
117123
118124 # Make rows for each incoming edge to the object
119125 for edgeKey in edgeKeysForObjects [obj ]:
120126 edgeObj = edgeInfo [edgeKey ]
121127
122128 # Info for each column for all rows of the edge
123129 function = edgeObj ['scope' ]
124- if str (FnAndObj (function , edgeObj ['ent' ])) in interruptDisabledRefs :
125- protected = 'x'
126- else :
127- protected = '-'
128130 functionName = getLongName (edgeObj ['scope' ], options )
129131 reference = []
130132 for kindname in edgeObj ['kindnames' ]:
0 commit comments