Tracing Drivers on ArcaOS

From OS2World.Com Wiki
Revision as of 18:51, 18 January 2021 by Martini (talk | contribs) (Created page with "By User:Martini Everyday you learn something new, right? One of the things that I never did on OS/2 Warp was to generate trace logs on device drivers to help developers t...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

By User:Martini

Everyday you learn something new, right? One of the things that I never did on OS/2 Warp was to generate trace logs on device drivers to help developers to see what can it be going wrong with it. I never did this until now that I have collaborated with Lars Erdmann with the USBAudio driver and wanted to see some trace log.

Right now I'm using ArcaOS 5.0.6 and I never did driver tracing before, so Lars point me to his USB driver readme to learn more about the trace procedure.

Before Starting

Lars USB Driver support tracing, that means he coded the drivers with this "tracing support".

This seems to work by assigning "major code numbers" to each driver, so you can "name it" to request the trace. Here it is the list of "major codes" asigned by Lars to his drivers

  • USBUHCD.SYS: 224
  • USBOHCD.SYS: 225
  • USBEHCD.SYS: 226
  • USBD.SYS: 227
  • USBHID.SYS,USBKBD.SYS,USBMOUSE.SYS: 228 (minor codes: HID:0x00-0x3F, USBMOUSE: 0x40-0x7F, USBKBD: 0x80-0xFF)
  • USBCOM.SYS: 229
  • USBAUDIO.SYS,USBAUD2.SYS: 238 (minor codes: USBAUDIO: 0x00-0x7F, USBAUD2: 0x80-0xFF)
  • USBMSD.ADD: 239

Enabling Trace

Add the following on the config.sys if you want to trace the "239" driver.

TRACEBUF=2048 /M=W,Q,NODTI /D=ALL
TRACE=ON 239

For several drivers you do something like:

TRACEBUF=2048 /M=W,Q,NODTI /D=ALL
TRACE=ON 224,225,226

Now reboot.

Reproducing the Error

At this moment you have your system with the tracing enabled for an specific driver. Now you have to reproduce the error that you have by using the driver and see later what the tracing tool tells you.

Now it is the moment try again the audio card or USB device that does something strange.

The Trace Tool

Now it is the time to see the tracing tool and see what it told us.

Run "tracefmt.exe" which is the executable for the "OS/2 System Trace Formater" and you can see the log there.

File:Na.PNG

It not that we can understand much, but this will help the developer to find out something that is not working as it should.

Now save the trace file as .ftf file, Lars prefer the "FORMATTED trace" to review the file, but it may also depend on what the developer tells you.

Conclusions

Remember that the developer may ask you to generate different trace files with different drivers versions and doing different things on the system, this process may require patience.