CN111782320B - GUI interface method for debugging cache consistency C case and electronic equipment - Google Patents

GUI interface method for debugging cache consistency C case and electronic equipment Download PDF

Info

Publication number
CN111782320B
CN111782320B CN202010582436.1A CN202010582436A CN111782320B CN 111782320 B CN111782320 B CN 111782320B CN 202010582436 A CN202010582436 A CN 202010582436A CN 111782320 B CN111782320 B CN 111782320B
Authority
CN
China
Prior art keywords
interface
key
debugging
gui
scene
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
CN202010582436.1A
Other languages
Chinese (zh)
Other versions
CN111782320A (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.)
Shanghai Saifang Technology Co ltd
Original Assignee
Shanghai Saifang Technology Co ltd
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 Shanghai Saifang Technology Co ltd filed Critical Shanghai Saifang Technology Co ltd
Priority to CN202010582436.1A priority Critical patent/CN111782320B/en
Publication of CN111782320A publication Critical patent/CN111782320A/en
Application granted granted Critical
Publication of CN111782320B publication Critical patent/CN111782320B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3664Environments for testing or debugging software

Abstract

The invention relates to the technical field of computer programs, in particular to a GUI (graphical user interface) method and electronic equipment for debugging a cache consistency C case, which comprises the following steps of: s1, generating a cache consistency mixed scene, and outputting the scene to a yaml file in a specific format; s2, running a gui.py script, and analyzing the generated yaml file; s3, initializing a display interface, creating a scene window, an information window and a command window, and inputting through a monitoring key; s4, updating the GUI interface through key information collection; s5, judging whether the key information collection updating GUI interface needs to update the size of the interface or not; s6, if the interface size needs to be updated, returning to S3; if the interface size does not need to be updated, quitting; s7, if the monitoring is required to be continued when quitting, returning to the monitoring key input of S3 to continue monitoring, otherwise selecting ESC, and ending the quitting debugging, wherein the method is based on GUI interface debugging, same scene, highlight display and clear distribution; the target addresses are automatically screened, the printing is carried out in sequence, the venation is clear, and debug is facilitated.

Description

