CN104461521B - A kind of application program playback method and system - Google Patents

A kind of application program playback method and system Download PDF

Info

Publication number
CN104461521B
CN104461521B CN201410693931.4A CN201410693931A CN104461521B CN 104461521 B CN104461521 B CN 104461521B CN 201410693931 A CN201410693931 A CN 201410693931A CN 104461521 B CN104461521 B CN 104461521B
Authority
CN
China
Prior art keywords
information
event
task
obtaining
application program
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.)
Active
Application number
CN201410693931.4A
Other languages
Chinese (zh)
Other versions
CN104461521A (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.)
Beihang University
Original Assignee
Beihang University
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 Beihang University filed Critical Beihang University
Priority to CN201410693931.4A priority Critical patent/CN104461521B/en
Publication of CN104461521A publication Critical patent/CN104461521A/en
Application granted granted Critical
Publication of CN104461521B publication Critical patent/CN104461521B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a kind of application program playback method and systems, the described method comprises the following steps:S1, target machine download the application program of host;S2, the pitching pile in the application program, obtain and upload the execution information of the application program;S3, point setting breakpoint is occurred in the corresponding event of the application program according to event information;The event information is analyzed and is handled to the execution information by the host, and the event information is the information switched between causing task;S4, restarting application program when execution encounters the breakpoint, switch the task of the application program according to switching mission bit stream, realize that the application program is executed according to former operation order;The switching mission bit stream is calculated by the host according to event information analysis.The present invention, come the execution information of records application program, greatly reduces the consumption in time and space by pitching pile probe, can be used in all systems such as embedded real time system.

Description

