CN100472469C - Operation logbook obtaining method - Google Patents

Operation logbook obtaining method Download PDF

Info

Publication number
CN100472469C
CN100472469C CNB2005100082727A CN200510008272A CN100472469C CN 100472469 C CN100472469 C CN 100472469C CN B2005100082727 A CNB2005100082727 A CN B2005100082727A CN 200510008272 A CN200510008272 A CN 200510008272A CN 100472469 C CN100472469 C CN 100472469C
Authority
CN
China
Prior art keywords
function
predetermined
running log
log
acquiring operation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CNB2005100082727A
Other languages
Chinese (zh)
Other versions
CN1818885A (en
Inventor
唐宪伟
韩劲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to CNB2005100082727A priority Critical patent/CN100472469C/en
Priority to JP2006024741A priority patent/JP4280749B2/en
Publication of CN1818885A publication Critical patent/CN1818885A/en
Application granted granted Critical
Publication of CN100472469C publication Critical patent/CN100472469C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention offer a way increasing operation log to capture method capability by exporting data member of the specie or structure style inside the predetermined hierarchy. In the function parameter procedure having species or structure style data and in the software estimating system, the invention includes a approach which changes the loaded function address using for executing the predetermined hierarchy into the address for capture the operation log function. In the process function definiens, the function will confirm that whether a structure parameter has been designated as a structure pointer pointing at a structure. And if it is true, the function will confirm that whether the predetermined hierarchy of the data member has been designed and the structure data member has been designated as a structure pointer pointing at another structure. At least after the hierarchy has been predetermined, it will compare the structure hierarchy having been transferred with the predetermined hierarchy.

Description

Method for acquiring operation log
Technical field
The present invention relates to a kind of method that can easily obtain the running log of the software that is split up into a plurality of modules.
Background technology
Always, for the low software fault of fidelity factor, be to investigate thoroughly the reason of fault and then solve by the processing running log (LOG) that obtains and analyze this software.
Yet, in the problem of obtaining below existing aspect the above-mentioned existing processing running log.
(1) in order to obtain running log, must be adjusted to increase the module of software and be handled the routine that running log obtains.Correspondingly, this will add the homework burden of greatly obtaining the processing running log.
(2) because obtaining of running log of processing is to carry out at each module, the running log of generation is unit with the module.Be difficult to obtain the running log that whole software is handled like this according to time sequencing.Therefore, owing to can not predict fully, need a large amount of manpowers to analyze running log so that find failure cause to the entire process running log.
For addressing the above problem, Japanese Patent Application No.2002-191127,2002-191128,2002-191129,2002-191130 and 2003-099465 provide a kind of method that can easily obtain the running log of the software that is split up into a plurality of modules respectively, are used to reduce the required manpower of analysis software failure cause.
Above-mentioned each method all is to obtain the processing running log of all function/methods that are called EXE basically, therefore may need a large amount of processing running logs equally.Although Japanese Patent Application No.2003-099465 provides a following embodiment (the second embodiment part 1-3), the target of obtaining of processing running log that wherein will be called function/method of EXE is limited under the interface of operating system and some specific exception modules by specify " interface of operating system " and " the exception module under the interface " in the API trace routine, obtains the processing running log.But this method still needs a large amount of processing running logs.
Summary of the invention
The present invention has considered the problems referred to above, and it is a kind of by optionally obtaining the processing running log of software that its purpose is to provide, and easily obtains the method for the running log of the software that is split up into a plurality of modules.The present invention can reduce the required processing quantity of analysis software fault.The present invention also is provided for the program and the storage medium of depositing this program with this method of computer realization.
For achieving the above object, the invention provides a kind of method for acquiring operation log, be used to obtain the running log of the program of the function that comprises that at least one carries out predetermined process, the address that comprises the function of the described execution predetermined process that is used to carry out above-mentioned predetermined process and is loaded changes the step of the address of the function that is used to obtain running log into
The wherein said function that is used to obtain running log is configured to carry out following steps:
Determine whether structural parameters are designated as the structured fingers of pointing to a structure in the function definition of described program; With
If described structural parameters are designated as structured fingers, determine in described function definition, whether to have set the predetermined hierarchy of data member, and determine whether the data member of this structure is the pointer that points to another structure; And
At least after in determining described function definition, having set the predetermined hierarchy of data member, the level of more described invoked structure and described predetermined hierarchy.
Preferably, the described function that is used to obtain running log also is configured to carry out following steps: at least after definite described structural parameters are designated as structured fingers, write down this pointer memory content pointed, this memory content will become a part of running log with the structurally associated that defines in the function definition of described program.
Preferably, the described function that is used to obtain running log also is configured to carry out following steps: if the data member of described structure is to point to the level of the pointer of another structure and described invoked structure less than described predetermined hierarchy equally, also write down the pointer memory content pointed of the data member of described structure, this memory content will become another part running log with described another structurally associated that defines in the function definition of described program.Therefore can repeatedly carry out above-mentioned processing, unless the data member of described structure is not to point to the pointer that is in another structure in next level or described invoked level more than or equal to described predetermined hierarchy.
Preferably, the described function that is used to obtain running log also is configured to carry out: call the function of described execution predetermined process, the step that makes this function carry out described predetermined process and received execution result is sent to this program; The step of the predetermined information when being recorded in the function that calls described execution predetermined process; And the step that is recorded in the predetermined information when receiving described execution result.
Predetermined information when calling the function of described execution predetermined process comprises at least one of following information: the parameter in the function name of institute's call function, the time when calling, when calling and the memory content that described structural parameters point to when calling.Predetermined information when receiving described execution result comprises at least one of following information: the memory content that described structural parameters point to when rreturn value the when time during reception, the parameter when receiving, reception and reception.In addition, in the input function address table of the dynamic link library of the function that described execution predetermined process is provided, recorded and narrated the address of the function of described execution predetermined process.
In addition, if do not set the predetermined hierarchy of described data member, then described when calling the function of carrying out predetermined process predetermined information and the predetermined information when receiving described execution result can not comprise the memory content that structured fingers is specified, therefore do not have and be output by the memory content of described pointer structure pointed.
The present invention can utilize the predetermined hierarchy of the data member of setting in program to control the level that above-mentioned running log obtains processing, according to the present invention, can be easily and optionally obtain the method for the running log of the software that is split up into a plurality of modules, can reduce the analysis software error reason and carry out the required processing quantity of software maintenance.
Described method of the present invention not only can be used for following the tracks of java application, and can be used for following the tracks of by other program, for example the application program of exploitations such as C, C++, PASCAL.
Other characteristics of the present invention and advantage can be understood from the description of drawings below the reference, and same or similar parts are represented with identical label in the accompanying drawing.
Description of drawings
The accompanying drawing that comprises in this manual and constitute an one ingredient has exemplified each embodiment of the present invention, and is used from explanation principle of the present invention with instructions one.
Fig. 1 is the block diagram of enforcement according to the configuration of the computing machine (software evaluation system) of the method for acquiring operation log of first embodiment of the invention.
Internal memory when Fig. 2 illustrates common function and loads constitutes.
Fig. 3 illustrates and utilizes IAT Patch enforcement to constitute according to the internal memory of the software evaluation system of the method for acquiring operation log of first embodiment of the invention.
Fig. 4 A utilizes the view of IAT Patch enforcement according to the state of the software evaluation system of the method for acquiring operation log of first embodiment of the invention.
Fig. 4 B illustrates processing is obtained in enforcement according to the running log of the software evaluation system of the method for acquiring operation log of first embodiment of the invention process flow diagram.
Fig. 5 illustrates to utilize the synoptic diagram of IAT Patch enforcement according to the inside setting of the software evaluation system of the method for acquiring operation log of first embodiment of the invention.
Common internal memory when Fig. 6 illustrates the example (instance) of the interface that generates com server constitutes.
Fig. 7 utilizes VTable Patch enforcement to constitute according to the internal memory of the software evaluation system of the method for acquiring operation log of first embodiment of the invention
Fig. 8 A utilizes the view of VTable Patch enforcement according to the state of the software evaluation system of the method for acquiring operation log of first embodiment of the invention.
Fig. 8 B illustrates processing is obtained in enforcement according to the running log of the software evaluation system of the method for acquiring operation log of first embodiment of the invention process flow diagram.
Fig. 9 illustrates to utilize the synoptic diagram of IAT Patch enforcement according to the inside setting of the software evaluation system of the method for acquiring operation log of first embodiment of the invention.
Figure 10 illustrates the example of indicating the function definition file of the parameter of each function and method and rreturn value form to software evaluation system.
Figure 11 illustrates the example of enforcement according to the running log that is obtained of the software evaluation system of the method for acquiring operation log of first embodiment of the invention.
Figure 12 illustrates the function definition file of enforcement according to the software evaluation system of the method for acquiring operation log of second embodiment of the invention.
Figure 13 obtains the process flow diagram of the processing of running log in software evaluation system when being illustrated in as shown in figure 12 defined function.
Figure 14 has exemplified to have structural parameters and is used to describe function according to the process flow diagram of Figure 13.
Figure 15 is illustrated in and does not use when being used to treat output data member's predetermined hierarchy, utilizes the running log data of obtaining in the software evaluation system that are defined in shown in Figure 12 according to the present invention.
Figure 16 is illustrated in when being used to treat output data member's predetermined hierarchy, utilizes the running log data of obtaining in the software evaluation system that are defined in shown in Figure 12 according to the present invention.
Embodiment
With reference to the accompanying drawings preferred implementation of the present invention is described in detail.
[first embodiment]
Present embodiment, when being the function in given module invokes is present in another module, utilize input function address or virtual function address table (Virtual Address Table) as using mechanism, being recorded in the running log by the function call between knock-down module and with it, with time sequencing the processing of whole software is obtained as handling running log, and need not the module of software itself is adjusted.Specify below.
<system configuration 〉
Fig. 1 is the block diagram of the configuration of the computing machine (software evaluation system) of the method for acquiring operation log of the enforcement preferred embodiment of the present invention.For the purpose of simplified illustration, this software evaluation system is the inside of constructing at a PC.Yet it is inner or all effective in the network system of being constructed by a plurality of PC that method for acquiring operation log of the present invention is constructed Yu Yitai PC.
Software evaluation system at the method for acquiring operation log of implementing this embodiment comprises: CPU1, chipset 2, RAM 3, hard disk controller 4, display controller 5, hard disk drive 6, CD-ROM drive 7 and display 8.In addition, this software evaluation system comprises and also comprises signal wire 11, the signal wire 12 that is connected chipset 2 and RAM 3, the peripheral bus 13 that is connected chipset 2 and various peripherals, the signal wire 14 that is connected hard disk controller 4 and hard disk drive 6 that connect CPU 1 and chipset 2, is connected the signal wire 15 of hard disk controller 4 and CD-ROM drive 7 and is connected display controller 5 and the signal wire 16 of display 8.
<relate to obtaining of running log that function handles 〉
For the software evaluation system of the method for acquiring operation log of implementing the first embodiment of the present invention is described, at first utilize Fig. 2, how the software that is divided into a plurality of modules is loaded in the internal memory under common state is illustrated.
Usually, be split up into the software of a plurality of modules, be split up into the execute file EXE (23) that carries out whole control and have and undertake the dynamic link library (DLL) (27) of the task of replenishing EXE, in internal memory, load EXE and DLL as module.EXE is made of code segment (28) and data segment (29), input function address table (22).In addition, the input function address table is separated (21,24) according to the DLL under the function, and records and narrates at the function load address (30~35) among each DLL.The example of DLL function loads respectively by each DLL (25,26), and each function is loaded (36~41) as the part of corresponding DLL.In Fig. 2, an EXE uses A.DLL and the interior function of two dynamic link libraries of B.DLL, and the promptly actual function that uses is six of Func AA, Func AB, Func AC, Func BA, Func BB, Func BC etc.
When the code call function F unc AA in the code segment of EXE, at first read the address (30) that writes on the Func AA in the input function address table (22).In fact the input function address table is recorded and narrated the address of the Func AA code (36) that loads as the part of A.DLL, and the code of EXE can be by calling the Func AA that A.DLL is called in this address.
Fig. 3 constitutes for the internal memory of enforcement according to the software evaluation system of the method for acquiring operation log of first embodiment of the invention, be that with the difference of Fig. 2 running log is obtained code adopts so-called IAT Patch (input function address table patch, Import Address TablePatch) scheme is redirected function call.
When the obtaining of the daily record that brings into operation, the C.DLL (58) that will be used for IAT Patch is loaded into internal memory as DLL.C.DLL (58) is rewritten as the address of the function that writes in the input function address table (52) as the running log in the C.DLL (58) and obtains FuncCAA, Func CAB, Func CAC, the Func CBA of code, the address (61~66) of Func CBB, Func CBC.The code (73~78) of Func CAA, Func CAB in the C.DLL (58), Func CAC, Func CBA, Func CBB, Func CBC, the record running log, and call and be loaded into Func AA, FuncAB, Func AC, Func BA, Func BB, the Func BC (67~72) for preparing to accept in the internal memory that original function calls.
Fig. 4 A illustrates the processing of the IAT Patch of Fig. 3, and Fig. 4 B illustrates the process flow diagram that running log obtains the flow process of processing.For the purpose of simplifying the description, Fig. 4 A and Fig. 4 B are illustrated in EXE and call when the interior Func AA of A.DLL, and it is the example how to move that running log reed that IAT Patch produces replaces sign indicating number.
At EXE (91 among Fig. 4 A) when calling Func AA (94), the running log among the C.DLL (58) calls and DLL name (C.DLL)/function name (Func AA) is saved in (the step S402 among Fig. 4 B) in the internal memory, time in the time of will calling is stored in the memory content that parameter in the internal memory, in the time of will calling is stored in the pointer parameter indication in the internal memory, in the time of will calling and is stored in (the step S403 among 95 among Fig. 4 A, Fig. 4 B) in another internal memory.Thereafter, call originally should be by the Func AA (the step S404 among 99 among Fig. 4 A, Fig. 4 B) in the A.DLL of original call (93 among Fig. 4 A) for C.DLL.In case handling (97 among Fig. 4 A), finishes the Func AA of A.DLL, and control is returned the words of C.DLL (98 among Fig. 4 A), time when C.DLL just will return is stored in the internal memory, rreturn value is stored in the internal memory, and the memory content of the indication of the pointer parameter will return the time is stored in (99 among Fig. 4 A) in another internal memory. thereafter, C.DLL writes file (the step S405 among 100 among Fig. 4 A, Fig. 4 B) with the running log information of preserving, EXE is returned in control, as the Func AA normal termination (101 among Fig. 4 A) of A.DLL.
Fig. 5 is the diagrammatic sketch of enforcement according to the functional configuration of the software evaluation system of the method for acquiring operation log of first embodiment of the invention.Usually, execute file EXE (113) calls the function in DLL-1 (116) and the DLL-2 (117).But, herein, embed the running log that is called as API trace routine (114) and obtain code, handle running log (115) so that generate.API trace routine (114) moves according to the file (111) of the function definition of recording and narrating DLL-1 and DLL-2 and the setting sight of appointment DLL and function (and level) (following the trail of sight 112), and its Import Address Table is rewritten when obtaining running log.
<relate to obtaining of running log that method handles 〉
Below, in the software evaluation system of the method for acquiring operation log of implementing first embodiment, in order to illustrate that execute file EXE is how to be loaded in the internal memory, is at first illustrated the situation that how to be loaded into internal memory under common state with reference to Fig. 6 when generating the example (instance) of the interface of being exported by COM (component object model) server.
Usually, when generating interface example (instance), generate requested interface (121,122) and method thereof (having recorded and narrated the program 130~135 of the performed process of object in object based programming) in com server, the two all is loaded in the internal memory.Herein, virtual address table (118,120, virtual address table) prepares accordingly with the example that is generated, and is transferred into the EXE that is used to carry out the request of generation.Each virtual address table is recorded and narrated the calculated address (124~129) of described method.EXE utilizes these information that each interface is called.Fig. 5 has exemplified an EXE and has generated two interfaces, is the example of Interface A (121) and Interface B (122), and use the example of the method in this interface, the actual method of using is Method AA, Method AB, Method AC, Method BA, Method BB, Method BC (130~135).
In the code call function Method of EXE AA, read the address (124) that writes on the Method AA in the virtual address table.In fact this table has recorded and narrated the address of the Method AA code (130) that generates as a part of Interface A of com server, and by calling this address, the code of EXE can call the Method AA of Interface A.
The internal memory that Fig. 7 shows the software evaluation system of the method for acquiring operation log of implementing first embodiment of the invention constitutes, be that with the difference of Fig. 6 running log is obtained code adopts so-called VTable Patch (virtual address table patch, virtual address table Patch) method is redirected method call.
When beginning to obtain running log, in internal memory, load the DLL (143) that is used for VTable Patch.The address that this DLL will write on the method in the virtual address table (136,138) is rewritten as running log in the DLL and obtains Method A ' A, Method A ' B, Method A ' C, the Method B ' A of code, the address (145~150) of Method B ' B, Method B ' C.The code (157~162) of Method A ' A among the DLL, Method A ' B, Method A ' C, Method B ' A, Method B ' B, Method B ' C, write down running log, and call Method AA, Method AB, Method AC, Method BA, Method BB, Method BC (157~162) as corresponding method.
Fig. 8 A is the diagrammatic sketch that the VTable Patch processing of Fig. 7 is shown, and Fig. 8 B illustrates the process flow diagram that running log obtains the flow process of processing.For simplicity, in this figure, Fig. 8 A and Fig. 8 B are illustrated in when the Method AA that EXE calls the Interface A in the com server, and it is the example how to operate that the running log that VTable Patch produces obtains code.
EXE (163 among Fig. 8 A) one calls Method AA (166 among Fig. 8 A), and the running log among the DLL (164) obtains code module name/interface name/method name is saved in (the step S802 among Fig. 8 B) in the internal memory, allocating time is stored in the memory content that parameter in the internal memory, in the time of will calling is stored in the pointer parameter indication in the internal memory, in the time of will calling is stored in (the step S803 among 167 among Fig. 8 A, Fig. 8 B) in another internal memory.Thereafter, call should be by the Method AA (the step S804 among 168 among Fig. 8 A, Fig. 8 B) in the com server of original call (165 among Fig. 8 A) for DLL.MethodAA as com server handles (169 among Fig. 8 A) end, and control is returned the words of DLL (164 among Fig. 8 A), time when DLL (164) just will return is stored in the internal memory, rreturn value is stored in the internal memory, and the memory content of the indication of the pointer parameter will return the time is stored in (171 among Fig. 8 A) in another internal memory.Thereafter, DLL writes the running log information of preserving in the file (the step S805 among 172 among Fig. 8 A, Fig. 8 B), and EXE is returned in control, as the Method AA normal termination (173 among Fig. 8 A) of com server.
Fig. 9 is the diagrammatic sketch of enforcement according to the functional configuration of the software evaluation system of the method for acquiring operation log of first embodiment of the invention.Usually, execute file EXE (176) calls the method in com server 1 (179) and the com server 2 (180), herein, embeds the running log that is called as API trace routine (177) and obtains code, handles running log (178) so that generate.API trace routine (177), move according to the file (174) of the function definition of recording and narrating com server 1 (179) and com server 2 (180) and the setting sight (following the tracks of sight 175) of appointment com server, interface and method, its virtual address table is rewritten when obtaining running log.
[embodiment]
Figure 10 illustrates the example of indicating the function definition file of the parameter of each function and method and rreturn value form to software evaluation system.This document has been recorded and narrated DLL/ interface name and function/method name (" function/method " refers to " function or method ", is equally applicable to following description), and with these functions/method corresponding parameter and rreturn value type.Software evaluation system according to the method for acquiring operation log of this embodiment is determined the parameter/rreturn value of each function/method according to the content that this function definition file instructed, and obtains its content with as running log.
Figure 11 illustrates and uses function definition file shown in Figure 10, and enforcement is according to the example of the running log that is obtained of the software evaluation system of the method for acquiring operation log of first embodiment of the invention.Time and the relevant parameters/rreturn value of generation during in response to each call function/method is with as running log.
From above explanation as can be known, method for acquiring operation log according to present embodiment, in obtaining the processing running log of the software that is split up into a plurality of modules, the calling as running log of function/method for preparing in the module can be carried out record, and need not module itself is adjusted, thereby can reduce the homework burden that is used to obtain the processing running log.In addition, can obtain running log, and make the analysis to running log become easily, can reduce the man-hour that is used for the analysis software failure cause thus according to time sequencing.
[embodiment 2]
Below describe and relate to those and have the function/method that has the function class parameter or that belong to structured data type, wherein can optionally limit function/method of calling by EXE the processing running log obtain object.
Figure 12 illustrates the function definition file of enforcement according to the software evaluation system of the method for acquiring operation log of second embodiment of the invention.Wherein Ding Yi function " FuncComplexStruct " has two types parameter " index " and " lpClsL1 ", and " lpClsL1 " is confirmed as the class parameter.In this function definition file, for simplicity, suppose 7 level class parameters are arranged, all comprise data member and structured fingers from first the structure " struct " to the layer 6 time, and this structured fingers is pointed to the structure of next level, and in the end " struct " in the level only comprises data member.
Therefore, defined seven " struct " (the typedef struct) that is arranged in seven levels of nesting respectively at function definition file, in " struct ", structured fingers is respectively defined as LPCLS_L2, LPCLS_L3, LPCLS_L4, LPCLS_L5, LPCLS_L6 and LPCLS_L7.
When Figure 13 is illustrated in as shown in figure 12 defined function in software evaluation system reed get the process flow diagram of the processing of running log.
In step 1301, begin to handle, in step 1302, the log acquisition that brings into operation also is stored in module name, interface name, method name (or function name/method name) in the internal memory (perhaps directly being stored in HDD).In step 1303, determine whether parameter is designated as a structured fingers, if this parameter and quilt are designated as a structured fingers, then this handling procedure jumps directly to step 1309.With other processing that continues similarly among first embodiment to have nothing to do with the selection level, the content stores that the time when being about to call, parameter and structural parameters point to (is seen step 1309) in HDD; Call original function (seeing step 1310) then; The memory content that time when returning, rreturn value and structural parameters point to is stored among the HDD (sees step 1311); This handling procedure can be back to step 1302 and carry out the processing of returning of described function/method then, until the finish command of user instruction (seeing step 1312).
If determine that in step 1303 parameter is a structured fingers, then this handling procedure finds or writes down by this structured fingers memory content pointed (seeing step 1304) according to the structure that defines in the function definition (struct) type, determines in step 1305 whether the data member of this structure also is a structured fingers then.If data member is not a structured fingers, then this handling procedure skips to step 1309, and repeating step 1309 is to step 1312.
If determine that in step 1305 data member of this structure is a structured fingers, then this handling procedure determines whether to set predetermined hierarchy (seeing step 1306); If do not set predetermined hierarchy, then this handling procedure skips to step 1309, and repeating step 1309 is to step 1312.The processing running log of all function/methods of being called by EXE in this step 1309 all is stored among the HDD, and selectively, this handling procedure can increase a step of notifying step that the user do not set predetermined hierarchy or request user to confirm.Alternately, if do not set predetermined hierarchy, during then this handling procedure can only be tabulated the purpose module records to operating system module, call original function, and skip to step 1312; Perhaps, the predetermined information when predetermined information that writes down when calling the function of carrying out predetermined process and reception execution result can not comprise the memory content that structured fingers is specified, does not therefore have by the memory content of described pointer structure pointed to be output.
If set predetermined hierarchy in step 1306, then handling procedure determines that whether the current level of data member to be exported is less than described predetermined hierarchy (in step 1307).If the current level of described data member is more than or equal to described predetermined hierarchy, then handling procedure skips to step 1309, and repeating step 1309 is to step 1312, in step 1309, the memory content of being stored promptly be in the predetermined hierarchy of data member by above-mentioned pointer parameter content pointed.
If less than described predetermined hierarchy, then handling procedure makes the current level of data member increase by 1 (in step 1308) at the current level of the described data member of step 1307, execution in step 1304 then, begin the processing of returning of the function/method of carrying out.In addition, the processing from step 1303 to step 1306 also is applicable to carry out and returns or circular treatment.
For explaining above-mentioned steps better, provide a reference function shown in Figure 14 to describe the example of step 1303 to 1309, wherein hypothesis in detail at this:
Predetermined hierarchy is set to 2, is used for judging that in step 1307 whether current level is less than 2;
Tracked function has a structured fingers parameter that is called P, for example Func (Struct_Ap among Figure 14 *);
Structure Struct_A comprises a data member that is called AA (can be any other content except pointer at this AA) and a structured fingers Ap *, this structured fingers Ap* points to structure Struct_B shown in Figure 14; And
Structure Struct_B comprises a data member BB and a structured fingers Bp*, this structured fingers Ap *Point to structure Struct_C shown in Figure 14.
When the step 1303 in the flowchart to 1309 the time, determine that in step 1303 described parameter is a structured fingers (P as shown in figure 14), in internal memory, store the content AA of Struct_A with post processor execution in step 1304.Find the data member Ap of Struct_A in step 1305 *Be a structured fingers, predetermined hierarchy has been set in execution in step 1306 and discovery subsequently, and execution in step 1307 then.In this step 1307, whether handling procedure judges current level less than described predetermined hierarchy, because current level is 1, and less than predetermined hierarchy 2, so handling procedure execution in step 1308.In this step 1308, handling procedure increases current level, and promptly current level becomes 2.Return step 1304 with post processor, begin to handle second level, and in internal memory, store the content BB of Struct_B.Find the data member Bp of Struct_B in step 1305 *Be a structured fingers equally, predetermined hierarchy has been set in execution in step 1306 and discovery subsequently, and execution in step 1307 then.In this step 1307, whether handling procedure judges current level less than described predetermined hierarchy, because current level is 2, equals predetermined hierarchy 2, so handling procedure execution in step 1309 rather than step 1308.In step 1309, handling procedure stores stored parameters content AA and BB in the above step 1304 in the hard disk into.In this embodiment, because predetermined hierarchy is 2, so content CC can not be stored in the hard disk.
In the above-described embodiments, please note that then handling procedure is answered execution in step 1309 if be "No" in the judged result of step 1307, preserve the content of having obtained, if and be "Yes" in the judged result of step 1307, then handling procedure is answered execution in step 1308, to increase current level.
Figure 15 is illustrated in and does not use when being used to treat output data member's predetermined hierarchy, utilizes the running log data of obtaining in the software evaluation system that are defined in shown in Figure 12 according to the present invention.In this data run daily record, all parameter informations all are output, and these all parameter informations are stored in the therefore very consuming time and very big space of needs.And so detailed sometimes running log data are not used for the user.
On the other hand, Figure 16 is illustrated in when being used to treat output data member's predetermined hierarchy, utilizes the running log data of obtaining in the software evaluation system that are defined in shown in Figure 12 according to the present invention.In this example, predetermined hierarchy is 2.
By with prior art shown in Figure 15 relatively, as can be seen, use the present invention can only export the desired parameter information of knowing of user, greatly improved the performance that obtains the running log data thus.
Below introduced the present invention with reference to preferred forms, above-mentioned steps clearly, especially step 1304-1306, need not to be restricted to above-described order, for example consider that judging whether to have set predetermined hierarchy can only be performed once in above-mentioned handling procedure, therefore step 1306 can directly move to before the step 1304, and still is back to step 1304 from the processing beginning of returning of step 1308 beginning.
Although advantage of the present invention and not lie in designated parameter be structured fingers, but those of ordinary skill in the art can suspect the technology of various qualifications or specified structure parameter, for example the disclosed technology of Japanese Patent Application No.2002-191128 and 2002-191129.
In addition, handling procedure of the present invention can comprise the steps: to select to be used to obtain the specific function of running log, is the unit record job record with the every day; Produce a new file during greater than a preliminary dimension in the size of running log; Produce a new file during greater than a predetermined quantity in the quantity of running log; When the running log quantity in the internal memory moves this running log during greater than a predetermined quantity and is stored in the disk unit, these steps all have detailed introduction in Japanese Patent Application No.2002-191127,2002-191128,2002-191129,2002-191130 and 2003-099465 etc.
[other embodiment]
In addition, the present invention, both be applicable to by a plurality of equipment (such as, principal computer, interface arrangement, read in device, printer etc.) system that constitutes, also be applicable to the device formed by an equipment (such as, duplicating machine, facsimile unit etc.).
In addition, purpose of the present invention also can be by will having write down the function that realizes above-mentioned embodiment the storage medium feed system or the device of program code of software reach, wherein the program code of depositing on the storage medium is read and carried out to the computing machine of this system or device (or CPU and MPU).
In this occasion,, constitute the present invention so store the storage medium of this program code owing to the program code of reading from storage medium itself is realized the function of above-mentioned embodiment.
As the storage medium that program code is provided, such as, floppy disk (registered trademark), hard disk, CD, magneto-optic disk, CD-ROM, CD-R, tape, Nonvolatile memory card and ROM etc. can be used.
In addition, the program code of reading by object computer, not only can realize the function of above-mentioned embodiment, and according to the indication of this program code, Yun Hang OS (operating system) etc. carries out part or all of actual treatment on computers, realizes that by this processing the occasion of the function of above-mentioned embodiment is self-evident in being also included within.
In addition, the program code of reading from storage medium, be written to the expansion board of inserting computing machine or with function expanding device that computing machine is connected in behind the internal memory that is provided with, indication according to this program code, be arranged at CPU on this expansion board or the function expanding device etc. and carry out part or all of actual treatment, realize that by this processing the occasion of the function of above-mentioned embodiment is self-evident in being also included within.
The present invention has been described at specific embodiment.Should be appreciated that to the invention is not restricted to foregoing description, those skilled in the art can make various changes and modifications, and does not break away from the spirit and scope of the invention.

Claims (8)

1. method for acquiring operation log, be used to obtain the running log of the program of the function that comprises that at least one carries out predetermined process, the address that comprises the function of the described execution predetermined process that will be used to carry out described predetermined process and be loaded changes the step of the address of the function that is used to obtain running log into
The wherein said function that is used to obtain running log is configured to carry out following steps:
Determine whether structural parameters are designated as the structured fingers of pointing to a structure in the function definition of described program; With
If described structural parameters are designated as structured fingers, determine in described function definition, whether to have set the predetermined hierarchy of data member, and determine whether the data member of this structure is the pointer that points to another structure; And
At least after in determining described function definition, having set the predetermined hierarchy of data member, the level of more described invoked structure and described predetermined hierarchy.
2. method for acquiring operation log as claimed in claim 1, it is characterized in that, the described function that is used to obtain running log also is configured to carry out following steps: at least after definite described structural parameters are designated as structured fingers, write down this pointer memory content pointed, this memory content will become a part of running log with the structurally associated that defines in the function definition of described program.
3. method for acquiring operation log as claimed in claim 2, it is characterized in that, the described function that is used to obtain running log also is configured to carry out following steps: if the data member of described structure is to point to the level of the pointer of another structure and described invoked structure less than described predetermined hierarchy equally, also write down the pointer memory content pointed of the data member of described structure, this memory content will become another part running log with described another structurally associated that defines in the function definition of described program.
4. as arbitrary described method for acquiring operation log among the claim 1-3, it is characterized in that the described function that is used to obtain running log also is configured to carry out: call the function of described execution predetermined process, the step that makes this function carry out described predetermined process and received execution result is sent to this program; The step of the predetermined information when being recorded in the function that calls described execution predetermined process; And the step that is recorded in the predetermined information when receiving described execution result.
5. method for acquiring operation log as claimed in claim 4, it is characterized in that the predetermined information when calling the function of described execution predetermined process comprises at least one of following information: the parameter in the function name of institute's call function, the time when calling, when calling and the memory content that described structural parameters point to when calling.
6. method for acquiring operation log as claimed in claim 4, it is characterized in that the predetermined information when receiving described execution result comprises at least one of following information: the memory content that described structural parameters point to when rreturn value the when time during reception, the parameter when receiving, reception and reception.
7. method for acquiring operation log as claimed in claim 1 is characterized in that, has recorded and narrated the address of the function of described execution predetermined process in the input function address table of each dynamic link library of the function that described execution predetermined process is provided.
8. method for acquiring operation log as claimed in claim 4, it is characterized in that, if do not set the predetermined hierarchy of described data member, then the predetermined information when calling the function of described execution predetermined process comprises at least one of following information: the function name of institute's call function, the time when calling and the parameter in when calling; Predetermined information when receiving described execution result comprises at least one of following information: the rreturn value when parameter the when time during reception, reception and reception.
CNB2005100082727A 2005-02-07 2005-02-07 Operation logbook obtaining method Expired - Fee Related CN100472469C (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CNB2005100082727A CN100472469C (en) 2005-02-07 2005-02-07 Operation logbook obtaining method
JP2006024741A JP4280749B2 (en) 2005-02-07 2006-02-01 Log acquisition method, program, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2005100082727A CN100472469C (en) 2005-02-07 2005-02-07 Operation logbook obtaining method

Publications (2)

Publication Number Publication Date
CN1818885A CN1818885A (en) 2006-08-16
CN100472469C true CN100472469C (en) 2009-03-25

Family

ID=36918905

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2005100082727A Expired - Fee Related CN100472469C (en) 2005-02-07 2005-02-07 Operation logbook obtaining method

Country Status (2)

Country Link
JP (1) JP4280749B2 (en)
CN (1) CN100472469C (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101196848B (en) * 2006-12-04 2011-10-12 佳能株式会社 Method for acquiring operation log
CN100465968C (en) * 2007-08-20 2009-03-04 中兴通讯股份有限公司 Processing system for automated testing log
CN101452402B (en) * 2008-11-28 2012-05-30 珠海金山快快科技有限公司 Software operation system and software operation method
CN103077111B (en) * 2011-10-26 2016-02-10 阿里巴巴集团控股有限公司 A kind of localization method of continuous integrating failure use-case and system
CN106681651A (en) * 2016-05-05 2017-05-17 安徽南瑞继远电网技术有限公司 Log management system design method of two-stage buffer mechanism
CN114002987A (en) * 2021-11-03 2022-02-01 杭州和利时自动化有限公司 Method, device, electronic equipment and medium for acquiring log information

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1469248A (en) * 2002-06-28 2004-01-21 ������������ʽ���� Run journal obtaining method, program and storage medium
CN1469237A (en) * 2002-06-28 2004-01-21 佳能株式会社 Operating journal obtaining method, program, and storage medium
CN1534470A (en) * 2003-04-02 2004-10-06 佳能株式会社 Journal obtaining method and controlling program and storage medium thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1469248A (en) * 2002-06-28 2004-01-21 ������������ʽ���� Run journal obtaining method, program and storage medium
CN1469237A (en) * 2002-06-28 2004-01-21 佳能株式会社 Operating journal obtaining method, program, and storage medium
CN1534470A (en) * 2003-04-02 2004-10-06 佳能株式会社 Journal obtaining method and controlling program and storage medium thereof

Also Published As

Publication number Publication date
JP2006221630A (en) 2006-08-24
JP4280749B2 (en) 2009-06-17
CN1818885A (en) 2006-08-16

Similar Documents

Publication Publication Date Title
US7275241B2 (en) Dynamic instrumentation for a mixed mode virtual machine
US6779187B1 (en) Method and system for dynamic interception of function calls to dynamic link libraries into a windowed operating system
US6539501B1 (en) Method, system, and program for logging statements to monitor execution of a program
US6272674B1 (en) Method and apparatus for loading a Java application program
US6738965B1 (en) Trace information in a virtual machine
EP2386953A1 (en) Systems and methods for generating reusable test components out of remote application programming interface
US20050177821A1 (en) Compiler, dynamic compiler, and replay compiler
CN100472469C (en) Operation logbook obtaining method
US7856637B1 (en) Runtime emulating static thread local storage of portable executable software code
CN111813646B (en) Method and device for injecting application probe in docker container environment
US7086034B2 (en) Method, program, and storage medium for acquiring logs
US6792559B1 (en) Performing operations in an environment recreated from system dump information
CN114237714A (en) Command packet generation method and device, electronic equipment and storage medium
US7188279B2 (en) Method, program, and storage medium for acquiring logs
CN101196848B (en) Method for acquiring operation log
US7426660B2 (en) Method, program, and storage medium for acquiring logs
CN110764962A (en) Log processing method and device
US10198784B2 (en) Capturing commands in a multi-engine graphics processing unit
CN100433171C (en) Storage device testing method and testing device
JP4125055B2 (en) Log acquisition method
US7539839B1 (en) Method to test error recovery with selective memory allocation error injection
JP4125053B2 (en) Log acquisition method
JP4125056B2 (en) Log acquisition method
JP4125054B2 (en) Log acquisition method
JP2006031248A (en) Software evaluation system for generating log by hooking function call

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20090325

Termination date: 20170207