CN116339795A - Thermal overload method and related equipment - Google Patents

Thermal overload method and related equipment Download PDF

Info

Publication number
CN116339795A
CN116339795A CN202310098728.1A CN202310098728A CN116339795A CN 116339795 A CN116339795 A CN 116339795A CN 202310098728 A CN202310098728 A CN 202310098728A CN 116339795 A CN116339795 A CN 116339795A
Authority
CN
China
Prior art keywords
code file
source code
program
file
function value
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.)
Pending
Application number
CN202310098728.1A
Other languages
Chinese (zh)
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.)
Newborn Town Network Technology Beijing Co ltd
Original Assignee
Newborn Town Network Technology Beijing 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 Newborn Town Network Technology Beijing Co ltd filed Critical Newborn Town Network Technology Beijing Co ltd
Priority to CN202310098728.1A priority Critical patent/CN116339795A/en
Publication of CN116339795A publication Critical patent/CN116339795A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/656Updates while running
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding
    • G06F8/447Target code generation
    • 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/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application provides a thermal reloading method and related equipment. The method comprises the following steps: acquiring a source code file of a program; compiling to obtain a corresponding hot reload code file in response to the modification operation of the source code file; updating the source code file based on the hot reload code file to obtain a new code file; and calling the new code file to update the program. According to the method and the device for dynamically loading the modified code part, the hot reloading file is generated based on the modification operation of the code file, the hot reloading file can be utilized to dynamically load the modified code part when the program runs, the program is not required to be restarted, the modification result can be directly visualized dynamically, the fluency of the development idea is guaranteed, and the working efficiency is improved to a great extent.

Description