A kind of application program playback method and system
Technical field
The present invention relates to reproducing process field is executed, it is more particularly to a kind of application program playback method and system.
Background technology
With the raising that user requires software system performance, concurrent technology is widely used.But concurrent technology Use while improving software performance, also bring prodigious difficulty to the exploitation of software developer, especially for Embedded software system, due to concurrent program execute uncertainty, mistake it is not reproducible so that traditional sequential programme Adjustment method becomes no longer to be applicable in.In the development process of concurrent program, software tune is realized usually using reproducing process is executed Incorrect restitution and program when examination retry row, that is, pass through and carry out recording, tracking, Zhi Hou to the executive condition of target program Under identical input condition, according to the execution information recorded come so that the operating condition of target program reproduces.Execute playback The research of technology has very important significance for the debugging of concurrent program.
Currently, the playback that executes for concurrent program, has been proposed that certain methods, includes mainly both at home and abroad:
A kind of execution playback method Recap based on content realizes journey by tracking the data in all shared drives The playback of sequence.The advantages of this method be can independent one or several specific process in playback system, but due to needing to store All data manipulations cause time and space expense very big, and practicability is weaker, is difficult to embedded real time system.
In addition, there is a kind of execution playback method based on sequence, such methods ensure to reset by special mode The operation order of software systems is consistent with system operation sequence when execution under state, to reach playback error and program Rush the purpose executed.Compared with the method based on content, such methods can greatly reduce time and space expense.At present mostly Several execution playback methods belong to such methods, typically have following several:
The Instant Replay methods that LeBlanc is proposed aim at CREW (Concurrent Reader& Exclusive Write) parallel system fault recurrence.This method is that each shared object adds version number, and per thread is all Journal file is recorded in version number when accessing shared drive object to ensure the certainty of playback time.Although this method energy It is enough to reduce space expense to a certain extent, but a disadvantage is that can be only applied to the unix system for meeting CREW properties.FDR methods Using incremental checkpoint mechanism, interval is reset by the way that program is divided into several, each interval only records this core position more The value stored before new, to realize that the certainty of program is reset, but this method needs the support of special hardware.It is existing These execution playback methods are very huge to the consumption of hardware resource, particularly with embedded real time system, cannot apply at all, Because the hardware resource of embedded real time system is limited, a large amount of log information can not be directly stored;And embedded real-time system The real-time interrupt and task requirement of real-time of system also have many differences with different system, are also needed to when executing playback system and executing Situations such as synchronization and communication between the scheduling and task of consideration task.
In conclusion existing execution playback method, the consumption in time and space is very big, and general applicability is not strong.
Invention content
(1) technical problems to be solved
The technical problem to be solved by the present invention is to how reduce consumption of the program playback in the process for time and space.
(2) technical solution
In order to solve the above technical problem, the present invention provides a kind of application program playback method, the method includes with Lower step:
S1, target machine download the application program of host;
S2, the pitching pile in the application program obtain and upload the execution information of the application program to the host;
S3, point setting breakpoint is occurred in the corresponding event of the application program according to event information;The event information The execution information is analyzed and handled by the host, the event information causes to switch between task Information.
When execution encounters the breakpoint, journey is applied according to switching mission bit stream switching is described for S4, restarting application program The task of sequence realizes that the application program is executed according to former operation order;The switching mission bit stream by the host according to The event information analysis is calculated.
Preferably, it includes obtaining control stream information and acquisition traffic flow information to obtain the execution information;
Wherein, the control stream information is obtained to include acquisition task handover information, obtain synchronous event information and obtain different Walk event information;It is that probe is arranged in scheduling function to realize to obtain the task handover information;Obtain the synchronous event letter Breath is realized for probe is arranged at corresponding function;It is to be exited into function and interruption in interruption to obtain the asynchronous event information Probe is arranged at function to realize;
It includes obtaining the data letter transmitted between externally input data information and acquisition task to obtain the traffic flow information Breath, by the way that setting probe realization at data receiver is occurring.
Preferably, the synchronous event information is obtained to include the acquisition information for obtaining semaphore, obtain the release of semaphore Information, the reception information for obtaining message, the transmission information for obtaining message and the delayed data for obtaining task;Wherein, institute is obtained The release information for stating the acquisition information and signal amount of semaphore is the release letter of the acquisition function and semaphore in semaphore respectively Probe is set at number to realize;The transmission information of the reception information and message that obtain the message is respectively in the reception letter of message Setting probe is realized at number and the transmission function of message;The delayed data for obtaining the task is to be arranged at task delay function Probe is realized.
Preferably, it obtains the timestamp when task handover information includes acquisition event type, the generation of acquisition event, obtain It takes the contextual information of the preceding task of switching and obtains the contextual information of task after switching;
The release information for obtaining the acquisition information and signal amount of the semaphore includes obtaining event type, acquisition event Value, acquisition semaphore number ID, the acquisition semaphore operations of program counter PC when timestamp, acquisition event when generation occur When mission number ID and obtain event counter value;
The transmission information of the reception information and message that obtain the message includes obtaining event type, the generation of acquisition event When timestamp, when obtaining the value of program counter PC when event occurs, obtain message queue number ID, obtaining event generation Mission number ID and acquisition event counter value;
Timestamp, acquisition thing when the delayed data for obtaining the task includes acquisition event type, the generation of acquisition event The value of program counter PC is to obtain and event counter value when part occurs.
Preferably, obtain causing the detailed process of the event information switched between task be:
Timestamp when all events in the execution information occur according to the event for S31, the host into Row sequence;
S32, the information for rejecting the event unrelated with the application program;
S33, the event switched between task will be caused to be stripped out.
Preferably, in the step S4, the event information obtained according to the step S3 by the host is answered described Point setting breakpoint occurs with the event of program.
Preferably, point setting breakpoint occurs in the event of the application program to be completed by debugger.
Preferably, it in institute step S3, by the value of the mission number ID and program counter PC, is compiled in corresponding task At the task of number ID, breakpoint is set at corresponding PC value of program counter.
Preferably, the acquisition process of the switching mission bit stream is:If after synchronous event information or asynchronous event information Face is a task handover information, then this synchronous event or asynchronous event cause task switching, and the application program is held It has gone after the synchronous event or asynchronous event, has sent the switching mission bit stream.
Preferably, in the step S33, the event switched between task is caused to be:Appoint described in one behind the event Business handover information.
A kind of application program playback system, including host and target machine;
The host setting historical analysis device and reproducer;Logger is arranged in the target machine;
The logger is used for the execution information in records application program implementation procedure, and is uploaded to the host;
What the historical analysis device was used to after the execution information is analyzed and handled obtain causing to switch between task Event information;
The reproducer be used for according to the event information the corresponding event of the application program occur a point setting breakpoint, Start that the application program executes again and the application program executes encounter breakpoint again, is analyzed according to the event information Switching mission bit stream is calculated, and is handed down to the target machine.
Preferably, the logger includes that probe is arranged in scheduling function, for obtaining task handover information;
Setting probe at function is exited interrupting into function and interruption, for obtaining asynchronous event information;
Probe is set at the release function for obtaining function and semaphore of semaphore, the acquisition for obtaining semaphore is believed The release information of breath and semaphore;
At the receiver function of message and the transmission function of message be arranged probe, for obtain message reception information and disappear The transmission information of breath;
Probe is set at task delay function, is used for the delayed data of the task.
Preferably, it obtains the timestamp when task handover information includes acquisition event type, the generation of acquisition event, obtain It takes the contextual information of the preceding task of switching and obtains the contextual information of task after switching;
The release information for obtaining the acquisition information and signal amount of the semaphore includes obtaining event type, acquisition event Value, acquisition semaphore number ID, the acquisition semaphore operations of program counter PC when timestamp, acquisition event when generation occur When mission number ID and obtain event counter value;
The transmission information of the reception information and message that obtain the message includes obtaining event type, the generation of acquisition event When timestamp, when obtaining the value of program counter PC when event occurs, obtain message queue number ID, obtaining event generation Mission number ID and acquisition event counter value;
Timestamp, acquisition thing when the delayed data for obtaining the task includes acquisition event type, the generation of acquisition event The value of program counter PC is to obtain and event counter value when part occurs.
(3) advantageous effect
The present invention provides a kind of application program playback method and system, the present invention is recorded by pitching pile probe using journey The execution information of sequence, and the execution information of application program is uploaded to host automatically and is analyzed and is handled, in program playback Stage executes to control program according to original execution state of program by debugger, to realize the playback of application program, this Invention will greatly reduce the consumption of time and space, can be used in all systems such as embedded real time system;
Since the technical solution proposed in the present invention does not need the support of special hardware and software, the original of the program Reason and thought have versatility and portability, can be applied in most of hardware platform and software systems, it is particularly possible to It is applied in embedded real time system, the debugging pressure of application developer can be alleviated to a certain extent.
Description of the drawings
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with Obtain other attached drawings according to these attached drawings.
Fig. 1 is a kind of flow chart of application program playback method of the present invention;
Fig. 2 is a kind of flow chart of application program playback method of the preferred embodiment of the present invention;
Fig. 3 is the acquisition flow chart of task handover information;
Fig. 4 is the acquisition flow chart of synchronous event information;
Fig. 5 is the acquisition flow chart of asynchronous event information;
Fig. 6 be obtain cause task between the flow chart of the event information that switches;
Fig. 7 is breakpoint process chart;
Fig. 8 is a kind of application program playback system structural schematic diagram of the present invention.
Specific implementation mode
Present invention is further described in detail with reference to the accompanying drawings and examples.Following embodiment is for illustrating this hair It is bright, but cannot be used for limiting the scope of the invention.
Fig. 1 is a kind of flow chart of application program playback method of the present invention;It the described method comprises the following steps:
S1, target machine download the application program of host;
S2, the pitching pile in the application program obtain and upload the execution information of the application program to the host;
S3, point setting breakpoint is occurred in the corresponding event of the application program according to event information;The event information The execution information is analyzed and handled by the host, the event information causes to switch between task Information.
When execution encounters the breakpoint, journey is applied according to switching mission bit stream switching is described for S4, restarting application program The task of sequence realizes that the application program is executed according to former operation order;The switching mission bit stream by the host according to The event information analysis is calculated.
The method of the present invention by pitching pile probe come the execution information of records application program, and holding application program automatically Row information is uploaded to host and is analyzed and handled, and program is controlled according to program by debugger in the program playback stage Original execution state executes, and to realize the playback of application program, method of the invention will greatly reduce time and space Consumption can be used in all systems such as embedded real time system.
Preferably, it includes obtaining control stream information and acquisition traffic flow information to obtain the execution information;Wherein, control stream Information includes task handover information, synchronous event information and asynchronous event information;The task handover information is in scheduling function Interior setting probe obtains information;The synchronous event information is that probe is arranged at corresponding function to obtain information;It is described Asynchronous event information is to exit at function that probe is arranged to obtain information into function and interruption in interruption;The traffic flow information Including the data information transmitted between externally input data information and task, by the way that setting probe reality at data receiver is occurring Existing, the traffic flow information is saved in file, and when use directly reads out from file.
The synchronous event information include the acquisition information of semaphore, the release information of semaphore, the reception information of message, The transmission information of message and the delayed data of task;Wherein, the release information of the acquisition information and signal amount of the semaphore Information is obtained for probe is arranged at the release function of the acquisition function of semaphore and semaphore respectively;The reception of the message Information, the transmission information of message are that probe is arranged at the transmission function for receiving function and message of message respectively to obtain letter Breath;The delayed data of the task is that probe is arranged at task delay function to obtain information.
Task before timestamp timestamp, switching when the task handover information includes event type, event generation The contextual information of task after contextual information and switching.Fig. 3 is the acquisition flow chart of task handover information.It can from Fig. 3 To see, the work first in processing work queue after being disposed, finds the task of highest priority from task queue, Then judge whether work queue is empty, is continued with if it is not, then returning to work queue, otherwise by being arranged in scheduling function Probe carrys out logger task handover information, and loading tasks execute.
Time when the release information of the acquisition information and signal amount of the semaphore includes event type, event occurs Mission number ID when stabbing timestamp, event generation when the value of program counter PC, semaphore number ID, semaphore operations And event counter value.When the reception information of the message and the transmission information of message include event type, event generation Mission number ID when timestamp timestamp, event occur when the value of program counter PC, message queue number ID, operation And event counter value.Timestamp timestamp, thing when the delayed data of the task includes event type, event generation The value and event counter value of program counter PC when part occurs.Fig. 4 is the acquisition flow chart of synchronous event information, from Fig. 4 Find out, obtains current PC value first, then event counter value is allowed to add 1, by the corresponding synchronous event information of pitching pile probe records, Dependent event is handled.
Program meter when timestamp timestamp, event when asynchronous event information includes event type, event generation occur The value of number device PC, Fig. 5 are the acquisition flow chart of asynchronous event information, it is seen from figure 5 that, after interrupt event enters, by interrupt into Enter the probe that function is exited with interruption at function probe to obtain information.
Preferably, obtain causing the detailed process of the event information switched between task be, as shown in Figure 6:
S31, the host send out all events in the execution information (initial log file) according to the event Timestamp when raw is ranked up;
S32, the information for rejecting the event unrelated with the application program, that is, reject and the relevant information of system task;
S33, the event switched between task will be caused to be stripped out, that is, rejects the event information for not causing task to switch.
In above-mentioned steps S1, target machine and host are first turned on, connection is established between host and target machine, then will Application program is loaded into target machine.
In above-mentioned steps S2, the totality of the probe of pitching pile setting constitutes logger;Before executing application, first by Host open record device, the logger of control targe machine is opened and initialization, then executing application again.Logger is used In the execution for the first time of application program, the operating status of essential record target generator terminal records application program, including the switching of task are suitable Control stream when the access sequence of sequence and data, i.e. application program are run and data flow;During program executes, logger The execution information of record is recorded to the buffer area of target machine first, is taken after application program is finished, then by buffer area Go out execution information (execution journal) and carry out daily record upload, after daily record uploads, daily record preservation is carried out in host's generator terminal.
In above-mentioned steps S3, after the daily record preserves, letter is executed by described by the historical analysis device of the host Breath (execution journal) is analyzed and is handled, that is, carries out log analysis, the time-based flow of event sequence for the program that is applied (causing the event information switched between task), for instructing the application program to reset.Pass through the mission number ID and program Breakpoint is arranged at corresponding PC value of program counter at the task of corresponding mission number ID in the value of counter PC.
In above-mentioned steps S4, by the reproducer of the host according to the thing for causing to switch between task obtained in step S3 Part information (log analysis result) is controlled, and breakpoint is arranged at the corresponding PC of the application program of target machine, completes to reset journey The initialization (i.e. reproducer reconstruction tasks) of program process.Point setting breakpoint occurs for the event of the application program of the target machine by adjusting Device is tried to complete.It is described switching mission bit stream acquisition process be:If being one behind synchronous event information or asynchronous event information Task handover information described in item, then this synchronous event or asynchronous event cause task switching, the application program executed institute After stating synchronous event or asynchronous event, the switching mission bit stream is sent.
In above-mentioned steps S5, the application program for starting target machine by the reproducer executes (reproducer recovery tasks again Execute), after program execution encounters breakpoint, by reproducer according to the event information for causing to switch between task obtained in step S3 Analysis result (log analysis result), obtain switching mission bit stream, to program execute carry out respective handling (judge whether to Task switches, if then switching to corresponding task, otherwise switches without task), the program of control targe machine executes, until Program execution terminates.In playback phase by debugger (debugger in developing instrument) setting breakpoint and to control using journey Sequence is executed according to the original execution state of program, to realize the playback of application program;It can be by the hang-up of control task and extensive It is multiple, so that application program is executed according to former execution sequence, to realize the playback of program, as shown in Figure 7.
In above-mentioned steps S31, the time flow of event has been obtained by sequence.
In above-mentioned steps S32, since execution information is to record the execution information of all tasks, and that pays close attention to only applies journey All tasks in sequence, therefore to reject these information unrelated with application task.
In above-mentioned steps S33, the event information for being possible to cause task to switch, but these are had recorded in execution information Event not necessarily really can cause task to switch, it is therefore desirable to and really the event switched between task is caused to be stripped out those, To instruct the playback of application program.The event switched between task is caused to be:A task switching behind the event Information, as long as because event causes switching, a followed by task behind the event information in execution information Handover information.
This method is recorded and is tracked by the implementation procedure to destination application, i.e., mainly by pitching pile probe come The operations such as communication and I/O between the task scheduling of record system, task, then according to record under identical input condition Execution information so that the operating condition of target program is reproduced.For embedded real time system, control stream, which needs to record, answers With the transfer sequence of task in program (Task) and influence each event of task switching, as semaphore acquisition and release, The asynchronous events such as synchronous events and clock interrupt such as the reception and transmission, the delay of task of message.
The method of the present invention establishes framework in host and target machine, and wherein the unlatching of the logger of target machine is by host It controls open record device and completes, the execution information is analyzed and handled by the host, and breakpoint is arranged by host Afterwards, then breakpoint is arranged in control targe machine, in the application program implementation procedure of target machine, breakpoint is encountered, by host according to Execution information is handled, the task switching of control targe machine application program, a preferred embodiment of method of the invention Flow chart is as shown in Figure 2.
The invention also discloses a kind of application program playback systems, as shown in figure 8, including host and target machine;It is described Historical analysis device and reproducer is arranged in host;Logger is arranged in the target machine;The logger is used for records application program Execution information in implementation procedure, and it is uploaded to the host;The historical analysis device is for carrying out the execution information The event information for causing to switch between task is obtained after analysis and processing;The reproducer is used for according to the event information described The corresponding event of application program occur a point setting breakpoint, start the application program execute again and the application program again Execution encounters breakpoint, switching mission bit stream is calculated according to event information analysis, and be handed down to the target machine.
The logger includes that probe is arranged in scheduling function, for obtaining task handover information;Enter letter interrupting Setting probe at function is exited in number and interruption, for obtaining asynchronous event information;Function and semaphore are obtained in semaphore It discharges and probe, the release information of the acquisition information and signal amount for obtaining semaphore is set at function;In the reception letter of message Probe, the transmission information of reception information and message for obtaining message are set at number and the transmission function of message;Prolong in task When function at be arranged probe, be used for the task delayed data.Obtain the task handover information include obtain event type, The context of task is believed after the contextual information of timestamp, the preceding task of acquisition switching when acquisition event occurs and acquisition switching Breath;The release information for obtaining the acquisition information and signal amount of the semaphore includes obtaining event type, the generation of acquisition event When timestamp, when obtaining the value of program counter PC when event occurs, obtaining semaphore number ID, acquisition semaphore operations Mission number ID and acquisition event counter value;The transmission information of the reception information and message that obtain the message includes obtaining The value, acquisition message queue volume of program counter PC when timestamp, acquisition event when event type, acquisition event occur occur Number ID, it obtains mission number ID when event occurs and obtains event counter value;The delayed data for obtaining the task includes Obtain event type, when timestamp when acquisition event occurs, acquisition event occur program counter PC value to obtain and thing Part count value.
The method that the system of the present invention buys that for realizing this law.
The invention does not need the support of special hardware and software, is realized using journey on the basis of existing development environment Sequence executes playback, effectively reduces the consumption in time and space, especially greatly reduces disappearing for the time and space in target machine Consumption.
Embodiment of above is merely to illustrate the present invention rather than limitation of the present invention.Although with reference to embodiment to this hair It is bright to be described in detail, it will be understood by those of ordinary skill in the art that, to technical scheme of the present invention carry out it is various combination, Modification or equivalent replacement, without departure from the spirit and scope of technical solution of the present invention, the right that should all cover in the present invention is wanted It asks in range.

