Information processing device, information processing method, and program
The information processing device maintains a tree-structured storage area to record function execution information, preventing overwriting and enabling effective failure analysis by securing multiple storage areas for called functions, thus facilitating the identification of program abnormalities.
Patent Information
- Application Number
- JP2021080728
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2021-05-12
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2041-05-12
AI Technical Summary
In conventional information processing devices, execution information of functions stored on the stack can be overwritten, making it difficult to identify the cause of abnormalities during program execution.
The information processing device includes a storage unit with a caller storage area that secures multiple storage areas for recording execution information of called functions, using a recording unit to manage these areas and prevent overwriting by maintaining a tree-structured storage area that reflects function calling relationships.
This approach ensures that execution information of functions is appropriately recorded, allowing for effective failure analysis and identification of the cause of abnormalities by preserving the necessary execution information even after program termination.
Smart Images

Figure 0007600853000001 
Figure 0007600853000002 
Figure 0007600853000003
Abstract
Description
[Technical field]
[0001] The present invention relates to information processing. [Background technology]
[0002] When a processor of an information processing device (computer) executes a program, each time a function calls another function, the execution information of the called function is stored in a storage area in memory called a stack. The execution information of a function includes a program counter, arguments (parameters), and working variables. A function is also called a subroutine.
[0003] The program counter and working variables are used to resume the processing of the calling function after the processing of the called function has finished. When the called function uses data that the calling function has, the data is passed using arguments.
[0004] If the processor detects an anomaly such as a data inconsistency during program execution and determines that it is not possible to continue processing and terminates program execution, the execution information stored in the stack is written to a core dump file. The core dump file is referenced when investigating the cause of the anomaly.
[0005] In relation to stacks, a stack management method is known that leaves stack information when an abnormality is detected in a program, and smoothly performs analysis (see, for example, Patent Document 1). A debugging device that can trace information required for debugging at low cost is also known (see, for example, Patent Document 2).
[0006] There is also known a fault analysis system that can easily collect error information related to fault occurrence, quickly and reliably notify the developer of the fault condition after release, and quickly reflect it in revision and correction work (see, for example, Patent Document 3). A method for controlling transaction execution within a computing environment is also known (see, for example, Patent Document 4). [Prior art documents] [Patent documents]
[0007] [Patent Document 1] JP 2001-356906 A [Patent Document 2] JP 2011-2934 A [Patent Document 3] Japanese Patent Application Publication No. 11-288379 [Patent Document 4] Special Publication No. 2015-526787 Summary of the Invention [Problem to be solved by the invention]
[0008] In conventional information processing devices, after execution information of a function that is useful for investigating the cause of an abnormality is stored in a stack, it may be overwritten by execution information of another function. In this case, when the processor detects an abnormality and ends the execution of the program, no useful execution information remains in the stack, making it difficult to identify the cause of the abnormality.
[0009] This problem is not limited to the case where function execution information is recorded in a stack, but occurs when function execution information is recorded in various storage areas.
[0010] In one aspect, the present invention aims to appropriately record execution information of functions called during execution of a program. [Means for solving the problem]
[0011] In one example, the information processing device includes a storage unit and a recording unit. The storage unit includes a caller memory area in which execution information of a caller that calls a plurality of functions during execution of a program is recorded.
[0012] The recording unit, when a first function of the multiple functions is called from a caller, secures multiple memory areas in the storage unit and records caller information indicating a position of the caller memory area and execution information of the first function in the first memory area of the multiple memory areas. When a second function of the multiple functions is called from a caller, the recording unit records the caller information and the execution information of the second function in a second memory area of the multiple memory areas. Effect of the Invention
[0013] According to one aspect, it is possible to appropriately record execution information of functions that are called during execution of a program. [Brief description of the drawings]
[0014] [Figure 1] FIG. 1 illustrates a function call. [Diagram 2] FIG. 13 is a diagram showing the state of a stack in a comparative example. [Diagram 3] FIG. 2 is a functional configuration diagram of an information processing device. [Figure 4] 13 is a flowchart of a recording process. [Diagram 5] FIG. 2 is a functional configuration diagram showing a specific example of an information processing device. [Figure 6] FIG. 1 illustrates a virtualization system. [Figure 7] FIG. 2 illustrates function calls and returns in a virtualization system. [Figure 8] FIG. 2 is a diagram illustrating a storage area for each function. [Figure 9A] FIG. 13 is a diagram showing the state of a storage area at time T1. [Figure 9B] FIG. 13 is a diagram showing the state of the storage area at time T2. [Figure 9C] FIG. 13 is a diagram showing the state of the storage area at time T3. [Figure 9D] FIG. 13 is a diagram showing the state of the storage area at time T4. [Figure 9E] FIG. 13 is a diagram showing the state of the storage area at time T5. [Figure 9F]FIG. 13 is a diagram showing the state of the storage area at time T6. [Figure 9G] FIG. 13 is a diagram showing the state of the storage area at time T7. [Figure 9H] FIG. 13 is a diagram showing the state of the storage area at time T8. [Figure 10] 13 is a flowchart of a call process. [Figure 11] 13 is a flowchart of a return process. [Figure 12] FIG. 2 is a hardware configuration diagram of an information processing device. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0015] Hereinafter, the embodiments will be described in detail with reference to the drawings.
[0016] Figure 1 shows an example of a function call during program execution. First, at time T1, the processor executes function A, which is the main function of the program. Next, at time T2, function B1 is called from function A, and function B1 is executed.
[0017] Next, at time T3, function C1 is called from function B1, and function C1 is executed. However, a processing error caused by a bug in function C1 causes an anomaly in the data. Next, at time T4, the processor ends the processing of function C1 and returns to the processing of function B1, which is the caller.
[0018] Next, at time T5, function C2 is called from function B1 and function C2 is executed. Next, at time T6, the processor ends the processing of function C2 and returns to the processing of function B1, which is the caller.
[0019] Next, at time T7, the processor ends the processing of function B1 and returns to the processing of the caller, function A. Next, at time T8, function B2 is called from function A and function B2 is executed. In processing function B2, the processor detects an anomaly in the data inconsistency in the processing of function C1 and determines that it is impossible to continue processing. Therefore, the processor ends the execution of the program and generates a core dump file.
[0020] Fig. 2 shows an example of the state of stacks in a comparative example during execution of the program in Fig. 1. Stack 201-1 is the first stack, stack 201-2 is the second stack, stack 201-3 is the third stack, and stack 201-4 is the fourth stack. Stacks 201-1 to 201-4 are allocated at the start of the program, and the size of each stack is a fixed value.
[0021] The stack pointer sp indicates the position of the stack for recording the execution information of the called function. The stack pointer sp advances downward by the size of the stack when a function is called, and advances upward by the size of the stack when a function is returned to the caller.
[0022] First, at time T1, execution information of function A is recorded in stack 201-1, and stack pointer sp points to the position of stack 201-2. Next, at time T2, execution information of function B1 is recorded in stack 201-2, and stack pointer sp points to the position of stack 201-3.
[0023] Next, at time T3, execution information of function C1 is recorded in stack 201-3, and stack pointer sp points to the position of stack 201-4. Next, at time T4, the processor returns to processing of function B1, and stack pointer sp returns to the position of stack 201-3.
[0024] Next, at time T5, stack 201-3 is overwritten with the execution information of function C2, and the stack pointer sp points to the position of stack 201-4. Next, at time T6, the processor returns to the processing of function B1, and the stack pointer sp returns to the position of stack 201-3.
[0025] Next, at time T7, the processor returns to processing of function A, and the stack pointer sp returns to the position of stack 201-2. Next, at time T8, the execution information of function B2 is overwritten in stack 201-2, and the stack pointer sp points to the position of stack 201-3.
[0026] In this case, the execution information of function C1 recorded in stack 201-3 at time T3 is useful for investigating the cause of the abnormality. However, because the execution information of function C2 is overwritten in stack 201-3 at time T5, when the problem becomes apparent at time T8, the execution information of function C1 no longer remains in stack 201-3. This makes it difficult to identify the cause of the abnormality.
[0027] Since stacks 201-1 to 201-4 are allocated at the start of a program, when these stacks are used up, the processor detects an error and terminates execution of the program.
[0028] Fig. 3 illustrates an example of a functional configuration of an information processing device according to an embodiment. The information processing device 301 in Fig. 3 includes a storage unit 311 and a recording unit 312. The storage unit 311 includes a caller storage area in which execution information of a caller that calls multiple functions during execution of a program is recorded.
[0029] Fig. 4 is a flowchart showing an example of a recording process performed by recording unit 312 in Fig. 3. First, when a first function of the multiple functions is called from a caller, recording unit 312 reserves multiple memory areas in memory unit 311 (step 401).
[0030] Next, the recording unit 312 records caller information indicating the location of the caller memory area and execution information of the first function in a first memory area of the multiple memory areas (step 402). Next, when a second function of the multiple functions is called from the caller, the recording unit 312 records the caller information and execution information of the second function in a second memory area of the multiple memory areas (step 403).
[0031] According to the information processing device 301 in FIG. 3, it is possible to appropriately record the execution information of the functions called during the execution of the program.
[0032] Fig. 5 shows a specific example of the information processing device 301 in Fig. 3. The information processing device 501 in Fig. 5 includes a storage unit 511, an execution unit 512, and a recording unit 513. The storage unit 511 stores a program 521. The storage unit 511 and the recording unit 513 correspond to the storage unit 311 and the recording unit 312 in Fig. 3, respectively.
[0033] The execution unit 512 executes the program 521, and the recording unit 513 records in the storage unit 511 the execution information of the functions called during the execution of the program 521.
[0034] Fig. 6 shows an example of a virtualization system corresponding to the information processing device 501 in Fig. 5. A hypervisor 605 runs on hardware 606 of the information processing device 501, and virtualization software 604 runs on the hypervisor 605. An operating system (OS) 603-1 and an OS 603-2 run on the virtualization software 604.
[0035] The hardware 606 corresponds to the storage unit 511, the execution unit 512, and the recording unit 513 in Fig. 5. The hypervisor 605 and the virtualization software 604 are control programs for realizing a virtual machine. The hypervisor 605 emulates the operation of a processor.
[0036] 5. An application 601-1 and an application 601-2 run on the OS 603-1, and an application 602-1 and an application 602-2 run on the OS 603-2. The application 601-1, the application 601-2, the application 602-1, and the application 602-2 are application programs and correspond to the program 521 in FIG.
[0037] The execution unit 512 executes the application 601-1, the application 601-2, the application 602-1, and the application 602-2 on the virtual machine.
[0038] Fig. 7 shows an example of function call and return in the virtualization system of Fig. 6. When the application 601-1 executes a function call 701 or when the OS 603-1 executes a function call 702, the recording unit 513 of Fig. 5 performs a call process 703 which is part of the processing of the hypervisor 605. Also, when the application 601-1 executes a function return 704 or when the OS 603-1 executes a function return 705, the recording unit 513 performs a return process 706 which is part of the processing of the hypervisor 605.
[0039] When the application 601-2, the application 602-1, the application 602-2, or the OS 603-2 executes a function call, a call process 703 is also performed. When the application 601-2, the application 602-1, the application 602-2, or the OS 603-2 executes a function return, a return process 706 is also performed.
[0040] In the call process 703, the recording unit 513 determines the address of a memory area in the memory unit 511 for recording execution information of the called function. The address of the memory area is an example of information indicating the location of the memory area. For example, when the first function of multiple functions called from a specific function in the program 521 is called, the recording unit 513 secures an execution information area for the multiple functions in the memory unit 511.
[0041] The execution information area is a storage area in which N storage areas for recording execution information of functions can be arranged. N is an integer equal to or greater than 2. N is determined based on the scale or complexity of the program 521, the storage capacity of the storage unit 511, etc., and is set as a control parameter.
[0042] Fig. 8 shows an example of a memory area for each function arranged in the execution information area. The memory area in Fig. 8 includes execution information of the function, R, C, and S. The execution information of the function includes a program counter, arguments (parameters), and working variables. R, C, and S are control information for managing the memory area and controlling the operation of the program 521.
[0043] R represents the address of the caller's memory area in which the execution information of the caller's function is recorded. C is a counter indicating the order of the memory area in FIG. 8 among the N memory areas in the execution information area, and S represents the address of the execution information area in the memory unit 511.
[0044] R is an example of caller information, and C is an example of first counter information and second counter information. For example, the address of the first memory area among N memory areas is used as S. The caller memory area also includes function execution information, R, C, and S, similar to the memory area in FIG.
[0045] The recording unit 513 allocates N memory areas in the secured execution information area, records the address of the execution information area as S of the caller memory area, and records 1 as C of the caller memory area. The recording unit 513 then records the address of the caller memory area as R of the first memory area, and records the execution information of the first function in the first memory area.
[0046] When the execution of the first function ends, the recording unit 513 obtains R from the first memory area. When a second function is called from among a plurality of functions called from a specific function in the program 521, the recording unit 513 obtains C and S from the caller's memory area based on the obtained R. Then, the recording unit 513 updates C in the caller's memory area by incrementing C by 1. S in the caller's memory area is not changed.
[0047] C and S acquired from the caller memory area are an example of the first information, and the updated C and the unchanged S are an example of the second information. The recording unit 513 updates C to change the first information to the second information.
[0048] Next, the recording unit 513 obtains the address add of the second storage area using the updated C. The recording unit 513 calculates the address add by the following formula using the size X of the storage area, for example.
[0049] add=S+X(C-1) (1)
[0050] The second memory area is specified by calculating the address add using the formula (1). The recording unit 513 then records the address of the caller memory area as R of the second memory area indicated by the address add, and records the execution information of the second function in the second memory area.
[0051] When the third or subsequent functions are called, C in the caller memory area is updated in the same manner as when the second function was called, and the execution information of the third and subsequent functions is recorded in the third and subsequent memory areas. When C=N, the result of incrementing C by 1 is 1, and the execution information of the (N+1)th and subsequent functions is again recorded in order in the first and subsequent memory areas. This allows the N memory areas allocated when the first function was called to be used cyclically.
[0052] In this way, by recording C and S in the caller's memory area, when the execution of the called function is completed, the recording unit 513 can obtain the address of the memory area of the function to be called next from the caller, using C and S. Also, by recording R in the memory area of the called function, when the execution of the function is completed, the recording unit 513 can obtain C and S from the caller's memory area, using R.
[0053] When the execution of the called function is completed and the next function is called, the recording unit 513 can generate information indicating the storage area of the next function simply by updating C of the caller storage area.
[0054] Figures 9A to 9H show examples of the state of the memory area in memory unit 511 during execution of the program in Figure 1. Figures 9B, 9C, 9E, and 9H show examples of the state of the memory area in call processing 703 in Figure 7, and Figures 9D, 9F, and 9G show examples of the state of the memory area in return processing 706 in Figure 7.
[0055] The pointer p indicates the address of a memory area in the memory unit 511 for recording the execution information of the function. In this example, N=4, and four memory areas are arranged in each execution information area. NULL is set as the initial value to R, C, and S of each memory area.
[0056] 9A shows an example of the state of a memory area at time T1. At time T1, the execution unit 512 executes function A. The recording unit 513 allocates a memory area 901 to function A, sets the address of the memory area 901 to a pointer p, and records the execution information of function A in the memory area 901. S=NULL in the memory area 901 indicates that no function is called from function A.
[0057] Fig. 9B shows an example of the state of the memory area at time T2. At time T2, function A calls function B1. Recording unit 513 acquires C and S from memory area 901 of the caller pointed to by pointer p in Fig. 9A.
[0058] In this case, since S=NULL, it is understood that function B1 is the first function called from function A. Therefore, recording unit 513 secures an execution information area including memory areas 902-1 to 902-4.
[0059] Next, the recording unit 513 sets the address of the execution information area to S of the caller memory area 901 pointed to by the pointer p in Fig. 9A, and sets 1 to C of the memory area 901. C=1 indicates that the memory area 902-1 is the first memory area in the execution information area.
[0060] Next, the recording unit 513 calculates the address add of the memory area 902-1 by the formula (1) and allocates the memory area 902-1 to the function B1. In this case, since C=1, add=S.
[0061] 9A to R in memory area 902-1, sets the address of memory area 902-1 to pointer p, and records the execution information of function B1 in memory area 902-1. Memory areas 902-2 to 902-4 are unused.
[0062] Fig. 9C shows an example of the state of the memory area at time T3. At time T3, function B1 calls function C1. Recording unit 513 obtains C and S from memory area 902-1 of the caller pointed to by pointer p in Fig. 9B.
[0063] In this case, since S=NULL, it is clear that function C1 is the first function called from function B1. Therefore, recording unit 513 secures an execution information area including memory areas 903-1 to 903-4.
[0064] Next, the recording unit 513 sets the address of the execution information area to S of the caller memory area 902-1 pointed to by the pointer p in Fig. 9B, and sets 1 to C of the memory area 902-1. C=1 indicates that the memory area 903-1 is the first memory area in the execution information area.
[0065] Next, the recording unit 513 calculates the address add of the memory area 903-1 by the formula (1) and allocates the memory area 903-1 to the function C1. In this case, since C=1, add=S.
[0066] Next, the recording unit 513 sets the address of the pointer p in FIG. 9B to R in the memory area 903-1, sets the address of the pointer p to the memory area 903-1, and records the execution information of the function C1 in the memory area 903-1. The memory areas 903-2 to 903-4 are unused. In the processing of the function C1, an abnormality occurs in the data as shown in FIG.
[0067] Fig. 9D shows an example of the state of the memory area at time T4. At time T4, the execution unit 512 ends the processing of function C1 and returns to the processing of the caller function B1. The recording unit 513 acquires R from the memory area 903-1 pointed to by the pointer p in Fig. 9C, and sets the address of the memory area 902-1 pointed to by the acquired R in the pointer p.
[0068] Fig. 9E shows an example of the state of the memory area at time T5. At time T5, function B1 calls function C2. Recording unit 513 obtains C and S from memory area 902-1 of the caller pointed to by pointer p in Fig. 9D.
[0069] In this case, since S is not NULL, it is clear that an execution information area for the function called from function B1 has already been secured. Therefore, the recording unit 513 increments C in the memory area 902-1 by 1. C=2 indicates that the memory area 903-2 is the second memory area in the execution information area.
[0070] Next, the recording unit 513 calculates the address add of the memory area 903-2 by the formula (1), and allocates the memory area 903-2 to the function C2. In this case, since C=2, add=S+X.
[0071] Next, the recording unit 513 sets the address of the pointer p in FIG. 9D to R in the memory area 903-2, sets the address of the memory area 903-2 to the pointer p, and records the execution information of the function C2 in the memory area 903-2.
[0072] Fig. 9F shows an example of the state of the memory area at time T6. At time T6, the execution unit 512 ends the processing of function C2 and returns to the processing of the caller, function B1. The recording unit 513 acquires R from the memory area 903-2 pointed to by the pointer p in Fig. 9E, and sets the address of the memory area 902-1 pointed to by the acquired R in the pointer p.
[0073] Fig. 9G shows an example of the state of the memory area at time T7. At time T7, the execution unit 512 ends the processing of function B1 and returns to the processing of the caller, function A. The recording unit 513 acquires R from the memory area 902-1 pointed to by the pointer p in Fig. 9F, and sets the address of the memory area 901 pointed to by the acquired R in the pointer p.
[0074] Fig. 9H shows an example of the state of the memory area at time T8. At time T8, function A calls function B2. Recording unit 513 obtains C and S from memory area 901 of the caller pointed to by pointer p in Fig. 9G.
[0075] In this case, since S is not NULL, it is clear that an execution information area has already been secured for the function called from function A. Therefore, the recording unit 513 increments C in the memory area 901 by 1. C=2 indicates that the memory area 902-2 is the second memory area in the execution information area.
[0076] Next, the recording unit 513 calculates the address add of the memory area 902-2 by the formula (1), and allocates the memory area 902-2 to the function B2. In this case, since C=2, add=S+X.
[0077] 9G in R of memory area 902-2, sets the address of memory area 902-2 in pointer p, and records the execution information of function B2 in memory area 902-2. In processing function B2, execution unit 512 detects the data inconsistency caused by the processing of function C1 as an abnormality as shown in FIG. 1, and determines that continuation of processing is impossible.
[0078] In this case, the execution information of function C1 recorded in memory area 903-1 at time T3 is useful for investigating the cause of the abnormality. Since the execution information of function C2 is not overwritten in memory area 903-1 at time T5 but is recorded in another memory area 903-2, the execution information of function C1 remains in memory area 903-1 when the problem becomes apparent at time T8.
[0079] Therefore, in a failure analysis after the program execution is completed, the execution information of function C1 can be used to understand the state of the program, thereby discovering a bug in function C1 and identifying the cause of the abnormality.
[0080] Function B1 is an example of a first function, function B2 is an example of a second function, function C1 is an example of a third function, and function C2 is an example of a fourth function. Memory area 902-1 is an example of a first memory area, memory area 902-2 is an example of a second memory area, memory area 903-1 is an example of a third memory area, and memory area 903-2 is an example of a fourth memory area.
[0081] According to the information processing device 501 of Fig. 5, as the program 521 is executed, a tree-structured storage area reflecting the function call relationships is generated as shown in Fig. 9A to Fig. 9H. By reserving N storage areas at the nodes and leaves of the tree structure and recording the execution information of the called function in each storage area, overwriting of the execution information of the function can be avoided and the execution information can be recorded appropriately. In addition, by recording the address of the caller storage area in each storage area, it becomes possible to access the storage area of the parent node from the storage area of the child node.
[0082] Furthermore, by recording information indicating the memory area of the called function in the caller's memory area, the address of the memory area of the next function to be called can be obtained using that information, making it possible to access a different memory area of a child node from the memory area of a parent node.
[0083] When the first function included in a new layer is called, N new memory areas are allocated, and so long as there is free space in storage unit 511, the memory area increases with the execution of program 521. Therefore, the execution of program 521 will not end due to a shortage of memory area for recording execution information.
[0084] For example, during normal execution of program 521, execution information may be recorded using a stack such as that shown in the comparative example of FIG. 2, and when a problem occurs and the cause needs to be investigated, the mode may be switched to debug mode and the execution information may be recorded in a tree-structured memory area.
[0085] Fig. 10 is a flow chart showing an example of the call process 703 in Fig. 7. First, the recording unit 513 acquires C and S from the current memory area pointed to by the pointer p (step 1001), and checks the acquired value of S (step 1002). The current memory area is a memory area in which the execution information of the calling function is recorded.
[0086] If S=NULL (step 1002, YES), the recording unit 513 secures an execution information area including N memory areas in the memory unit 511 (step 1007). Then, the recording unit 513 sets the address of the execution information area to S of the current memory area (step 1008), and sets 1 to C of the current memory area (step 1009).
[0087] Next, the recording unit 513 calculates the address add of the memory area for the called function by the formula (1), and allocates the memory area pointed to by the address add to the called function (step 1004).Then, the recording unit 513 sets the address of the pointer p to R of the memory area pointed to by the address add (step 1005), and sets the address add to the pointer p (step 1006).Then, the recording unit 513 records the execution information of the called function in the memory area pointed to by the address add.
[0088] On the other hand, if S is not NULL (step 1002, NO), the recording unit 513 updates C by incrementing C in the current storage area by 1 (step 1003). Then, the recording unit 513 performs the processes in and after step 1004.
[0089] Fig. 11 is a flowchart showing an example of the return process 706 in Fig. 7. First, the recording unit 513 acquires R from the current storage area pointed to by the pointer p (step 1101). Then, the recording unit 513 sets the address of the call source storage area indicated by the acquired R in the pointer p (step 1102).
[0090] The configurations of the information processing device 301 in FIG. 3 and the information processing device 501 in FIG. 5 are merely examples, and some of the components may be omitted or changed depending on the application or conditions of the information processing device.
[0091] The configuration of the virtualization system in Fig. 6 is merely an example, and some of the components may be omitted or changed depending on the purpose or conditions of the virtualization system. For example, the number of OSs running on the virtualization software 604 may be one or three or more. The number of application programs running on each OS may be one or three or more. The operation of the processor may be emulated using virtualization software other than the hypervisor 605.
[0092] The flowcharts in FIG. 4, FIG. 10, and FIG. 11 are merely examples, and some of the processes may be omitted or changed depending on the configuration or conditions of the information processing device.
[0093] The program shown in Fig. 1 is merely an example, and the function to be called changes depending on the program. The state of the stack shown in Fig. 2 is merely an example, and the state of the stack changes depending on the program. The call processing 703 and the return processing 706 shown in Fig. 7 are merely an example, and the call processing 703 and the return processing 706 may be performed using virtualization software other than the hypervisor 605.
[0094] The control information shown in Fig. 8 is merely an example, and the call process 703 and the return process 706 may be performed using control information in a different format. The states of the storage areas shown in Figs. 9A to 9H are merely an example, and the states of the storage areas change according to the program 521. Equation (1) is merely an example, and the address add may be found using a different calculation equation.
[0095] Fig. 12 shows an example of the hardware configuration of the information processing device 301 in Fig. 3 and the information processing device 501 in Fig. 5. The information processing device in Fig. 12 includes a CPU (Central Processing Unit) 1201, a memory 1202, an input device 1203, an output device 1204, an auxiliary storage device 1205, a medium drive device 1206, and a network connection device 1207. These components are hardware, and are connected to each other via a bus 1208.
[0096] The memory 1202 is, for example, a semiconductor memory such as a ROM (Read Only Memory) or a RAM (Random Access Memory), and stores programs and data used in processing. The memory 1202 may operate as the storage unit 311 in Fig. 3 or the storage unit 511 in Fig. 5. The programs used in processing are, for example, the program 521 and a control program.
[0097] The CPU 1201 (processor) operates as the recording unit 312 in Fig. 3 by, for example, executing a control program using the memory 1202. The CPU 1201 also operates as the execution unit 512 in Fig. 5. The CPU 1201 also operates as the recording unit 513 in Fig. 5 by executing a control program using the memory 1202.
[0098] The input device 1203 is, for example, a keyboard, a pointing device, etc., and is used to input instructions or information from a user or operator. The output device 1204 is, for example, a display device, a printer, etc., and is used to output inquiries or instructions to a user or operator, and processing results. The processing results may be execution information of each function included in the program 521.
[0099] The auxiliary storage device 1205 is, for example, a magnetic disk device, an optical disk device, a magneto-optical disk device, a tape device, etc. The auxiliary storage device 1205 may be a hard disk drive. The information processing device can store programs and data in the auxiliary storage device 1205 and load them into the memory 1202 for use.
[0100] The medium drive device 1206 drives the portable recording medium 1209 and accesses the recorded contents. The portable recording medium 1209 is a memory device, a flexible disk, an optical disk, a magneto-optical disk, etc. The portable recording medium 1209 may be a CD-ROM (Compact Disk Read Only Memory), a DVD (Digital Versatile Disk), a USB (Universal Serial Bus) memory, etc. A user or operator can store programs and data in the portable recording medium 1209 and load them into the memory 1202 for use.
[0101] Thus, the computer-readable recording medium that stores the program and data used in the processing is a physical (non-transitory) recording medium such as the memory 1202, the auxiliary storage device 1205, or the portable recording medium 1209.
[0102] The network connection device 1207 is a communication interface circuit that is connected to a communication network such as a LAN (Local Area Network) or a WAN (Wide Area Network) and performs data conversion associated with communication. The information processing device receives programs and data from an external device via the network connection device 1207 and loads them into the memory 1202 for use.
[0103] It is not necessary for the information processing device to include all of the components in Fig. 12, and some of the components may be omitted depending on the purpose or conditions of the information processing device. For example, if an interface with a user or operator is not required, the input device 1203 and the output device 1204 may be omitted. If the portable recording medium 1209 or a communication network is not used, the medium drive device 1206 or the network connection device 1207 may be omitted.
[0104] Although the disclosed embodiments and their advantages have been described in detail, it will be appreciated that those skilled in the art may make various modifications, additions and omissions therein without departing from the scope of the invention as clearly set forth in the claims.
[0105] The following supplementary notes are further disclosed regarding the embodiment described with reference to FIGS. (Appendix 1) a storage unit including a caller storage area in which execution information of a caller that calls a plurality of functions during execution of a program is recorded; a recording unit which, when a first function of the plurality of functions is called from the caller, secures a plurality of storage areas within the storage unit, and records caller information indicating a position of the caller storage area and execution information of the first function in a first storage area among the plurality of storage areas, and, when a second function of the plurality of functions is called from the caller, records the caller information and the execution information of the second function in a second storage area among the plurality of storage areas; An information processing device comprising: (Appendix 2) The information processing device described in Appendix 1, characterized in that the recording unit records first information indicating the first memory area in the caller memory area when the first function is called, and records second information indicating the second memory area in the caller memory area when the second function is called. (Appendix 3) the first information includes location information indicating locations of the plurality of storage areas in the storage unit and first counter information indicating a first storage area among the plurality of storage areas; the second information includes the location information and second counter information indicating a second storage area among the plurality of storage areas; The information processing device according to claim 2, wherein the recording unit changes the first information to the second information by changing the first counter information to the second counter information when the second function is called. (Appendix 4) The information processing device described in Appendix 2 or 3, characterized in that the recording unit acquires the caller information from the first memory area when execution of the first function is completed, acquires the first information from the caller memory area based on the acquired caller information when the second function is called, and determines the position of the second memory area based on the acquired first information. (Appendix 5) The information processing device of any one of appendixes 1 to 4, wherein the recording unit, when a third function among the other multiple functions is called from the first function, secures another multiple memory areas in the memory unit and records information indicating a position of the first memory area and execution information of the third function in a third memory area among the other multiple memory areas, and, when a fourth function among the other multiple functions is called from the first function, records information indicating a position of the first memory area and execution information of the fourth function in a fourth memory area among the other multiple memory areas. (Appendix 6) when a first function among the plurality of functions is called from a caller that calls the plurality of functions during execution of the program, a plurality of memory areas are reserved in the memory unit; recording caller information indicating a caller memory area in the storage unit in which the caller execution information is recorded and the execution information of the first function in a first memory area among the plurality of memory areas; when a second function of the plurality of functions is called from the caller, recording the caller information and execution information of the second function in a second storage area of the plurality of storage areas; An information processing method characterized in that the processing is executed by a computer. (Appendix 7) When the first function is called, first information indicating the first memory area is recorded in the caller memory area; when the second function is called, second information indicating the second storage area is recorded in the caller storage area; 7. The information processing method according to claim 6, further comprising the step of: (Appendix 8) the first information includes location information indicating locations of the plurality of storage areas in the storage unit and first counter information indicating a first storage area among the plurality of storage areas; the second information includes the location information and second counter information indicating a second storage area among the plurality of storage areas; The information processing method of claim 7, wherein the process of recording the second information includes a process of changing the first counter information to the second information by changing the first counter information to the second counter information. (Appendix 9) When the execution of the first function is completed, the caller information is obtained from the first storage area; When the second function is called, the first information is obtained from the caller storage area based on the obtained caller information; determining a location of the second storage area based on the acquired first information; 9. The information processing method according to claim 7 or 8, further comprising the step of: (Appendix 10) when a third function among the other plurality of functions is called from the first function, a plurality of other memory areas are reserved in the memory unit; recording information indicating a position of the first storage area and execution information of the third function in a third storage area among the other multiple storage areas; when a fourth function among the other plurality of functions is called from the first function, information indicating a position of the first storage area and execution information of the fourth function are recorded in a fourth storage area among the other plurality of storage areas; 10. The information processing method according to any one of claims 6 to 9, further comprising the steps of: (Appendix 11) when a first function among the plurality of functions is called from a caller that calls the plurality of functions during execution of the program, a plurality of memory areas are reserved in the memory unit; recording caller information indicating a caller memory area in the storage unit in which the caller execution information is recorded and the execution information of the first function in a first memory area among the plurality of memory areas; when a second function of the plurality of functions is called from the caller, recording the caller information and execution information of the second function in a second storage area of the plurality of storage areas; A program that causes a computer to execute a process. (Appendix 12) When the first function is called, first information indicating the first memory area is recorded in the caller memory area; when the second function is called, second information indicating the second storage area is recorded in the caller storage area; 12. The program according to claim 11, further comprising the steps of: (Appendix 13) the first information includes location information indicating locations of the plurality of storage areas in the storage unit and first counter information indicating a first storage area among the plurality of storage areas; the second information includes the location information and second counter information indicating a second storage area among the plurality of storage areas; The program described in Appendix 12, characterized in that the process of recording the second information includes a process of changing the first counter information to the second information by changing the first information to the second counter information. (Appendix 14) When the execution of the first function is completed, the caller information is obtained from the first storage area; When the second function is called, the first information is obtained from the caller storage area based on the obtained caller information; determining a location of the second storage area based on the acquired first information; 14. The program according to claim 12 or 13, further comprising the steps of: (Appendix 15) when a third function among the other plurality of functions is called from the first function, a plurality of other memory areas are reserved in the memory unit; recording information indicating a position of the first storage area and execution information of the third function in a third storage area among the other multiple storage areas; when a fourth function among the other plurality of functions is called from the first function, information indicating a position of the first storage area and execution information of the fourth function are recorded in a fourth storage area among the other plurality of storage areas; 15. The program according to any one of claims 11 to 14, further comprising the steps of: [Explanation of symbols]
[0106] 201-1~201-4 Stack 301, 501 Information processing equipment 311, 511 Storage section 312, 513 Recording section 512 Executive Department 521 Program 601-1, 601-2, 602-1, 602-2 Applications 603-1, 603-2 Operating Systems 604 Virtualization Software 605 Hypervisor 606 Hardware 701, 702 Calls 703 Call Processing 704, 705 Return 706 Return Processing 901, 902-1~902-4, 903-1~903-4 Storage area 1201 CPU 1202 Memory 1203 Input Device 1204 Output Device 1205 Auxiliary storage device 1206 Media Drive Unit 1207 Network connection device 1208 Bus 1209 Portable recording media
Claims
1. a storage unit including a caller storage area in which execution information of a caller that calls a plurality of functions during execution of a program is recorded; a recording unit which, when a first function of the plurality of functions is called from the caller, reserves a plurality of memory areas in the memory unit, and records caller information indicating a position of the caller memory area and execution information of the first function in a first memory area of the plurality of memory areas, and, when a second function of the plurality of functions is called from the caller, records the caller information and the execution information of the second function in a second memory area of the plurality of memory areas; An information processing device comprising:
2. The information processing device according to claim 1, characterized in that the recording unit records first information indicating the first memory area in the caller memory area when the first function is called, and records second information indicating the second memory area in the caller memory area when the second function is called.
3. the first information includes position information indicating positions of the plurality of storage areas in the storage unit and first counter information indicating a first storage area among the plurality of storage areas; the second information includes the location information and second counter information indicating a second storage area among the plurality of storage areas; 3 . The information processing apparatus according to claim 2 , wherein the recording unit changes the first counter information to the second counter information when the second function is called, thereby changing the first information to the second information.
4. 4. The information processing device according to claim 2 or 3, characterized in that the recording unit acquires the caller information from the first memory area when execution of the first function is completed, acquires the first information from the caller memory area based on the acquired caller information when the second function is called, and determines the position of the second memory area based on the acquired first information.
5. 5. The information processing device of claim 1, wherein when a third function among the other multiple functions is called from the first function, the recording unit secures a plurality of other memory areas in the memory unit and records information indicating the position of the first memory area and execution information of the third function in a third memory area among the other multiple memory areas, and when a fourth function among the other multiple functions is called from the first function, records information indicating the position of the first memory area and execution information of the fourth function in a fourth memory area among the other multiple memory areas.
6. when a first function among the plurality of functions is called from a caller that calls the plurality of functions during execution of a program, a plurality of storage areas are reserved in a storage unit; recording caller information indicating a caller memory area in the storage unit in which the caller execution information is recorded and execution information of the first function in a first memory area among the plurality of memory areas; when a second function of the plurality of functions is called from the caller, information of the caller and execution information of the second function are recorded in a second storage area of the plurality of storage areas; An information processing method characterized in that the processing is executed by a computer.
7. when a first function among the plurality of functions is called from a caller that calls the plurality of functions during execution of a program, a plurality of storage areas are reserved in a storage unit; recording caller information indicating a caller memory area in the storage unit in which the caller execution information is recorded and execution information of the first function in a first memory area among the plurality of memory areas; when a second function of the plurality of functions is called from the caller, information of the caller and execution information of the second function are recorded in a second storage area of the plurality of storage areas; A program that causes a computer to execute a process.
Citation Information
Patent Citations
Down-route tracking system
JP1992096148A
Log extraction system
JP1994067942A
Fault analysis system and storage medium
JP1999288379A
Stack management system
JP2001356906A
Debugging device and program conversion method
JP2011002934A