Thermal overload method and related equipment
Technical Field
The application relates to the technical field of computer information, in particular to a heat reloading method and related equipment.
Background
With the development of the internet, various application programs are more and more, so that in order to be compatible with more functions, the engineering of the application programs is more and more large, and correspondingly, the time consumption for compiling once is longer and longer. In the development process, even if only a small amount of codes need to be modified, the waiting time is long, and the development efficiency is seriously affected. Specifically, factors that affect the application debugging latency include the compile time of the engineering code and the view time of the running effects of the application. In the prior art, under the condition that only a small amount of codes are modified, the compiling time of engineering codes of the whole application program is quite long, in order to check the modifying effect of the codes, after the codes are modified, the program needs to recompile all the modified codes, after the application program is started, the application program needs to return to a corresponding scene step by step according to the original path to check the effect, so that the development efficiency is greatly influenced.
Disclosure of Invention
In view of the foregoing, it is an object of the present application to provide a thermal reloading method and related apparatus.
Based on the above objects, the present application provides a heat reloading method, comprising:
acquiring a source code file of a program;
compiling to obtain a corresponding hot reload code file in response to the modification operation of the source code file;
updating the source code file based on the hot reload code file to obtain a new code file;
and calling the new code file to update the program.
In one possible implementation manner, the compiling, in response to the modification operation on the source code file, to obtain the corresponding hot reload code file includes:
responding to the modification operation of the source code file, and updating the source code file based on the modification operation to obtain an updated code file;
and in response to the determining operation for updating the source code file, compiling the updated code file to obtain the hot reload code file.
In one possible implementation manner, the updating the program source code file based on the hot reload code file includes:
analyzing the hot reload code file to obtain an analysis result;
generating a code to be executed based on the analysis result;
and updating the program source code file based on the code to be executed.
In one possible implementation manner, the updating the source code file based on the code to be executed includes:
acquiring a first function value of a first function pointer in the code file to be executed and a second function value of the first function pointer in the source code file;
and replacing the second function value with the first function value to update the source code file.
In one possible implementation, the replacing the second function value with the first function value includes:
and replacing a second function value corresponding to the first function value in the source code file with the first function value through reflection of a programming language based on the first function pointer.
In one possible implementation manner, the calling the new code file, updating the program, includes:
establishing an association relationship between the new code file and the source code file;
and calling the new code file based on the association relation to update the program.
In one possible implementation, the method further includes:
monitoring a code file of the program;
responding to the fact that the source code file is monitored to have the modification operation, and obtaining the corresponding source code file;
and generating the hot reload code file according to the source code file based on the modification operation.
Based on the same inventive concept, the embodiment of the present application further provides a thermal overload device, including:
the acquisition module is configured to acquire a source code file of the program;
the generation module is configured to respond to the modification operation of the source code file and compile the source code file to obtain a corresponding hot reload code file;
the updating module is configured to update the source code file based on the hot reload code file to obtain a new code file;
and the calling module is configured to call the new code file and update the program.
Based on the same inventive concept, the embodiment of the application also provides an electronic device, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor executes the program to realize the heat reloading method according to any one of the above.
Based on the same inventive concept, embodiments of the present application also provide a non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform any one of the above-described thermal reloading methods.
From the above, it can be seen that the thermal reloading method and the related device provided by the present application are implemented by obtaining the source code file of the program; generating a corresponding hot reload code file in response to a modification operation to the source code file; updating the source code file based on the hot reload code file to obtain a new code file; and calling the new code file to update the program. The method has the advantages that the hot reload file is generated based on the modification operation of the code file, and the hot reload file can be utilized to realize the dynamic loading of the modified code part during the program operation, so that the modification result can be directly visualized dynamically without waiting for the restarting of the program, the fluency of the development idea is ensured, and the working efficiency is greatly improved.
Drawings
In order to more clearly illustrate the technical solutions of the present application or related art, the drawings that are required to be used in the description of the embodiments or related art will be briefly described below, and it is apparent that the drawings in the following description are only embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort to those of ordinary skill in the art.
FIG. 1 is a flow chart of a thermal overload method according to an embodiment of the present application;
FIG. 2 is a schematic view of a thermal overload apparatus according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail below with reference to the accompanying drawings.
It should be noted that unless otherwise defined, technical or scientific terms used in the embodiments of the present application should be given the ordinary meaning as understood by one of ordinary skill in the art to which the present application belongs. The terms "first," "second," and the like, as used in embodiments of the present application, do not denote any order, quantity, or importance, but rather are used to distinguish one element from another. The word "comprising" or "comprises", and the like, means that elements or items preceding the word are included in the element or item listed after the word and equivalents thereof, but does not exclude other elements or items. The terms "connected" or "connected," and the like, are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "upper", "lower", "left", "right", etc. are used merely to indicate relative positional relationships, which may also be changed when the absolute position of the object to be described is changed.
As described in the background section, with the development of the internet, various applications are increasing, and in order to be compatible with more functions, the engineering of the applications is larger, and accordingly, the time for compiling once is longer. In the development process, even if only a small amount of codes need to be modified, the waiting time is long, and the development efficiency is seriously affected. Specifically, factors that affect the application debugging latency include the compile time of the engineering code and the view time of the running effects of the application. In the prior art, under the condition that only a small amount of codes are modified, the compiling time of engineering codes of the whole application program is quite long, in order to check the modifying effect of the codes, after the codes are modified, the program needs to recompile all the modified codes, after the application program is started, the application program needs to return to a corresponding scene step by step according to the original path to check the effect, so that the development efficiency is greatly influenced.
In view of the above problems, embodiments of the present application provide a thermal reloading method and related devices, by acquiring a source code file of a program; generating a corresponding hot reload code file in response to a modification operation to the source code file; updating the source code file based on the hot reload code file to obtain a new code file; and calling the new code file to update the program. The method has the advantages that the hot reload file is generated based on the modification operation of the code file, and the hot reload file can be utilized to realize the dynamic loading of the modified code part during the program operation, so that the modification result can be directly visualized dynamically without waiting for the restarting of the program, the fluency of the development idea is ensured, and the working efficiency is greatly improved.
The technical solutions of the embodiments of the present application are described in information through specific embodiments.
Referring to fig. 1, the thermal reloading method of the embodiment of the present application includes the following steps:
step S101, acquiring a source code file of a program;
step S102, in response to the modification operation of the source code file, compiling to obtain a corresponding hot reload code file;
step S103, updating the source code file based on the hot reload code file to obtain a new code file;
step S104, calling the new code file to update the program.
For step S101, during the running of the program, there may be a listener, which may be used to listen to the code file of the corresponding program. In this embodiment, if it is monitored that a modification operation exists in the corresponding program code file, the source code file is acquired.
The modification operation described above may include an addition operation, a correction operation, or a deletion operation to the code file.
Further, the source code file of the program is obtained. In the embodiment of the present application, taking a game program as an example, the program needs to be run first, and further, the program detects a programming language file and compiles it. In the embodiments of the present application, the programming language is C#. Note that the applicable language range of the present application is not limited to the above-described c#, and may be a compiled language such as c++.
In this embodiment, in the actual running process of the program, when a running error occurs or the program function needs to be modified, a corresponding modification operation needs to be performed on the program code file. For example, there is a need for a program in which an error occurs in the display of a certain module, or the size of the existing display of the program needs to be modified, the size thereof needs to be changed to be small, or the like. When the above-mentioned requirement appears, then the source code file of the program needs to be modified correspondingly.
Then, a corresponding hot reload code file is required to be generated according to the modification operation.
Specifically, the method comprises the following steps: in response to a modification operation to the source code file, updating the source code file based on the modification operation; the hot reload code file is generated in response to the determining operation to update the source code file.
The hot reload refers to that each minor adjustment in the configuration process requires restarting the runtime software, which is a tedious and repetitive process. To solve this problem, a method is proposed that can reload the changed contents according to the changed configuration contents without shutting down the runtime software.
Wherein the hot reload code file is generated based on the source code of the modified program.
Here, the terminal is provided with an application program such as a video play client, an instant communication client, etc. In the process of developing the application program, a developer needs to run the developed application program on the terminal to view the effect. In practical application, a developer edits and modifies a source code of an application program to develop functions, interface displays and the like of the application program, specifically, the developer modifies and edits the source code of the application program through a code editing tool to obtain a modified source code, and then compiles the modified source code to obtain a hot reload code file for the application program.
Furthermore, the source code file needs to be updated based on the hot reload code file to obtain a new code file, specifically, the hot reload code file needs to be parsed to obtain a parsing result, then a code to be executed is generated based on the parsing result, and further the program source code file is updated based on the code to be executed.
Specifically, a first function value of a first function pointer in the code file to be executed and a second function value of the first function pointer in the source code file are obtained, and further, the first function value is used for replacing the second function value so as to update the source code file.
In this embodiment, the assignment is reassigned to the pointer of the new function by the reflection of c# during operation, so that when the changed function is used during the subsequent program operation, that is, the replaced function is used, the modified c# code can be used without restarting the game, thereby achieving the effect of hot reloading.
Further, an association relation between the new code file and the source code file is established, and the new code file is called to update the program based on the association relation.
Specifically, an association relationship between an executable code and a source code of an application program in an operating state is established, and in the embodiment of the application, when the executable code is called to update an interface effect of the application program, the application program can be in the operating state so as to ensure that the effect of the source code after modification can be checked in real time. In order to realize the call of the executable code, after the terminal analyzes the hot reload code file and generates the executable code, the association relation between the executable code and the source code of the application program in the running state is established.
In an alternative embodiment, using the prior art, in a conventional compiling mode, taking a game as an example, running a starting game takes 1 second, the program needs to detect a c# file and compile it, this period takes 70 seconds, when an error or other condition needing to optimize the modified code is found at the time of running, the game is closed, this period takes 1 second, then the c# code is modified for the error found in the above step, 5 seconds later, then the starting game is clicked again, 1 second later, then the c# file needs to be detected and compiled again, this time takes 70 seconds, in addition, a compiling stuck state may also occur during the compiling at this time, the time of running is further increased, then the corresponding effect is checked for entering the previous scene, and the time of running is 10 seconds, it can be seen that the time of use is 1+70+ (1+5+1+70+10) n, where n represents the number of times of modification.
When the technical scheme of the application is used, in the hot reloading mode, the game is started by clicking operation, the time is 1 second, then the program needs to detect the C# code file and compile the C# code file, the time is 70 seconds, when errors are found in the operation or other conditions needing to optimize and modify codes, the operation is not performed, the time is 1 second, then the C# code is modified according to the errors found in the steps, the time is 5 seconds, the hot reloading file is automatically generated, further, the game is returned to directly check the presentation effect, and the time is 3 seconds, so that the time is 1+70+ (1+5+3) n.
Comparing the two schemes, it is obvious that compared with the prior art, the technical scheme shown in the embodiment of the application effectively reduces the time consumption, and the saved time consumption is increased along with the increase of the modification times. In the actual development process, the method can utilize the hot reloading method, the corresponding presentation effect of code debugging can be utilized, the hot reloading method can be utilized for real-time adjustment and real-time checking of the adjustment effect when the code is wrong, correspondingly, after each debugging and error modification, the number of modification times can be increased, and in the actual development process, the number of times of code debugging and error modification can be quite large, so that compared with the prior art, the method greatly shortens the time of frequent modification in the actual development process, and greatly improves the working efficiency.
According to the embodiment, the hot reloading method disclosed by the embodiment of the application is realized by acquiring the source code file of the program; generating a corresponding hot reload code file in response to a modification operation to the source code file; updating the source code file based on the hot reload code file to obtain a new code file; and calling the new code file to update the program. The method has the advantages that the hot reload file is generated based on the modification operation of the code file, and the hot reload file can be utilized to realize the dynamic loading of the modified code part during the program operation, so that the modification result can be directly visualized dynamically without waiting for the restarting of the program, the fluency of the development idea is ensured, and the working efficiency is greatly improved.
It should be noted that, the method of the embodiments of the present application may be performed by a single device, for example, a computer or a server. The method of the embodiment can also be applied to a distributed scene, and is completed by mutually matching a plurality of devices. In the case of such a distributed scenario, one of the devices may perform only one or more steps of the methods of embodiments of the present application, and the devices may interact with each other to complete the methods.
It should be noted that some embodiments of the present application are described above. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments described above and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
Based on the same inventive concept, the application also provides a heat overload device corresponding to the method of any embodiment.
Referring to fig. 2, the thermal reloading apparatus includes:
an acquisition module 21 configured to acquire a source code file of a program;
a generation module 22 configured to compile a corresponding hot reload code file in response to a modification operation to the source code file;
an updating module 23 configured to update the source code file based on the hot reload code file to obtain a new code file;
and the calling module 24 is configured to call the new code file and update the program.
In one possible implementation, the generating module 22 is further configured to:
responding to the modification operation of the source code file, and updating the source code file based on the modification operation to obtain an updated code file;
and in response to the determining operation for updating the source code file, compiling the updated code file to obtain the hot reload code file.
In one possible implementation, the update module 23 is further configured to:
analyzing the hot reload code file to obtain an analysis result;
generating a code to be executed based on the analysis result;
and updating the program source code file based on the code to be executed.
In one possible implementation, the update module 23 is further configured to:
acquiring a first function value of a first function pointer in the code file to be executed and a second function value of the first function pointer in the source code file;
and replacing the second function value with the first function value to update the source code file.
In one possible implementation, the update module 23 is further configured to:
and replacing a second function value corresponding to the first function value in the source code file with the first function value through reflection of a programming language based on the first function pointer.
In one possible implementation, the calling module 24 is further configured to:
establishing an association relationship between the new code file and the source code file;
and calling the new code file based on the association relation to update the program.
In one possible implementation manner, the apparatus further includes:
a monitoring module configured to monitor a code file of the program;
the response module is configured to acquire the corresponding source code file in response to the fact that the source code file is monitored to have the modification operation;
and the modification module is configured to generate the hot reload code file according to the source code file based on the modification operation.
For convenience of description, the above devices are described as being functionally divided into various modules, respectively. Of course, the functions of each module may be implemented in the same piece or pieces of software and/or hardware when implementing the present application.
The device of the foregoing embodiment is configured to implement the corresponding thermal reloading method in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiment, which is not described herein.
Based on the same inventive concept, the application also provides an electronic device corresponding to the method of any embodiment, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor realizes the heat reloading method of any embodiment when executing the program.
Fig. 3 shows a more specific hardware architecture of an electronic device according to this embodiment, where the device may include: a processor 1010, a memory 1020, an input/output interface 1030, a communication interface 1040, and a bus 1050. Wherein processor 1010, memory 1020, input/output interface 1030, and communication interface 1040 implement communication connections therebetween within the device via a bus 1050.
The processor 1010 may be implemented by a general-purpose CPU (Central Processing Unit ), microprocessor, application specific integrated circuit (ApplicationSpecific Integrated Circuit, ASIC), or one or more integrated circuits, etc. for executing relevant programs to implement the technical solutions provided in the embodiments of the present disclosure.
The Memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory ), static storage device, dynamic storage device, or the like. Memory 1020 may store an operating system and other application programs, and when the embodiments of the present specification are implemented in software or firmware, the associated program code is stored in memory 1020 and executed by processor 1010.
The input/output interface 1030 is used to connect with an input/output module for inputting and outputting information. The input/output module may be configured as a component in a device (not shown) or may be external to the device to provide corresponding functionality. Wherein the input devices may include a keyboard, mouse, touch screen, microphone, various types of sensors, etc., and the output devices may include a display, speaker, vibrator, indicator lights, etc.
Communication interface 1040 is used to connect communication modules (not shown) to enable communication interactions of the present device with other devices. The communication module may implement communication through a wired manner (such as USB, network cable, etc.), or may implement communication through a wireless manner (such as mobile network, WIFI, bluetooth, etc.).
Bus 1050 includes a path for transferring information between components of the device (e.g., processor 1010, memory 1020, input/output interface 1030, and communication interface 1040).
It should be noted that although the above-described device only shows processor 1010, memory 1020, input/output interface 1030, communication interface 1040, and bus 1050, in an implementation, the device may include other components necessary to achieve proper operation. Furthermore, it will be understood by those skilled in the art that the above-described apparatus may include only the components necessary to implement the embodiments of the present description, and not all the components shown in the drawings.
The electronic device of the foregoing embodiment is configured to implement the corresponding thermal reloading method in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiment, which is not described herein.
Based on the same inventive concept, corresponding to any of the above embodiments of the method, the present application further provides a non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the thermal reload method as described in any of the above embodiments.
The computer readable media of the present embodiments, including both permanent and non-permanent, removable and non-removable media, may be used to implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device.
The storage medium of the foregoing embodiments stores computer instructions for causing the computer to perform the thermal reloading method as described in any of the foregoing embodiments, and has the advantages of the corresponding method embodiments, which are not described herein.
Those of ordinary skill in the art will appreciate that: the discussion of any of the embodiments above is merely exemplary and is not intended to suggest that the scope of the application (including the claims) is limited to these examples; the technical features of the above embodiments or in the different embodiments may also be combined within the idea of the present application, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present application as described above, which are not provided in detail for the sake of brevity.
Additionally, well-known power/ground connections to Integrated Circuit (IC) chips and other components may or may not be shown within the provided figures, in order to simplify the illustration and discussion, and so as not to obscure the embodiments of the present application. Furthermore, the devices may be shown in block diagram form in order to avoid obscuring the embodiments of the present application, and this also takes into account the fact that specifics with respect to implementation of such block diagram devices are highly dependent upon the platform on which the embodiments of the present application are to be implemented (i.e., such specifics should be well within purview of one skilled in the art). Where specific details (e.g., circuits) are set forth in order to describe example embodiments of the application, it should be apparent to one skilled in the art that embodiments of the application can be practiced without, or with variation of, these specific details. Accordingly, the description is to be regarded as illustrative in nature and not as restrictive.
While the present application has been described in conjunction with specific embodiments thereof, many alternatives, modifications, and variations of those embodiments will be apparent to those skilled in the art in light of the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.
The present embodiments are intended to embrace all such alternatives, modifications and variances which fall within the broad scope of the appended claims. Accordingly, any omissions, modifications, equivalents, improvements and/or the like which are within the spirit and principles of the embodiments are intended to be included within the scope of the present application.

