System and method for optimizing a device driver by incorporating debugging and tracing
First Claim
1. A method for executing a software component in a computer system, wherein said software component is used by one or more applications running on the computer system, and wherein said method comprises:
- providing a first and second version of said software component, wherein said first version of the software component is optimised and said second version contains debug code for providing trace information; and
selectively switching between- the first and second versions of said software component, said switching being transparent to any applications already using the software component.
1 Assignment
0 Petitions
Accused Products
Abstract
The invention relates to a method for executing, in a computer system 5, a device driver 10 which is used by a number of applications running on that system. A first 12 and second version 11 of the device driver are provided, with the first version being optimised and the second version containing debug code for providing trace information. Upon discovering a problem with the device driver, it is possible to selectively switch to the debug version of the code without any of the applications already using the device driver being aware of the switch. Having gathered the necessary trace data, it is then possible to transparently switch back to the optimised version. Conventionally, device drivers form part of the operating system within a computer and so are difficult to remove and re-load without taking the whole system down and re-booting. The invention however affords continuous service to any application already using the device driver and does not require a time-wasting reboot which may in any event remove the error condition.
-
Citations
39 Claims
-
1. A method for executing a software component in a computer system, wherein said software component is used by one or more applications running on the computer system, and wherein said method comprises:
-
providing a first and second version of said software component, wherein said first version of the software component is optimised and said second version contains debug code for providing trace information; and
selectively switching between- the first and second versions of said software component, said switching being transparent to any applications already using the software component. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10)
selecting a sub-set of functions from within the version containing debug code; and
selecting the remaining functions from the other version.
-
-
10. The method of claim 9, wherein said sub-set selection occurs in response to a system call, said system call setting a plurality of boolean flags, wherein the value of said plurality of flags determines which functions within the debug version are executed.
-
11. A method for constructing a software component, comprising the steps of:
-
creating source code;
preprocessing said source code to produce two versions of said code, wherein said second version differs from said first version in that said second version contains debug code for providing trace information;
combining said first and second versions to construct the software component. - View Dependent Claims (12, 13, 14, 15, 16, 17, 18, 19)
compiling said first and second versions separately to produce two object modules; and
linking both object modules with a third object module to produce said executable software component.
-
-
18. The method of claim 17 wherein said third object module includes control information, having a boolean flag used to determine which version of said software component is executed.
-
19. The method of claim 18 wherein said boolean flag has a default value, said default value providing the first software version for initial execution.
-
20. A software component for use in a computer system, wherein said software component is used by applications running on the computer system, and wherein said software component comprises:
-
a first and a second version, wherein said first version of the software component is optimised and said second version contains debug code for providing trace information, and means for selectively switching between the first and second versions of said software component, said switching being transparent to the applications already using the software component. - View Dependent Claims (21, 22, 23, 24, 25, 26, 27, 28, 29)
selecting a sub-set of functions from within the version containing debug code; and
selecting the remaining functions from the other version.
-
-
29. The software component of claim 28, wherein said sub-set selection occurs in response to a system call, said system call setting a plurality of boolean flags, wherein the value of said plurality of flags determines which functions within the debug version are executed.
-
30. A computer system for executing a software component, wherein said software component is used by applications running on the computer system, and wherein said computer system comprises:
-
means for providing a first and second version of said software component, wherein said first version of the software component is optimised and said second version contains debug code for providing trace information, and wherein said computer system further comprises;
means for selectively switching between the first and second versions of said software component, said switching being transparent to those applications already using the software component. - View Dependent Claims (31, 32, 33, 34, 35, 36, 37, 38, 39)
selecting a sub-set of functions from within the version containing debug code; and
selecting the remaining functions from the other version.
-
-
39. The computer system of claim 38, wherein said sub-set selection occurs in response to a system call, said system call setting a plurality of boolean flags, wherein the value of said plurality of flags determines which functions within the debug version are executed.
Specification