Claims (11)

1. a kind of application program playback method, which is characterized in that the described method comprises the following steps:
S1, target machine download the application program of host;
S2, the pitching pile in the application program obtain and upload the execution information of the application program to the host;
S3, point setting breakpoint is occurred in the corresponding event of the application program according to event information;The event information is by institute State what host was analyzed and handled to the execution information, the event information is the letter switched between causing task Breath;
S4, restarting application program when execution encounters the breakpoint, switch the application program according to switching mission bit stream Task realizes that the application program is executed according to former operation order;The switching mission bit stream is by the host according to Event information analysis is calculated;
Wherein, obtain causing the detailed process of the event information switched between task be:
Timestamp when all events in the execution information occur according to the event for S31, the host is arranged Sequence;
S32, the information for rejecting the event unrelated with the application program;
S33, the event switched between task will be caused to be stripped out.
2. according to the method described in claim 1, it is characterized in that, obtain the execution information include obtain control stream information and Obtain traffic flow information;
Wherein, the control stream information is obtained to include acquisition task handover information, obtain synchronous event information and obtain asynchronous thing Part information;It is that probe is arranged in scheduling function to realize to obtain the task handover information;Obtaining the synchronous event information is Probe is arranged at corresponding function to realize;It is to exit function into function and interruption in interruption to obtain the asynchronous event information Place's setting probe is realized;
It includes obtaining the data information transmitted between externally input data information and acquisition task to obtain the traffic flow information, is led to It crosses and setting probe realization at data receiver is occurring.
3. according to the method described in claim 2, it is characterized in that, it includes obtaining semaphore to obtain the synchronous event information Information, the release information for obtaining semaphore, the reception information for obtaining message, the transmission information for obtaining message and acquisition is obtained to appoint The delayed data of business;Wherein, the release information for obtaining the acquisition information and signal amount of the semaphore is respectively in semaphore It obtains and probe is set at the release function of function and semaphore to realize;Obtain reception information and the transmission of message of the message Information is that probe is arranged at the receiver function of message and the transmission function of message respectively to realize;Obtain the delay letter of the task Breath is realized for probe is arranged at task delay function.
4. according to the method described in claim 3, it is characterized in that, it includes acquisition event class to obtain the task handover information Type, obtain event occur when timestamp, obtain switching before task contextual information and obtain switching after task up and down Literary information;
The release information for obtaining the acquisition information and signal amount of the semaphore includes obtaining event type, the generation of acquisition event When timestamp, when obtaining the value of program counter PC when event occurs, obtaining semaphore number ID, acquisition semaphore operations Mission number ID and acquisition event counter value;
The transmission information of the reception information and message that obtain the message includes when obtaining event type, the generation of acquisition event Timestamp obtains the value of program counter PC when event occurs, obtains message queue number ID, obtaining task when event occurs Number ID and acquisition event counter value;
The delayed data for obtaining the task includes timestamp, the acquisition event hair when obtaining event type, the generation of acquisition event The value of program counter PC is to obtain and event counter value when raw.
5. according to the method described in claim 1, it is characterized in that, in the step S4, by the host according to the step In the event of the application program point setting breakpoint occurs for the event information that rapid S3 is obtained, control debugger.
6. according to the method described in claim 5, it is characterized in that, in institute step S3, pass through the mission number ID and journey Breakpoint is arranged at corresponding PC value of program counter at the task of corresponding mission number ID in the value of sequence counter PC.
7. according to the method described in claim 6, it is characterized in that, in the step S33, cause the event switched between task For:It is a task handover information behind the event.
8. the method according to the description of claim 7 is characterized in that the acquisition process of the switching mission bit stream is:If synchronous It is a task handover information behind event information or asynchronous event information, then this synchronous event or asynchronous event cause Task switching, after the application program has executed the synchronous event or asynchronous event, sends the switching mission bit stream.
9. a kind of application program playback system, which is characterized in that including host and target machine;
The host setting historical analysis device and reproducer;Logger is arranged in the target machine;
The logger is used for the execution information in records application program implementation procedure, and is uploaded to the host;
The historical analysis device after the execution information is analyzed and handled for obtaining the event for causing to switch between task Information;
The reproducer is used to that point setting breakpoint, startup to occur in the corresponding event of the application program according to the event information The application program executes again and the application program executes encounter breakpoint again, is analyzed and is calculated according to the event information Switching mission bit stream is obtained, and is handed down to the target machine;
Wherein, obtain causing the detailed process of the event information switched between task be:
Timestamp when all events in the execution information occur the host according to the event is ranked up;
Reject the information of the event unrelated with the application program;
The event switched between task will be caused to be stripped out.
10. system according to claim 9, which is characterized in that the logger includes that probe is arranged in scheduling function, For obtaining task handover information;
Setting probe at function is exited interrupting into function and interruption, for obtaining asynchronous event information;
Probe is set at the release function for obtaining function and semaphore of semaphore, acquisition information for obtaining semaphore and The release information of semaphore;
Probe is set at the receiver function of message and the transmission function of message, the reception information and message for obtaining message Send information;
Probe is set at task delay function, is used for the delayed data of the task.
11. system according to claim 10, which is characterized in that it includes acquisition event class to obtain the task handover information Type, obtain event occur when timestamp, obtain switching before task contextual information and obtain switching after task up and down Literary information;
The release information for obtaining the acquisition information and signal amount of the semaphore includes obtaining event type, the generation of acquisition event When timestamp, when obtaining the value of program counter PC when event occurs, obtaining semaphore number ID, acquisition semaphore operations Mission number ID and acquisition event counter value;
The transmission information of the reception information and message that obtain the message includes when obtaining event type, the generation of acquisition event Timestamp obtains the value of program counter PC when event occurs, obtains message queue number ID, obtaining task when event occurs Number ID and acquisition event counter value;
The delayed data for obtaining the task includes timestamp, the acquisition event hair when obtaining event type, the generation of acquisition event The value of program counter PC is to obtain and event counter value when raw.
CN201410693931.4A 2014-11-26 2014-11-26 A kind of application program playback method and system Active CN104461521B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410693931.4A CN104461521B (en) 2014-11-26 2014-11-26 A kind of application program playback method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410693931.4A CN104461521B (en) 2014-11-26 2014-11-26 A kind of application program playback method and system