Claims (10)

1. A method of thermal reloading comprising:
acquiring a source code file of a program;
compiling and generating a corresponding hot reload code file in response to the modification operation of the source code file;
updating the source code file based on the hot reload code file to obtain a new code file;
and calling the new code file to update the program.
2. The method of claim 1, wherein compiling the corresponding hot reload code file in response to the modifying operation of the source code file comprises:
responding to the modification operation of the source code file, and updating the source code file based on the modification operation to obtain an updated code file;
and in response to the determining operation for updating the source code file, compiling the updated code file to obtain the hot reload code file.
3. The method of claim 1, wherein updating the program source code file based on the hot reload code file comprises:
analyzing the hot reload code file to obtain an analysis result;
generating a code to be executed based on the analysis result;
and updating the program source code file based on the code to be executed.
4. The method of claim 3, wherein updating the source code file based on the code to be executed comprises:
acquiring a first function value of a first function pointer in the code file to be executed and a second function value of the first function pointer in the source code file;
and replacing the second function value with the first function value to update the source code file.
5. The method of claim 4, wherein replacing the second function value with the first function value comprises:
and replacing a second function value corresponding to the first function value in the source code file with the first function value through reflection of a programming language based on the first function pointer.
6. The method of claim 5, wherein the calling the new code file to update the program comprises:
establishing an association relationship between the new code file and the source code file;
and calling the new code file based on the association relation to update the program.
7. The method according to claim 1, characterized in that the method further comprises:
monitoring a code file of the program;
responding to the fact that the source code file is monitored to have the modification operation, and obtaining the corresponding source code file;
and generating the hot reload code file according to the source code file based on the modification operation.
8. A thermal overload apparatus, comprising:
the acquisition module is configured to acquire a source code file of the program;
the generation module is configured to respond to the modification operation of the source code file and compile the source code file to obtain a corresponding hot reload code file;
the updating module is configured to update the source code file based on the hot reload code file to obtain a new code file;
and the calling module is configured to call the new code file and update the program.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any one of claims 1 to 7 when the program is executed by the processor.
10. A non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the method of any one of claims 1 to 7.
CN202310098728.1A 2023-02-10 2023-02-10 Thermal overload method and related equipment Pending CN116339795A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310098728.1A CN116339795A (en) 2023-02-10 2023-02-10 Thermal overload method and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310098728.1A CN116339795A (en) 2023-02-10 2023-02-10 Thermal overload method and related equipment

