Tracing Drivers on ArcaOS: Difference between revisions
mNo edit summary |
|||
(5 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
{{Article | |||
|Author=[[User:Martini|Martin Iturbide]] | |||
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. | |Date=2021-01 | ||
|OS=ArcaOS 5.0.x | |||
|File=N/A | |||
|Source=N/A | |||
}} | |||
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. | 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== | ==Before Starting== | ||
Netlabs' USB Drivers supports tracing, that means he coded the drivers with this "tracing support" to enable logs. | |||
This seems to work by assigning "major code numbers" to each driver, so you can "name it" to request the trace. | 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" assigned by the developer to the USB drivers: | ||
* USBUHCD.SYS: 224 | * USBUHCD.SYS: 224 | ||
* USBOHCD.SYS: 225 | * USBOHCD.SYS: 225 | ||
Line 20: | Line 25: | ||
==Enabling Trace== | ==Enabling Trace== | ||
Add this on the config.sys: | Add this on the config.sys: | ||
TRACEBUF=2048 /M=W,Q,NODTI /D=ALL | |||
Now reboot. | Now reboot. | ||
Open a command line session and set the following, if you want to trace the "239" driver. | Open a command line session and set the following, if you want to trace the "239" driver. | ||
TRACE ON 239 | TRACE ON 239 | ||
For several drivers you do something like: | For several drivers you do something like: | ||
TRACE ON 224,225,226 | TRACE ON 224,225,226 | ||
==Reproducing the Error== | ==Reproducing the Error== | ||
At this moment you have your system with the tracing enabled for | At this moment you have your system with the tracing enabled for a 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. | Now it is the moment try again the audio card or USB device that does something strange. | ||
Line 43: | Line 47: | ||
It not that we can understand much, but this will help the developer to find out something that is not working as it should. | 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 | Now save the trace file as .ftf file, Lars preferred the "FORMATTED trace" to review the file, but it may also depend on what the developer tells you. | ||
Once you take your trace you can execute a: | Once you take your trace you can execute a: | ||
TRACE OFF | TRACE OFF | ||
You can erase the trace log with: | You can erase the trace log with: | ||
TRACE /C | TRACE /C | ||
Line 56: | Line 59: | ||
==Links== | ==Links== | ||
* [[OS/2 System Trace Formater]] | * [[OS/2 System Trace Formater]] | ||
* [[ | * [[Netlabs' USB Drivers]] | ||
* [http://www.warpcave.com/os2diags/TraceRef.txt Trace Reference] | * [http://www.warpcave.com/os2diags/TraceRef.txt Trace Reference] | ||
[[Category:How To]] |
Latest revision as of 03:30, 1 March 2025
Article Info | |
---|---|
Author | Martin Iturbide |
Date | 2021-01 |
OS Version | ArcaOS 5.0.x |
Companion File | N/A |
Source | N/A |
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
Netlabs' USB Drivers supports tracing, that means he coded the drivers with this "tracing support" to enable logs.
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" assigned by the developer to the USB 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 this on the config.sys:
TRACEBUF=2048 /M=W,Q,NODTI /D=ALL
Now reboot.
Open a command line session and set the following, if you want to trace the "239" driver.
TRACE ON 239
For several drivers you do something like:
TRACE ON 224,225,226
Reproducing the Error
At this moment you have your system with the tracing enabled for a 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.
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 preferred the "FORMATTED trace" to review the file, but it may also depend on what the developer tells you.
Once you take your trace you can execute a:
TRACE OFF
You can erase the trace log with:
TRACE /C
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.