GUI interface method for debugging cache consistency C case and electronic equipment
Technical Field
The invention relates to the technical field of computer programs, in particular to a GUI (graphical user interface) method and electronic equipment for debugging a cache consistency C case.
Background
Manual debugg is time-consuming and labor-consuming; (generally, for C program emulation, only which address is wrong is reported, at this time, the C program needs to be manually searched to find out the address which is accessed by the core and the sequence of the addresses being accessed; sometimes, the address is an intermediate address accessed by a certain address, so that manual searching is more laborious, a slightly larger C program is troublesome, and the C program is overwhelming when a plurality of cores access a program at the same time).
Disclosure of Invention
Aiming at the defects of the prior art, the invention discloses a GUI interface method and electronic equipment for debugging a cache consistency C case, which are used for solving the problems that the test case scene generated automatically and randomly is complex, the number of memory addresses is large, and the debugging process is complex when the case fails.
The invention is realized by the following technical scheme:
in a first aspect, the invention discloses a GUI interface method for debugging a cache consistency C case, which comprises the following steps:
s1, generating a cache consistency mixed scene, and outputting the scene to a yaml file in a specific format;
s2, running a gui.py script, and analyzing the generated yaml file;
s3, initializing a display interface, creating a scene window, an information window and a command window, and inputting through a monitoring key;
s4, updating the GUI interface through key information collection;
s5, judging whether the key information collection updating GUI interface needs to update the size of the interface or not;
s6, if the interface size needs to be updated, returning to S3; if the interface size does not need to be updated, quitting;
and S7, if the monitoring is required to be continued when the terminal exits, returning to the monitoring key input of S3 to continue the monitoring, otherwise, selecting the ESC, and exiting the debugging and finishing.
Further, the monitor key input includes mouse action monitor, up and down left and right key monitor, alphanumeric key monitor, delete key/enter key/esc key monitor, and resize interface action monitor.
Furthermore, in S3, a scene action box corresponding to the window is clicked, all action boxes belonging to the scene are highlighted at the same time, and the specific information of the action is displayed in the information window.
Furthermore, in S3, "find < address >" is input into the command window, the corresponding access information of the address is listed in the information window, and all the action blocks accessing the address are highlighted.
Further, the scene action box can be used for horizontally and vertically scrolling and displaying the action boxes which do not appear, and the GUI interface can be dynamically zoomed.
Furthermore, the method circularly monitors the key actions and updates the GUI interface according to the key actions.
In a second aspect, the present invention discloses an electronic device, which includes a processor and a memory storing an execution instruction, wherein when the processor executes the execution instruction stored in the memory, the processor executes the GUI interface method for debugging the cache consistency C case according to the first aspect.
The beneficial effects of the invention are as follows:
the invention monitors the key action circularly, updates the GUI interface according to the key action, and is based on GUI interface debugging, the same scene, high-brightness display and clear distribution; the target addresses are automatically screened, the printing is carried out in sequence, the venation is clear, and debug is facilitated.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic diagram of a GUI interface method for debugging a cache consistency C use case;
FIG. 2 is a graphical interface of the final result of the embodiment of the present invention
FIG. 3 is an interface diagram of clicking a corresponding scene action box according to an embodiment of the present invention;
FIG. 4 is an interface diagram of the embodiment of the present invention when "find < address > is entered in the command window;
FIG. 5 is an interface diagram for scrolling laterally and vertically in accordance with an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example 1
The embodiment discloses a GUI interface method for debugging a cache consistency C case as shown in fig. 1, which includes the following steps:
s1, generating a cache consistency mixed scene, and outputting the scene to a yaml file in a specific format;
s2, running a gui.py script, and analyzing the generated yaml file;
s3, initializing a display interface, creating a scene window, an information window and a command window, and inputting through a monitoring key;
s4, updating the GUI interface through key information collection;
s5, judging whether the key information collection updating GUI interface needs to update the size of the interface or not;
s6, if the interface size needs to be updated, returning to S3; if the interface size does not need to be updated, quitting;
and S7, if the monitoring is required to be continued when the terminal exits, returning to the monitoring key input of S3 to continue monitoring, otherwise, selecting ESC, and exiting the debugging and ending.
Monitoring key inputs includes mouse action monitoring, up and down left and right key monitoring, alphanumeric key monitoring, delete/enter/esc monitoring, and resize interface action monitoring.
And clicking the scene action boxes corresponding to the windows, highlighting all the action boxes belonging to the scene simultaneously, and displaying the specific information of the action in the information window.
When "find < address > is entered in the command window, the corresponding access information for the address is listed in the information window, and all the action boxes that have accessed the address are highlighted.
The scene action box may scroll horizontally and vertically to display the action boxes that do not appear and may dynamically zoom the GUI interface.
The embodiment circularly monitors the key actions, updates the GUI according to the key actions, and is based on GUI debugging, same scene, high-brightness display and clear distribution; the target addresses are automatically screened, the printing is carried out in sequence, the venation is clear, and debug is facilitated.
Example 2
The embodiment discloses a method for debugging a GUI (graphical user interface):
1. outputting the generated cache consistency mixed scene to a yaml file in a certain format;
2. py script is run, the generated yaml file is analyzed, the key actions are circularly monitored, and the GUI interface is updated according to the key actions;
3. and (5) the debugging is finished, and the ESC exits.
The final result is shown in fig. 2:
contains 3 windows: a scene window, a detailed information window and a command window;
clicking the corresponding scene action box, all the action boxes belonging to the scene are highlighted simultaneously, and the specific information of the action is displayed in the information window (see fig. 3 in particular).
When "find < address > is input in the command window, the corresponding access information of the address is listed in the information window, and simultaneously, all the action boxes accessing the address are highlighted, so that the readability and the debugging performance of the program access process are greatly improved (see fig. 4 in particular).
Lateral and vertical scrolling is supported to display the action boxes that do not appear, while a dynamic zooming GUI interface is supported (see in particular fig. 5).
According to the embodiment, complex C program debugging is converted into clear-organized GUI interface debugging, the GUI interface can be debugged in an auxiliary mode, and the method is convenient and fast.
Example 3
The embodiment discloses an electronic device, which comprises a processor and a memory, wherein the memory stores an execution instruction, and when the processor executes the execution instruction stored in the memory, the processor executes the GUI interface method for debugging the cache consistency C case of the embodiment 1.
In conclusion, the invention circularly monitors the key actions, updates the GUI interface according to the key actions, and based on GUI interface debugging, the same scene is highlighted and clearly distributed; the target addresses are automatically screened, the printing is carried out in sequence, the venation is clear, and debug is facilitated.
The above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (5)