Publications (1)

Publication Number Publication Date
CN116339795A true CN116339795A (en) 2023-06-27

Family

ID=86888400

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310098728.1A Pending CN116339795A (en) 2023-02-10 2023-02-10 Thermal overload method and related equipment

Country Status (1)

Country Link
CN (1) CN116339795A (en)

Similar Documents

Publication Publication Date Title
US7478366B2 (en) Debugger and method for debugging computer programs across multiple programming languages
JP5415557B2 (en) User script code conversion for debugging
US9111033B2 (en) Compiling source code for debugging with user preferred snapshot locations
US20190004774A1 (en) Automated source code adaption to inject features between platform versions
US10209968B2 (en) Application compiling
CN107832059B (en) Code static analysis method and device based on Makefile
US9753705B2 (en) Conditional compilation of bytecode
US10452369B2 (en) Code profiling of executable library for pipeline parallelization
CN112286144B (en) Configuration method and system and computer readable storage medium
CN114579452A (en) Interface influence detection method and related equipment
US8127282B2 (en) Recompilation of a class with a java static variable
CN109284222B (en) Software unit, project testing method, device and equipment in data processing system
CN111240987B (en) Method and device for detecting migration program, electronic equipment and computer readable storage medium
CN110688320B (en) Global variable detection method and device and terminal equipment
WO2023207973A1 (en) Compiler test method and apparatus, case generation method and apparatus, and instruction storage structure
US11593078B2 (en) Reload ordering for executable code modules
CN116339795A (en) Thermal overload method and related equipment
US9747085B2 (en) Source code generation from prototype source
CN114443042A (en) Service arrangement execution method based on rule engine and related equipment
CN114047923A (en) Error code positioning method, device, storage medium and electronic equipment
CN109815142B (en) Product testing method and device
CN113778451A (en) File loading method and device, computer system and computer readable storage medium
CN108733564B (en) Browser performance testing method, device and equipment
CN112596751A (en) Compiling method, terminal, server and storage medium of application program installation package
CN111338968A (en) Project function module debugging method, device, medium and electronic equipment

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