Jump to content

DevHlp PerfSysTrace: Difference between revisions

From EDM2
Created page with "DevHlp_PerfSysTrace writes software trace information to the STRACE buffer. ==Syntax== ===C=== <PRE> DevHelp_PerfSysTrace (USHORT Major, USHORT Minor,USHORT TraceSize, PBYTE..."
 
Ak120 (talk | contribs)
mNo edit summary
Line 1: Line 1:
{{DISPLAYTITLE:DevHlp_PerfSysTrace}}
DevHlp_PerfSysTrace writes software trace information to the STRACE buffer.  
DevHlp_PerfSysTrace writes software trace information to the STRACE buffer.  


==Syntax==
==Syntax==
===C===
DevHelp_PerfSysTrace (Major, Minor, TraceSize, TraceData)
<PRE>
DevHelp_PerfSysTrace (USHORT Major, USHORT Minor,USHORT TraceSize, PBYTE TraceData)  
</PRE>


===Assembler===
Calling Sequence in Assembler
<PRE>
    MOV  AX, MajorCode
    MOV  BX, TraceSize
    MOV  CX, MinorCode
    LDS  SI, TraceData
    MOV  DL, DevHlp_PerfSysTrace
    CALL  DevHlp
    JC    Error
</PRE>
==Parameters==
==Parameters==
===C===
;Major ([[USHORT]]):
; Major
;Minor (USHORT):
 
;TraceSize (USHORT):
; Minor
;TraceData (PBYTE):
 
; TraceSize
 
; TraceData
 
===Assembler===
    MOV  AX, MajorCode
    MOV  BX, TraceSize
    MOV  CX, MinorCode
    LDS  SI, TraceData


==Return Code==
==Return Code==
===C===
<PRE>
</PRE>
===Assembler===
* AX = return code.
* AX = return code.
Possible values
Possible values
Line 60: Line 31:


===Assembler===
===Assembler===
Calling Sequence in Assembler
<PRE>
<PRE>
     MOV  AX, MajorCode
     MOV  AX, MajorCode
Line 69: Line 41:
     JC    Error
     JC    Error
</PRE>
</PRE>
==Related Functions==


[[Category:DevHlps]]
[[Category:DevHlps]]

Revision as of 14:40, 4 August 2017

DevHlp_PerfSysTrace writes software trace information to the STRACE buffer.

Syntax

DevHelp_PerfSysTrace (Major, Minor, TraceSize, TraceData)

Parameters

Major (USHORT)
Minor (USHORT)
TraceSize (USHORT)
TraceData (PBYTE)

Return Code

  • AX = return code.

Possible values

0 NO_ERROR
Data written to trace buffer.
32902 ERROR_NOMEMORY
Trace buffer has not been allocated.

Remarks

A trace buffer must be allocated, wia the STRACE INIT command, before attempting to write trace data.

Tracing stops once the trace buffer fills up. No error indication is returned. Subsequent calls to DevHelp_PerfSysTrace return immediately without writing any data.

Example Code

C

#include "dhcalls.h"

USHORT APIENTRY DevHelp_PerfSysTrace (USHORT Major, USHORT Minor,USHORT TraceSize, PBYTE TraceData) 

Assembler

Calling Sequence in Assembler

    MOV   AX, MajorCode
    MOV   BX, TraceSize
    MOV   CX, MinorCode
    LDS   SI, TraceData
    MOV   DL, DevHlp_PerfSysTrace
    CALL  DevHlp
    JC    Error