1. A GUI interface method for debugging cache consistency C use cases is characterized by comprising the following steps:
s1, generating a cache consistency mixed scene, and outputting the scene to a yaml file in a specific format;
s2, running a gui.py script, and analyzing the generated yaml file;
s3, initializing a display interface, creating a scene window, an information window and a command window, clicking a scene action frame corresponding to the window through monitoring key input, simultaneously highlighting all action frames belonging to the scene, simultaneously displaying specific information of the action in the information window, inputting 'find < address >' in the command window, listing access information of the corresponding address in the information window, and simultaneously highlighting all action frames accessing the address;
s4, updating the GUI interface through key information collection;
s5, judging whether the key information collection updating GUI interface needs to update the size of the interface or not;
s6, if the interface size needs to be updated, returning to S3; if the interface size does not need to be updated, quitting;
and S7, if the monitoring is required to be continued when the terminal exits, returning to the monitoring key input of S3 to continue monitoring, otherwise, selecting ESC, and exiting the debugging and ending.
2. The GUI interface method for debugging cache consistency C use cases according to claim 1, wherein said monitor key inputs comprise mouse action monitor, up, down, left, right key monitor, alphanumeric key monitor, delete key/enter key/esc key monitor, and resize interface action monitor.
3. The GUI interface method for debugging cache consistency C use cases according to claim 1, wherein said scene action boxes can horizontally and vertically scroll to display the action boxes which do not appear, and can dynamically zoom the GUI interface.
4. The GUI interface method for debugging cache consistency C use case according to claim 1, wherein said method monitors key actions cyclically and updates GUI interface according to key actions.
5. An electronic device comprising a processor and a memory storing execution instructions, the processor executing the GUI interface method for debugging a cache coherence C-use case of any one of claims 1 to 4 when the processor executes the execution instructions stored by the memory.
CN202010582436.1A 2020-06-23 2020-06-23 GUI interface method for debugging cache consistency C case and electronic equipment Active CN111782320B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010582436.1A CN111782320B (en) 2020-06-23 2020-06-23 GUI interface method for debugging cache consistency C case and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010582436.1A CN111782320B (en) 2020-06-23 2020-06-23 GUI interface method for debugging cache consistency C case and electronic equipment

Publications (2)

Publication Number Publication Date
CN111782320A CN111782320A (en) 2020-10-16
CN111782320B true CN111782320B (en) 2023-03-24

Family

ID=72756075

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010582436.1A Active CN111782320B (en) 2020-06-23 2020-06-23 GUI interface method for debugging cache consistency C case and electronic equipment

Country Status (1)

Country Link
CN (1) CN111782320B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0992904B1 (en) * 1998-10-06 2010-06-09 Texas Instruments Inc. Cache coherence during emulation
CN108984548A (en) * 2017-05-31 2018-12-11 腾讯科技(深圳)有限公司 Content of pages caching method and device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8893087B2 (en) * 2011-08-08 2014-11-18 Ca, Inc. Automating functionality test cases
CN102880467B (en) * 2012-09-05 2016-06-08 无锡江南计算技术研究所 Cache coherence protocol verification method and multi-core processor system
CN103049384A (en) * 2012-12-29 2013-04-17 中国科学院深圳先进技术研究院 Automatic generating frame of multi-core-based multithread limit energy consumption testing source program
CN107092558A (en) * 2017-04-12 2017-08-25 东华大学 A kind of cli command set automatization test system and method
CN109213641B (en) * 2017-06-29 2021-10-26 展讯通信(上海)有限公司 Cache consistency detection system and method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0992904B1 (en) * 1998-10-06 2010-06-09 Texas Instruments Inc. Cache coherence during emulation
CN108984548A (en) * 2017-05-31 2018-12-11 腾讯科技(深圳)有限公司 Content of pages caching method and device

Also Published As

Publication number Publication date
CN111782320A (en) 2020-10-16

Similar Documents

Publication Publication Date Title
JP6430037B2 (en) Debugging support apparatus and debugging support method
WO2018174365A1 (en) Method for visualizing chart of data table
CN107766310B (en) Grid cell editing method and device
US20090254866A1 (en) Method and system for displaying a multitude of objects on a display
CN111580912A (en) Display method and storage medium for multi-level structure resource group
CN112612436A (en) Screen projection switching method, device, equipment and storage medium
US8205160B2 (en) Graphical user interface for multi-frame presentation
CN111782320B (en) GUI interface method for debugging cache consistency C case and electronic equipment
CN114615160A (en) Real-time display and early warning method and system for monitoring state of machine room server
US20150199262A1 (en) Runtime code visualization
US7890444B2 (en) Visualization of data availability and risk
CN111198908B (en) Display method and device of power grid asset graph, storage medium and terminal
CN111460235A (en) Atlas data processing method, device, equipment and storage medium
US7003761B2 (en) Multi-process display method in debugger system
JP2017146729A (en) Information processing device, operation support method, and operation support program
CN115329150A (en) Method and device for generating search condition tree, electronic equipment and storage medium
WO2021121130A1 (en) Method and apparatus for information collection, computer device, and storage medium
CN109688025B (en) Test monitoring method, device, terminal and storage medium based on digital KVM
CN114816184A (en) Display method, device, equipment and storage medium of operation control
CN111143206A (en) Data acquisition method and device, electronic equipment and storage medium
US11215963B2 (en) Tracing apparatus and programmable controller
CN111949248A (en) Server connection method and terminal equipment
CN112883446B (en) Set-up diagram screening method, device, equipment and storage medium
WO2016139805A1 (en) Programmable logic controller engineering tool and programmable logic controller engineering tool program
CN111831319B (en) Method, device, equipment and storage medium for posterior difference data

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant