Jump to content

DevHlp PerfSysTrace

From EDM2
Revision as of 23:38, 7 June 2017 by Martini (talk | contribs) (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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

DevHlp_PerfSysTrace writes software trace information to the STRACE buffer.

Syntax

C

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

Parameters

C

Major
Minor
TraceSize
TraceData

Assembler

   MOV   AX, MajorCode
   MOV   BX, TraceSize
   MOV   CX, MinorCode
   LDS   SI, TraceData

Return Code

C


Assembler

  • 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

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

Related Functions