This section describes the XML tags used to export session data from Thread Validator.
An exported XML file starts with a few details about Thread Validator and the target program:
<XML>
<VALIDATORINFO>Thread Validator information online</VALIDATORINFO>
<VALIDATOR>Thread Validator name</VALIDATOR>
<VALIDATORVERSION>Version</VALIDATORVERSION>
<VALIDATORDATE>Build date</VALIDATORDATE>
<VALIDATORTIME>Build time</VALIDATORTIME>
<TITLE>Target program name</TITLE>
<EXITCODE>Program exit status code and description - if collected</EXITCODE>
Thread and lock information is listing the following tag pairs:
<LOCK_DATA>...</LOCK_DATA>
Example lock data might be as follows:
<LOCK>
<CRITICAL_SECTION>0x0b22194c</CRITICAL_SECTION>
<ENTERED>388</ENTERED>
<RECURSE>0</RECURSE>
<CONTENDED>0</CONTENDED>
<CONTENDRATIO>0.00%</CONTENDRATIO>
<SEQUENCE>7,746,320</SEQUENCE>
<THREAD>9632</THREAD>
<STATUS>StateWait(DelayExecution)</STATUS>
<CALLSTACK>
<ENTRY>0x620c4667 mfc90ud.dll CCriticalSection::Lock : [f:\dd\vctools\vc7libs\ship\atlmfc\include\afxmt.inl Line 80]</ENTRY>
<ENTRY>0x00405551 nativeExample.exe CTeststakView::threadProc1 : [c:\program files (x86)\software verification\c++ thread validator\examples\nativeExample\testsvw.cpp Line 688]</ENTRY>
<ENTRY>0x1004bb09 svlthreadvalidatorstub.dll svl_setIgnoreGetProcAddress</ENTRY>
<ENTRY>0x757c38ef KERNEL32.DLL BaseThreadInitThunk</ENTRY>
<ENTRY>0x77275dde ntdll.dll RtlUnicodeStringToInteger</ENTRY>
<ENTRY>0x77275dde ntdll.dll RtlUnicodeStringToInteger</ENTRY>
</CALLSTACK>
<LOCATION>0x620c466c : f:\dd\vctools\vc7libs\ship\atlmfc\include\afxmt.inl Line 81</LOCATION>
</LOCK>
Lock data may contain the following:
•<OBJECT>Handle of waited object</OBJECT>
•<TIMEOUT>Infinite</TIMEOUT>
•<TIMEOUT>Timeout in milliseconds</TIMEOUT>
•<WAITING>Number of waiting processor cycles</WAITING>
•<THREAD>Thread id</THREAD>
•<STATUS>Thread status</STATUS>
•<LOCATION>Source code line where object was allocated, locked or waiting</LOCATION>
•<CALLSTACK>List of <ENTRY></ENTRY> tag pairs</CALLSTACK>
•<ENTRY>Callstack entry</ENTRY>
•<NUM_HANDLES>Number of handles waited for a multiple wait</NUM_HANDLES>
•<OBJECTS>List of <OBJ></OBJ> tag pairs</OBJECTS>
•<OBJ>Object handle</OBJ>
•<CRITICAL_SECTION>Critical section address</CRITICAL_SECTION>
•<ENTERED>Entered count</ENTERED>
•<RECURSE>Recursion count</RECURSE>
•<CONTENDED>Contended count</CONTENDED>
•<CONTENDRATIO>Contention ratio (contention vs entered)</CONTENDRATIO>
•<THREAD_WAITING>Number of waiting threads</THREAD_WAITING>
Not all of these tags will appear for a given data item in a session. Some of them only appear when certain data items are monitored using Thread Validator.
Depending on how you use Thread Validator you may in fact never see some of these tags.
All hexadecimal numbers will have leading zeros, e.g. 0x620c4667.
Allocated/entered, deallocated/exited objects are listed in one of two containers
<ALLOCATED>...</ALLOCATED>
<FREE>...</FREE>
The next level of tags are shown in optional <EVENT> tags.
<EVENT>...</EVENT>
Here's an example for a detailed report. The non-detailed report excludes thread and timestamp entries:
<EVENT>
<ID>82</ID>
<THREAD>7068</THREAD>
<TIME>18508531</TIME>
<File>c:\program files (x86)\software verification\c++ thread validator\examples\nativeexample\examples\testsvw.cpp</File>
<Line>226</Line>
<Synchronization>CriticalSection</Synchronization>
<STACKTRACE>
<SYMBOL>0x00402d1d nativeExample.exe CTeststakView::CTeststakView : [c:\program files (x86)\software verification\c++ thread validator\examples\nativeExample\testsvw.cpp Line 226]</SYMBOL>
<SYMBOL>0x004025a7 nativeExample.exe CTeststakView::CreateObject : [c:\program files (x86)\software verification\c++ thread validator\examples\nativeExample\testsvw.cpp Line 53]</SYMBOL>
<SYMBOL>0x6242b6a7 mfc90ud.dll CRuntimeClass::CreateObject : [f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\objcore.cpp Line 142]</SYMBOL>
<SYMBOL>0x620d3ece mfc90ud.dll CFrameWnd::CreateView : [f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\winfrm.cpp Line 627]</SYMBOL>
<SYMBOL>0x620d4003 mfc90ud.dll CFrameWnd::OnCreateClient : [f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\winfrm.cpp Line 659]</SYMBOL>
<SYMBOL>0x620d40c4 mfc90ud.dll CFrameWnd::OnCreateHelper : [f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\winfrm.cpp Line 678]</SYMBOL>
<SYMBOL>0x620d4073 mfc90ud.dll CFrameWnd::OnCreate : [f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\winfrm.cpp Line 669]</SYMBOL>
<SYMBOL>0x620c9337 mfc90ud.dll CWnd::OnWndMsg : [f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\wincore.cpp Line 2014]</SYMBOL>
</STACKTRACE>
</EVENT>
For allocated handles rather than synchronization objects you may see handle information instead
<Handle>0x6FCB0000</Handle>
<HandleType>Notification</HandleType>
Event data may have the following, in addition to the <STACKTRACE> tags in the next section:
•<ID>the sequence number of the event in the recorded history of all events <ID>
•<File>the source file location of the allocation event <File>
•<Line>the source line number in the file <Line>
•<Type>a string indicating the datatype of the allocated object, if known <Type>
•<Handle>the value of the allocated handle <Handle>
•<HandleType>the type of handle allocated, if known <HandleType>
•<Synchronization>the type of synchronization object <Synchronization>
•<THREAD>the id of the thread in which the allocation was made (shown as a decimal value) <THREAD>
•<TIME>the timestamp of the allocation <TIME>
This is a relative 'ticker' time rather than an absolute time, and is not measured in hours/mins/secs.
•<ReportType>type of trace message <ReportType>
•<Message>a message from a TRACE() macro or OutputDebugString() <Message>
Not all of these event tags will appear for a given allocation in a session. Some of them only appear when certain data items are monitored using Thread Validator.
As with the lock data you may never see some of these tags, depending on how you use Thread Validator .
Any hexadecimal numbers will have a leading 0x....
The stacktrace for the event is defined in the tags
<STACKTRACE>...</STACKTRACE>
In the stacktrace are a number of symbols
<SYMBOL>symbol data</SYMBOL>
The symbol data includes:
•hexadecimal address
•dll/exe name terminated by a semi-colon
•function name
•filename and line number in square brackets, if known
Example (from the XML fragment above):
<SYMBOL>0x00402d1d nativeExample.exe CTeststakView::CTeststakView : [c:\program files (x86)\software verification\c++ thread validator\examples\nativeExample\testsvw.cpp Line 226]</SYMBOL>
The presence of any of the following tags indicate an error condition:
•<DEADLOCKED/>
•<POTENTIAL_DEADLOCK/>
•<EXIT_OUT_OF_ORDER/>
•<NOT_ENTERED/>
•<MISC_ERROR/>