Publications (2)

Publication Number Publication Date
CN104461521A CN104461521A (en) 2015-03-25
CN104461521B true CN104461521B (en) 2018-11-13

Family

ID=52907632

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410693931.4A Active CN104461521B (en) 2014-11-26 2014-11-26 A kind of application program playback method and system

Country Status (1)

Country Link
CN (1) CN104461521B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105260312B (en) * 2015-10-26 2018-04-06 北京航空航天大学 A kind of adjustment method of multinuclear real time system application data contention mistake
CN106888133B (en) * 2015-12-15 2019-11-15 中国电信股份有限公司 Using speed-measuring method and device
CN107515724B (en) * 2016-06-16 2021-04-02 伊姆西Ip控股有限责任公司 Method and apparatus for reproducing input and output of storage system
CN106293922A (en) * 2016-08-16 2017-01-04 天津西瑞尔信息工程有限公司 Asynchronous task processing method and system
CN108089971B (en) * 2017-11-27 2021-03-16 上海华元创信软件有限公司 Log service method and system based on embedded real-time system
CN108196963B (en) * 2017-12-29 2021-11-16 中国电力科学研究院有限公司 Deterministic replay method based on adaptive release
CN108595313B (en) * 2018-03-08 2021-12-10 北京三快在线科技有限公司 Log generation method and device of application program, electronic equipment and storage medium
CN109766170A (en) * 2018-11-21 2019-05-17 惠州Tcl移动通信有限公司 The dynamic method for restarting of memory, mobile terminal and its application program
CN110457121B (en) * 2019-07-26 2022-02-01 中国人民解放军军事科学院国防科技创新研究院 Probe method and device supporting dynamic scheduling of user-mode tasks
CN113377379B (en) * 2021-08-12 2021-11-16 四川腾盾科技有限公司 Simulator instruction instrumentation-based operating system information statistical method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101067798A (en) * 2007-06-14 2007-11-07 华南理工大学 Dynamic probe method and application in embedded system thereof
CN101103337A (en) * 2005-01-21 2008-01-09 国际商业机器公司 Predictive method for managing, logging or replaying non-deterministic operations within the execution of an application process
CN102096634A (en) * 2010-12-31 2011-06-15 中国航空工业集团公司第六三一研究所 Airborne distributed node debugging method based on event level
CN102158355A (en) * 2011-03-11 2011-08-17 广州蓝科科技股份有限公司 Log event correlation analysis method and device capable of concurrent and interrupted analysis

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101103337A (en) * 2005-01-21 2008-01-09 国际商业机器公司 Predictive method for managing, logging or replaying non-deterministic operations within the execution of an application process
CN101067798A (en) * 2007-06-14 2007-11-07 华南理工大学 Dynamic probe method and application in embedded system thereof
CN102096634A (en) * 2010-12-31 2011-06-15 中国航空工业集团公司第六三一研究所 Airborne distributed node debugging method based on event level
CN102158355A (en) * 2011-03-11 2011-08-17 广州蓝科科技股份有限公司 Log event correlation analysis method and device capable of concurrent and interrupted analysis

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
分布式系统监视器的设计与实现;张旻等;《微处理机》;20100228(第1期);第42-44页 *
基于重放的并发程序调试技术研究;左赋斌;《中国优秀硕士学位论文全文数据库 信息科技辑》;20070715;第I138-37页 *

Also Published As

Publication number Publication date
CN104461521A (en) 2015-03-25

Similar Documents

Publication Publication Date Title
CN104461521B (en) A kind of application program playback method and system
EP2956861B1 (en) Method and system for detecting concurrency programming errors in kernel modules and device drivers
US20190227917A1 (en) Adaptive system for mobile device testing
US9483383B2 (en) Injecting faults at select execution points of distributed applications
CN105209925B (en) For debugging the computer implemented method and system of the program of automation devices test
JP4295775B2 (en) GUI test support system and application program for test support
US9355002B2 (en) Capturing trace information using annotated trace output
CN102147756A (en) Methods and systems for testing terminal
CN108156181A (en) A kind of vulnerability detection method and its vulnerability scanning system based on the association asynchronous IO of journey
TWI566090B (en) Debugging firmware / software to produce tracking systems and methods, recording media and computer program products
CN104699591A (en) Reappearing method and device of test scenes
US10055331B2 (en) Method and apparatus for automatic cross-system program debugging
CN102279768A (en) Simulation apparatus, simulation program and simulation method
KR20180072860A (en) Self-diagnosis and automatic diagnostic data collection of device driver detection errors
KR20080052341A (en) Automatic-testing system and method for embedded system software and test scenario composing method
CN103036947B (en) Virtual machine transferring method based on kernel-based virtual machine (KVM) and virtual machine transferring method based on KVM
CN101169758A (en) Linux operation system course dispatching information monitoring method
CN108984380A (en) A kind of server test method, device and medium based on linux system
CN106462139B (en) Programable display and drawing practice
US10831634B1 (en) Replication of user interface events
CN110209557A (en) User's operation records restoring method, device, equipment and readable storage medium storing program for executing
CN108718253A (en) A kind of positioning problems method and device
CN109144844A (en) Method for tracing, device, equipment and machine readable media
CN109995931A (en) It is a kind of to realize the method and device called automatically
CN111090575B (en) Test method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
EXSB Decision made by sipo to initiate substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant