WO2018072493A1 - Compiling method and compiling system - Google Patents

Compiling method and compiling system Download PDF

Info

Publication number
WO2018072493A1
WO2018072493A1 PCT/CN2017/093061 CN2017093061W WO2018072493A1 WO 2018072493 A1 WO2018072493 A1 WO 2018072493A1 CN 2017093061 W CN2017093061 W CN 2017093061W WO 2018072493 A1 WO2018072493 A1 WO 2018072493A1
Authority
WO
WIPO (PCT)
Prior art keywords
file
source file
source
configuration information
compiling
Prior art date
Application number
PCT/CN2017/093061
Other languages
French (fr)
Chinese (zh)
Inventor
王春锦
Original Assignee
宁德时代新能源科技股份有限公司
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 宁德时代新能源科技股份有限公司 filed Critical 宁德时代新能源科技股份有限公司
Publication of WO2018072493A1 publication Critical patent/WO2018072493A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/43Checking; Contextual analysis

Definitions

  • the present application relates to the field of background compilation technology, and in particular, to a compilation method and a compilation system.
  • BMS Battery Management System
  • the embodiment of the present application provides a compiling method and a compiling system, which aims to solve the problem that the software integration efficiency in the BMS development process in the related art is too low, and can improve the software integration efficiency and reduce the compiling cost.
  • an embodiment of the present application provides a compiling method, including: detecting, in real time, whether a source file is changed; traversing a dependency file corresponding to the source file by a regular matching to determine whether to recompile the source file.
  • the dependent text corresponding to the source file is traversed by regular matching.
  • the step of detecting whether the source file is changed in real time includes: acquiring the detection parameter, where the detection parameter includes a timestamp of the source file, a hash value of the source file content, and the original compilation configuration information. And detecting one or more of the detection parameters; and detecting whether the detection parameter changes to determine a real-time change state of the source file.
  • the number of the source files is multiple
  • the step of traversing the dependent files corresponding to the source file by regular matching includes: performing a test process of concurrently recompiling multiple files for The file is recompiled based on the source state when the source file needs to be recompiled.
  • the step of concurrently running a test process of recompiling multiple files specifically includes: initializing a plurality of worker threads; and using the plurality of worker threads to poll the request queue to process a request for file recompilation; The processing result is placed in the result queue; the result processing function is called to process the result queue.
  • the embodiment of the present application provides a compiling system, including: a source file detecting unit, detecting whether a source file is changed in real time; and relying on a matching unit to traverse the dependent file corresponding to the source file by using a regular matching to determine whether Recompile the source file.
  • the method further includes: an environment acquiring unit, acquiring a current system environment before the dependency matching unit traverses the dependent file corresponding to the source file; and configuring a unit to reconfigure the compiler according to the current system environment Configuration information for use in compiling configuration information when recompilation is required; and a saving unit to save the compiled configuration information in a configuration file.
  • the source file detecting unit is specifically configured to: acquire a detection parameter, where the detection parameter includes a time stamp of the source file, a hash value of the source file content, and one of the original compilation configuration information. Item or items, and detecting whether the detected parameter has changed to determine The real-time change status of the source file.
  • the number of the source files is multiple
  • the dependency matching unit is specifically configured to: concurrently run a test process of recompiling multiple files, so that the source file needs to be re-required
  • the file is recompiled based on the source state at compile time.
  • the dependency matching unit is specifically configured to: initialize a plurality of worker threads, use the plurality of worker threads to poll the request queue, process the request for recompiling the file, and place the processing result in the result queue. And call the result handler to process the result queue.
  • FIG. 1 shows a flow chart of a compiling method according to an embodiment of the present application
  • FIG. 2 shows a block diagram of a compilation system in accordance with one embodiment of the present application
  • FIG. 3 shows a logical architecture diagram of an Emake subsystem in accordance with one embodiment of the present application
  • FIG. 4 shows a schematic diagram of a thread pool work model in accordance with one embodiment of the present application.
  • FIG. 1 shows a flow chart of a compiling method in accordance with one embodiment of the present application.
  • the compiling method provided by the embodiment of the present application includes:
  • step 102 it is detected in real time whether the source file has changed.
  • Step 104 When it is determined that the source file is changed, traversing the dependency file corresponding to the source file by regular matching to determine whether to recompile the source file.
  • the dependency file corresponding to the source file needs to be traversed by regular matching to determine whether the source code is needed.
  • the state automatically performs file recompilation, so that when it is determined that recompilation is required, automatic recompilation of all files from the source file can be achieved without a lot of manual operations, which improves software integration efficiency and reduces compilation costs.
  • the execution subject is an Emake system.
  • Emake is the back-end subsystem of ECS. It is a console program developed with eey4.11.
  • the console application is designed without a graphical user interface and compiled into a separate executable.
  • Console applications typically run from the command line while exchanging input and output information between command prompts and running applications. Because the information can be written to and read from the console window, this makes the console application a great way for ECS to introduce a continuously integrated server compilation, regardless of the user interface.
  • the method before step 104, further includes: acquiring a current system environment; reconfiguring the compiled configuration information according to the current system environment, so that the compiled configuration information is used when recompilation is required; and the configuration information is compiled. Save in the configuration file.
  • the execution body is an Emake system
  • the Emake system needs to know the current system environment before starting work, such as where the standard library is, where the compiler is installed, which components need to be installed, etc., by specifying the configuration information.
  • the Emake system can flexibly adapt to the environment and compile configuration information such as machine code that can be run in various environments.
  • These compiled configuration information is stored in a configuration file called project.ini, which is generated by the ESB (Embedded System Build).
  • the Emake system reads the configuration file to learn the compiled configuration information.
  • the project.ini configuration file can take into account the differences between different systems, and gives default values for various compilation configuration information. If the user's compilation environment is special, or there are some specific requirements, you can also manually project.ini Provide parameters.
  • the step 102 includes: acquiring a detection parameter, where the detection parameter includes one or more of a time stamp of the source file, a hash value of the source file content, and original compilation configuration information; and detecting Check if the parameters have changed to determine the real-time status of the source file.
  • the Emake system can determine whether the file needs to be recompiled by the timestamp of the file. After the file version is rolled back or the compilation parameters are changed, the Emake system will not compile the file again.
  • step 104 specifically includes: concurrently running a test process of recompiling multiple files for being based on the source state when the source file needs to be recompiled.
  • the file is recompiled.
  • Compiling the program and dependent libraries from the source state resolves compatibility issues caused by c or C++ programs due to compilation options, operating system platforms, or library file versions.
  • the step of concurrently running a test process of recompiling multiple files specifically includes: initializing a plurality of worker threads; and using a plurality of worker threads to poll the request queue to process a request for file recompilation; The result is placed in the result queue; the result handler is called to process the result queue.
  • Emake system uses easy language Queue (queue) to achieve thread synchronization.
  • FIG. 2 shows a block diagram of a compilation system in accordance with one embodiment of the present application.
  • the compiling system 200 provided by the embodiment of the present application includes: a source file detecting unit 202 and a dependency matching unit 204.
  • the source file detecting unit 202 is configured to detect, in real time, whether the source file is changed.
  • the dependency matching unit 204 is configured to: when determining that the source file is changed, traverse the dependent file corresponding to the source file by regular matching to determine whether The source file is recompiled.
  • the execution subject is an Emake system.
  • Emake is the back-end subsystem of ECS. It is a console program developed with eey4.11.
  • the console application is designed without a graphical user interface and compiled into a separate executable.
  • Console applications typically run from the command line while exchanging input and output information between command prompts and running applications. Because the information can be written to and read from the console window, this makes the console application a great way for ECS to introduce a continuously integrated server compilation, regardless of the user interface.
  • the dependency file corresponding to the source file needs to be traversed by regular matching to determine whether the source code is needed.
  • the state automatically performs file recompilation, so that when it is determined that recompilation is required, automatic recompilation of all files from the source file can be achieved without a lot of manual operations, which improves software integration efficiency and reduces compilation costs.
  • the method further includes: the environment obtaining unit 206: acquiring the current system environment before the dependent matching unit traverses the dependent file corresponding to the source file; and the configuring unit 208, reconfiguring the compiled configuration information according to the current system environment. For compiling configuration information when recompilation is required; and saving unit 210, saving the compiled configuration information in the configuration file.
  • the Emake system Before starting the work, the Emake system needs to know the current system environment, such as where the standard library is, where the compiler is installed, what components need to be installed, etc. By specifying the compilation configuration information, the Emake system can flexibly adapt to the environment and compile it. Compile configuration information such as machine code that can be run in various environments. These compilation configuration information is saved in a configuration file called project.ini Among them, it is generated by the ESB, and the Emake system learns the compiled configuration information by reading this configuration file.
  • project a configuration file called project.ini Among them, it is generated by the ESB, and the Emake system learns the compiled configuration information by reading this configuration file.
  • the project.ini configuration file can take into account the differences between different systems, and gives default values for various compilation configuration information. If the user's compilation environment is special, or there are some specific requirements, you can also manually project.ini Provide parameters.
  • the source file detecting unit 202 is specifically configured to: acquire a detection parameter, where the detection parameter includes one or more of a time stamp of the source file, a hash value of the source file content, and original compilation configuration information. Item, and detecting whether the detection parameter has changed to determine the real-time change status of the source file.
  • the Emake system can determine whether the file needs to be recompiled by the timestamp of the file. After the file version is rolled back or the compilation parameters are changed, the Emake system will not compile the file again.
  • ECS can also be based on the hash value of the file content and the compilation parameters as the criterion for incremental compilation, so that the accuracy of incremental compilation will be higher.
  • the number of source files is multiple
  • the dependency matching unit 204 is specifically configured to: concurrently run a test process of recompiling multiple files for re-compiling when the source file needs to be recompiled.
  • the source state is recompiled in the file.
  • the dependency matching unit 204 is specifically configured to: initialize a plurality of worker threads, use multiple worker threads to poll the request queue, process the request for file recompilation, and place the processing result in the result queue, and The result handler is called to process the result queue.
  • FIG. 3 shows a logical architecture diagram of an Emake subsystem in accordance with one embodiment of the present application.
  • the Emake subsystem is the back-end subsystem of ECS. It is a console program developed with eey4.11.
  • the console application is designed to have no graphical user interface and compiled into a separate executable.
  • the console application usually runs from the command line of the console command processing set. After the request is accessed, the command and protocol of the request are parsed, and the function processing module is called to perform control scheduling such as service positioning and resource scheduling. Finally, using application logic for application processing, get the system System output, where the system output includes the output of the process log and the output of the result report.
  • the function processing module has the functions of compilation management, target generation management, static detection processing, concurrency control, packaging processing, and unit test processing, wherein the compiler management module is connected to the dependency engine.
  • the console application typically runs from the command line of the console command processing set, while exchanging input and output information between the command prompt and the running application. Because the information can be written to and read from the console window, this makes the console application a great way for ECS to introduce a continuously integrated server compilation, regardless of the user interface.
  • the memory processing mechanism of the Emake subsystem uses an efficient, flexible, cross-platform memory pool implementation, in which memory is divided into nodes and slices, node is a large chunk of memory, and slice is a small piece on node. Memory, every memory requested from the memory pool belongs to a slice. The size of the slice in each memory pool instance is the same, so this memory pool is more like an object pool. Based on this memory pool, a more flexible memory pool from which different sizes of memory can be applied can be realized.
  • the available nodes are linked into a linked list, and the available slices are also linked into a linked list.
  • the available nodes are linked into a linked list, and the available slices are also linked into a linked list.
  • the above memory pools are organized into a tree structure.
  • a global memory pool is its parent memory pool. This global memory pool is created the first time you call elr_mpl_init (initialize the memory pool function), and the memory space occupied by all memory pool structures comes from this global memory pool. This global memory pool was destroyed the last time the elr_mpl_finalize (terminating function) memory pool was called. At the same time, it can be seen that all the memory pool instances are direct or indirect sub-memory pools of this global memory pool, then when the elr_mpl_finalize is called, all the memory pool instances will also be destroyed, thus the possibility of leaking memory. Dropped to a minimum.
  • the memory pool of the Emake subsystem also supports multithreading. If you need to use it in a multithreaded environment, you need to implement six interfaces and define the easy language constant ELR_USE_THREAD at compile time.
  • FIG. 4 shows a schematic diagram of a thread pool work model in accordance with one embodiment of the present application.
  • each interface may cross-use and modify resource data, which easily leads to concurrency problems, if for each resource. To consider how to ensure concurrent security issues, the entire analysis process becomes complicated, and complex logic is often overlooked.
  • the thread pool model shown in Figure 4 is used to shield the concurrency problem of a single compilation, that is, the compile thread does not need to consider its concurrent security problem when accessing its own resources (multiple compile access resources still need to be processed), specifically You can sort the compiled requests and call the threads in the thread pool in turn.
  • the thread pool model includes the following sections:
  • ThreadPool thread pool manager
  • the worker thread which is a thread in the thread pool, can place the execution result into the result queue.
  • the request interface (WorkRequest), not shown in the figure, used to create the request object, For the worker thread to schedule the execution of the task.
  • a request queue (RequestQueue) for storing and extracting requests, and the thread pool manager adds a request to the request queue.
  • the result queue (ResultQueue) is used to store the result of the request execution, and the thread pool manager can obtain the execution result from the result queue.
  • the thread pool manager adds requests to the request queue by adding a request (putRequest). These requests need to implement the request interface by passing work functions, parameters, result handlers, and exception handlers, and then initialize a certain number of worker threads. These worker threads continuously look at the request queue by polling, and as long as a request exists, the request is fetched and executed.
  • the thread pool manager calls the method (poll) to see if the result queue has a value. If there is a value, it is fetched and the result processing function is called.
  • the core resources of the Emake subsystem are the request queue and the result queue, and the worker thread obtains the task by polling the request queue, and the main thread obtains the execution result by viewing the result queue.
  • queue design requires thread synchronization, certain blocking, and timeout mechanisms to prevent excessive CPU (Central Processing Unit) overhead due to constant polling.
  • CPU Central Processing Unit
  • the Emake subsystem needs to know the current system environment before starting work, such as where the standard library is, where the compiler is installed, which components need to be installed, etc.
  • the environment compiles configuration information such as machine code that can be run in various environments. These compiled configuration information is stored in a configuration file called project.ini, which is generated by the ESB.
  • the Emake subsystem reads the configuration file to learn the compiled configuration information.
  • the project.ini configuration file can take into account the differences between different systems, and gives default values for various compilation configuration information. If the user's compilation environment is special, or there are some specific requirements, you can also manually project.ini Provide parameters.
  • the standard library and headers used by the source code can be stored in any directory on the system.
  • the Emake subsystem can know the location of the standard library and header files from the configuration file.
  • the configuration file will give a list of several specific directories. When compiling, the compiler will go to these directories in order to find the target.
  • the dependent file of the source file needs to be determined.
  • the dependency relationship between the source files needs to be obtained, and the compiler can determine the order of compilation by the dependencies between the source files. Assuming the A file depends on the B file, the Emake subsystem should guarantee the following two points:
  • the A file is only compiled after the B file is compiled.
  • Dependencies are stored in a file called .d, which lists the dependencies of the source files. While determining the dependencies, the Emake subsystem also determines which header files are used at compile time.
  • different source files may reference the same header file (such as stdio.h).
  • the header files When compiling, the header files must also be compiled together. Therefore, in order to save time, the Emake subsystem will compile the header file before compiling the source code, which ensures that the header file only needs to be compiled once.
  • the compiler begins to replace the bash header files and macros in the source code.
  • Inserting the source code is the result of precompilation, and the compiler will remove the comment in this step.
  • This step is called pre-processing.
  • the Emake subsystem starts to generate machine code.
  • there is an intermediate step that is, first convert the source code into the assembly code, and then transfer the assembly code.
  • the machine code For the machine code.
  • the transcoded file is called an object file.
  • the object file cannot be run yet and must be further converted into an executable file.
  • the next step in the Emake subsystem is to put the code of the external function (usually the suffix name).
  • the word “if” as used herein may be interpreted as “when” or “when” or “in response to a determination” or “in response to Detection”.
  • the phrase “if determined” or “if detected (conditions or events stated)” may be interpreted as “when determined” or “in response to determination” or “when detected (stated condition or event) “Time” or “in response to a test (condition or event stated)”.
  • the disclosed systems, devices, and methods may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • multiple units or components may be combined. Or it can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
  • the above-described integrated unit implemented in the form of a software functional unit can be stored in a computer readable storage medium.
  • the above software functional unit is stored in a storage medium, including several fingers Some steps of a method for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor to perform the methods described in various embodiments of the present application.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like, which can store program codes. .

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The present application provides a compiling method and a compiling system. The compiling method comprises: detecting in real time whether a source file is changed; and traversing, when it is determined that the source file is changed, dependent files corresponding to the source file by means of regular expression matching, so as to determine whether to recompile the source file. The technical solution of the present application facilitates automatically recompiling all files starting from the source file without a large number of manual operations, thereby improving software integration efficiency and reducing compiling costs.

Description

编译方法和编译系统Compilation method and compilation system 技术领域Technical field
本申请涉及后台编译技术领域,尤其涉及一种编译方法和一种编译系统。The present application relates to the field of background compilation technology, and in particular, to a compilation method and a compilation system.
背景技术Background technique
目前,随着电动汽车的快速发展,对BMS(电池管理系统)的不断提高,这就使得BMS的开发越来越复杂,开发的复杂性和成本都剧增。例如,在AUTOSAR(汽车开放系统架构)中,使用传统的软件集成编译,往往面临造成系统效率低下、扩展性差、开发周期长、bug多等的问题。At present, with the rapid development of electric vehicles, the continuous improvement of BMS (Battery Management System) has made the development of BMS more and more complicated, and the complexity and cost of development have increased dramatically. For example, in AUTOSAR (Automotive Open System Architecture), the use of traditional software integration and compilation often faces problems such as low system efficiency, poor scalability, long development cycle, and many bugs.
具体地,基于AUTOSAR的BMS开发,其软件集成编译实现的工作是由开发人员手工编写源文件脚本完成的,这一步的工作量相当大,会消耗很长时间,而且对开发人员技术要求非常高。而一旦有新的功能,开发人员必须得重新修改脚本,且花大量时间进行调试,严重影响开发效率。Specifically, based on AUTOSAR-based BMS development, the software integration compilation implementation is done by the developer manually writing the source file script. This step is quite large, it takes a long time, and the developer technical requirements are very high. . Once new features are available, developers must re-edit the script and spend a lot of time debugging, seriously affecting development efficiency.
因此,如何提升BMS开发过程中的软件集成效率,成为目前亟待解决的技术问题。Therefore, how to improve the software integration efficiency in the BMS development process has become a technical problem that needs to be solved urgently.
发明内容Summary of the invention
本申请实施例提供了一种编译方法和一种编译系统,旨在解决相关技术中BMS开发过程中的软件集成效率过低的问题,能够提升软件集成效率,降低编译成本。The embodiment of the present application provides a compiling method and a compiling system, which aims to solve the problem that the software integration efficiency in the BMS development process in the related art is too low, and can improve the software integration efficiency and reduce the compiling cost.
第一方面,本申请实施例提供了一种编译方法,包括:实时检测源文件是否发生改变;通过正则匹配遍历所述源文件对应的依赖文件,以确定是否对所述源文件进行重新编译。In a first aspect, an embodiment of the present application provides a compiling method, including: detecting, in real time, whether a source file is changed; traversing a dependency file corresponding to the source file by a regular matching to determine whether to recompile the source file.
在本申请上述实施例中,在通过正则匹配遍历所述源文件对应的依赖文 件的步骤之前,还包括:获取当前系统环境;根据所述当前系统环境,重新配置编译配置信息,以供在需要进行重新编译时使用所述编译配置信息;以及将所述编译配置信息保存在配置文件中。In the above embodiment of the present application, the dependent text corresponding to the source file is traversed by regular matching. The step of: further comprising: obtaining a current system environment; reconfiguring the compiled configuration information according to the current system environment, for using the compiled configuration information when recompilation is required; and saving the compiled configuration information In the configuration file.
在本申请上述实施例中,实时检测源文件是否发生改变的步骤,具体包括:获取检测参数,其中,所述检测参数包括源文件的时间戳、源文件内容的哈希值和原编译配置信息中的一项或多项;以及检测所述检测参数是否发生变化,以确定所述源文件的实时变化状态。In the foregoing embodiment of the present application, the step of detecting whether the source file is changed in real time includes: acquiring the detection parameter, where the detection parameter includes a timestamp of the source file, a hash value of the source file content, and the original compilation configuration information. And detecting one or more of the detection parameters; and detecting whether the detection parameter changes to determine a real-time change state of the source file.
在本申请上述实施例中,所述源文件的数量为多个,以及通过正则匹配遍历所述源文件对应的依赖文件的步骤,具体包括:并发运行多个文件重新编译的测试进程,以供在需要对所述源文件进行重新编译时基于源码状态进行文件重新编译。In the foregoing embodiment of the present application, the number of the source files is multiple, and the step of traversing the dependent files corresponding to the source file by regular matching includes: performing a test process of concurrently recompiling multiple files for The file is recompiled based on the source state when the source file needs to be recompiled.
在本申请上述实施例中,并发运行多个文件重新编译的测试进程的步骤,具体包括:初始化多个工作线程;使用所述多个工作线程轮询请求队列,以处理文件重新编译的请求;将处理结果放置在结果队列中;调用结果处理函数对所述结果队列进行处理。In the foregoing embodiment of the present application, the step of concurrently running a test process of recompiling multiple files specifically includes: initializing a plurality of worker threads; and using the plurality of worker threads to poll the request queue to process a request for file recompilation; The processing result is placed in the result queue; the result processing function is called to process the result queue.
第二方面,本申请实施例提供了一种编译系统,包括:源文件检测单元,实时检测源文件是否发生改变;依赖匹配单元,通过正则匹配遍历所述源文件对应的依赖文件,以确定是否对所述源文件进行重新编译。In a second aspect, the embodiment of the present application provides a compiling system, including: a source file detecting unit, detecting whether a source file is changed in real time; and relying on a matching unit to traverse the dependent file corresponding to the source file by using a regular matching to determine whether Recompile the source file.
在本申请上述实施例中,还包括:环境获取单元,在所述依赖匹配单元遍历所述源文件对应的依赖文件之前,获取当前系统环境;配置单元,根据所述当前系统环境,重新配置编译配置信息,以供在需要进行重新编译时使用所述编译配置信息;以及保存单元,将所述编译配置信息保存在配置文件中。In the foregoing embodiment of the present application, the method further includes: an environment acquiring unit, acquiring a current system environment before the dependency matching unit traverses the dependent file corresponding to the source file; and configuring a unit to reconfigure the compiler according to the current system environment Configuration information for use in compiling configuration information when recompilation is required; and a saving unit to save the compiled configuration information in a configuration file.
在本申请上述实施例中,所述源文件检测单元具体用于:获取检测参数,其中,所述检测参数包括源文件的时间戳、源文件内容的哈希值和原编译配置信息中的一项或多项,以及检测所述检测参数是否发生变化,以确定所 述源文件的实时变化状态。In the above embodiment of the present application, the source file detecting unit is specifically configured to: acquire a detection parameter, where the detection parameter includes a time stamp of the source file, a hash value of the source file content, and one of the original compilation configuration information. Item or items, and detecting whether the detected parameter has changed to determine The real-time change status of the source file.
在本申请上述实施例中,所述源文件的数量为多个,以及所述依赖匹配单元具体用于:并发运行多个文件重新编译的测试进程,以供在需要对所述源文件进行重新编译时基于源码状态进行文件重新编译。In the foregoing embodiment of the present application, the number of the source files is multiple, and the dependency matching unit is specifically configured to: concurrently run a test process of recompiling multiple files, so that the source file needs to be re-required The file is recompiled based on the source state at compile time.
在本申请上述实施例中,所述依赖匹配单元具体用于:初始化多个工作线程,使用所述多个工作线程轮询请求队列,以处理文件重新编译的请求,将处理结果放置在结果队列中,并调用结果处理函数对所述结果队列处理。In the foregoing embodiment of the present application, the dependency matching unit is specifically configured to: initialize a plurality of worker threads, use the plurality of worker threads to poll the request queue, process the request for recompiling the file, and place the processing result in the result queue. And call the result handler to process the result queue.
通过以上技术方案,针对相关技术中的BMS开发过程中的软件集成效率过低的问题,在源文件发生改变时,通过正则匹配遍历该源文件对应的依赖文件,从而确定是否需要基于源码状态自动执行文件重新编译,这样,当确定需要重新编译时,就能为从源文件起的所有文件实现自动重新编译,而无需大量人工操作,提升了软件集成效率,降低了编译成本。Through the above technical solution, for the problem that the software integration efficiency in the BMS development process in the related art is too low, when the source file is changed, the dependency file corresponding to the source file is traversed by the regular matching to determine whether the source code state needs to be automatically determined. Execution files are recompiled so that when it is determined that recompilation is required, automatic recompilation of all files from the source file can be achieved without a lot of manual operations, which improves software integration efficiency and reduces compilation costs.
附图说明DRAWINGS
为了更清楚地说明本申请实施例的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其它的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings used in the embodiments will be briefly described below. It is obvious that the drawings in the following description are only some embodiments of the present application. One of ordinary skill in the art can also obtain other drawings based on these drawings without paying for inventive labor.
图1示出了根据本申请的一个实施例的编译方法的流程图;FIG. 1 shows a flow chart of a compiling method according to an embodiment of the present application;
图2示出了根据本申请的一个实施例的编译系统的框图;2 shows a block diagram of a compilation system in accordance with one embodiment of the present application;
图3示出了根据本申请的一个实施例的Emake子系统的逻辑架构图;3 shows a logical architecture diagram of an Emake subsystem in accordance with one embodiment of the present application;
图4示出了根据本申请的一个实施例的线程池工作模型的示意图。4 shows a schematic diagram of a thread pool work model in accordance with one embodiment of the present application.
具体实施方式detailed description
为了更好的理解本申请的技术方案,下面结合附图对本申请实施例进行详细描述。 For a better understanding of the technical solutions of the present application, the embodiments of the present application are described in detail below with reference to the accompanying drawings.
应当明确,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其它实施例,都属于本申请保护的范围。It should be understood that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present application without departing from the inventive scope are the scope of the present application.
在本申请实施例中使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本申请。在本申请实施例和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。The terms used in the embodiments of the present application are for the purpose of describing particular embodiments only, and are not intended to limit the application. The singular forms "a", "the", and "the"
图1示出了根据本申请的一个实施例的编译方法的流程图。FIG. 1 shows a flow chart of a compiling method in accordance with one embodiment of the present application.
如图1所示,本申请实施例提供的编译方法,包括:As shown in FIG. 1 , the compiling method provided by the embodiment of the present application includes:
步骤102,实时检测源文件是否发生改变。In step 102, it is detected in real time whether the source file has changed.
步骤104,当确定所述源文件发生改变时,通过正则匹配遍历所述源文件对应的依赖文件,以确定是否对所述源文件进行重新编译。Step 104: When it is determined that the source file is changed, traversing the dependency file corresponding to the source file by regular matching to determine whether to recompile the source file.
在上述技术方案中,在检测到源文件发生改变时,需要进一步确定是否对该源文件进行重新编译,具体来说,需要通过正则匹配遍历该源文件对应的依赖文件,从而确定是否需要基于源码状态自动执行文件重新编译,这样,当确定需要重新编译时,就能为从源文件起的所有文件实现自动重新编译,而无需大量人工操作,提升了软件集成效率,降低了编译成本。In the above technical solution, when it is detected that the source file is changed, it is necessary to further determine whether to recompile the source file. Specifically, the dependency file corresponding to the source file needs to be traversed by regular matching to determine whether the source code is needed. The state automatically performs file recompilation, so that when it is determined that recompilation is required, automatic recompilation of all files from the source file can be achieved without a lot of manual operations, which improves software integration efficiency and reduces compilation costs.
本实施例中,执行主体为Emake系统。Emake是ECS的后台子系统,是一款用eyy4.11开发的控制台程序,将控制台应用程序设计为没有图形用户界面,并编译成独立的可执行文件。控制台应用程序通常从命令行运行,同时在命令提示和运行的应用程序之间交换输入和输出信息。因为信息可写入控制台窗口并从控制台窗口读取,所以这使控制台应用程序成为ECS引入持续集成之服务器编译的绝佳途径,而不必考虑用户界面。In this embodiment, the execution subject is an Emake system. Emake is the back-end subsystem of ECS. It is a console program developed with eey4.11. The console application is designed without a graphical user interface and compiled into a separate executable. Console applications typically run from the command line while exchanging input and output information between command prompts and running applications. Because the information can be written to and read from the console window, this makes the console application a great way for ECS to introduce a continuously integrated server compilation, regardless of the user interface.
在本申请上述实施例中,在步骤104之前,还包括:获取当前系统环境;根据当前系统环境,重新配置编译配置信息,以供在需要进行重新编译时使用编译配置信息;以及将编译配置信息保存在配置文件中。 In the foregoing embodiment of the present application, before step 104, the method further includes: acquiring a current system environment; reconfiguring the compiled configuration information according to the current system environment, so that the compiled configuration information is used when recompilation is required; and the configuration information is compiled. Save in the configuration file.
本实施例中,执行主体为Emake系统,Emake系统在开始工作之前,需要知道当前的系统环境,比如标准库在哪里、编译器的安装位置在哪里、需要安装哪些组件等,通过指定编译配置信息,Emake系统就可以灵活适应环境,编译出各种环境都能运行的机器码等编译配置信息。这些编译配置信息保存在一个叫做project.ini的配置文件之中,它由ESB(Embedded System Build,嵌入式系统构建)生成,Emake系统通过读取这个配置文件,获知编译配置信息。In this embodiment, the execution body is an Emake system, and the Emake system needs to know the current system environment before starting work, such as where the standard library is, where the compiler is installed, which components need to be installed, etc., by specifying the configuration information. The Emake system can flexibly adapt to the environment and compile configuration information such as machine code that can be run in various environments. These compiled configuration information is stored in a configuration file called project.ini, which is generated by the ESB (Embedded System Build). The Emake system reads the configuration file to learn the compiled configuration information.
另外,project.ini配置文件可以考虑到不同系统的差异,并且对各种编译配置信息给出了默认值,如果用户的编译环境比较特别,或者有一些特定的需求,也可以手动向project.ini提供参数。In addition, the project.ini configuration file can take into account the differences between different systems, and gives default values for various compilation configuration information. If the user's compilation environment is special, or there are some specific requirements, you can also manually project.ini Provide parameters.
在本申请上述实施例中,步骤102具体包括:获取检测参数,其中,检测参数包括源文件的时间戳、源文件内容的哈希值和原编译配置信息中的一项或多项;以及检测检测参数是否发生变化,以确定源文件的实时变化状态。In the foregoing embodiment of the present application, the step 102 includes: acquiring a detection parameter, where the detection parameter includes one or more of a time stamp of the source file, a hash value of the source file content, and original compilation configuration information; and detecting Check if the parameters have changed to determine the real-time status of the source file.
Emake系统可通过文件的时间戳来判断文件是否需要进行重新编译,当文件版本回滚后或编译参数变更后,Emake系统不会对文件再次进行编译。The Emake system can determine whether the file needs to be recompiled by the timestamp of the file. After the file version is rolled back or the compilation parameters are changed, the Emake system will not compile the file again.
另外,除了使用文件的时间戳,还可以基于文件内容的哈希值以及编译参数作为增量编译的判断标准,这样,增量编译的准确性会更高。In addition, in addition to using the timestamp of the file, it is also possible to use the hash value of the file content and the compilation parameter as the criterion for the incremental compilation, so that the accuracy of the incremental compilation is higher.
在本申请上述实施例中,源文件的数量为多个,以及步骤104具体包括:并发运行多个文件重新编译的测试进程,以供在需要对所述源文件进行重新编译时基于源码状态进行文件重新编译。In the above embodiment of the present application, the number of source files is multiple, and step 104 specifically includes: concurrently running a test process of recompiling multiple files for being based on the source state when the source file needs to be recompiled. The file is recompiled.
将程序以及依赖库从源码状态进行编译,解决了c或c++程序因编译选项、操作系统平台或库文件版本不同而造成的兼容性问题。Compiling the program and dependent libraries from the source state resolves compatibility issues caused by c or C++ programs due to compilation options, operating system platforms, or library file versions.
在本申请上述实施例中,并发运行多个文件重新编译的测试进程的步骤,具体包括:初始化多个工作线程;使用多个工作线程轮询请求队列,以处理文件重新编译的请求;将处理结果放置在结果队列中;调用结果处理函数对结果队列进行处理。 In the foregoing embodiment of the present application, the step of concurrently running a test process of recompiling multiple files specifically includes: initializing a plurality of worker threads; and using a plurality of worker threads to poll the request queue to process a request for file recompilation; The result is placed in the result queue; the result handler is called to process the result queue.
其中,Emake系统使用易语言的Queue(队列)来实现线程同步。Among them, Emake system uses easy language Queue (queue) to achieve thread synchronization.
图2示出了根据本申请的一个实施例的编译系统的框图。2 shows a block diagram of a compilation system in accordance with one embodiment of the present application.
如图2所示,本申请实施例提供的编译系统200,包括:源文件检测单元202和依赖匹配单元204。As shown in FIG. 2, the compiling system 200 provided by the embodiment of the present application includes: a source file detecting unit 202 and a dependency matching unit 204.
其中,源文件检测单元202用于实时检测源文件是否发生改变;依赖匹配单元204用于当确定所述源文件发生改变时,通过正则匹配遍历所述源文件对应的依赖文件,以确定是否对所述源文件进行重新编译。The source file detecting unit 202 is configured to detect, in real time, whether the source file is changed. The dependency matching unit 204 is configured to: when determining that the source file is changed, traverse the dependent file corresponding to the source file by regular matching to determine whether The source file is recompiled.
本实施例中,执行主体为Emake系统。Emake是ECS的后台子系统,是一款用eyy4.11开发的控制台程序,将控制台应用程序设计为没有图形用户界面,并编译成独立的可执行文件。控制台应用程序通常从命令行运行,同时在命令提示和运行的应用程序之间交换输入和输出信息。因为信息可写入控制台窗口并从控制台窗口读取,所以这使控制台应用程序成为ECS引入持续集成之服务器编译的绝佳途径,而不必考虑用户界面。In this embodiment, the execution subject is an Emake system. Emake is the back-end subsystem of ECS. It is a console program developed with eey4.11. The console application is designed without a graphical user interface and compiled into a separate executable. Console applications typically run from the command line while exchanging input and output information between command prompts and running applications. Because the information can be written to and read from the console window, this makes the console application a great way for ECS to introduce a continuously integrated server compilation, regardless of the user interface.
在上述技术方案中,在检测到源文件发生改变时,需要进一步确定是否对该源文件进行重新编译,具体来说,需要通过正则匹配遍历该源文件对应的依赖文件,从而确定是否需要基于源码状态自动执行文件重新编译,这样,当确定需要重新编译时,就能为从源文件起的所有文件实现自动重新编译,而无需大量人工操作,提升了软件集成效率,降低了编译成本。In the above technical solution, when it is detected that the source file is changed, it is necessary to further determine whether to recompile the source file. Specifically, the dependency file corresponding to the source file needs to be traversed by regular matching to determine whether the source code is needed. The state automatically performs file recompilation, so that when it is determined that recompilation is required, automatic recompilation of all files from the source file can be achieved without a lot of manual operations, which improves software integration efficiency and reduces compilation costs.
在本申请上述实施例中,还包括:环境获取单元206,在依赖匹配单元遍历所述源文件对应的依赖文件之前,获取当前系统环境;配置单元208,根据当前系统环境,重新配置编译配置信息,以供在需要进行重新编译时使用编译配置信息;以及保存单元210,将编译配置信息保存在配置文件中。In the above embodiment of the present application, the method further includes: the environment obtaining unit 206: acquiring the current system environment before the dependent matching unit traverses the dependent file corresponding to the source file; and the configuring unit 208, reconfiguring the compiled configuration information according to the current system environment. For compiling configuration information when recompilation is required; and saving unit 210, saving the compiled configuration information in the configuration file.
Emake系统在开始工作之前,需要知道当前的系统环境,比如标准库在哪里、编译器的安装位置在哪里、需要安装哪些组件等,通过指定编译配置信息,Emake系统就可以灵活适应环境,编译出各种环境都能运行的机器码等编译配置信息。这些编译配置信息保存在一个叫做project.ini的配置文件 之中,它由ESB生成,Emake系统通过读取这个配置文件,获知编译配置信息。Before starting the work, the Emake system needs to know the current system environment, such as where the standard library is, where the compiler is installed, what components need to be installed, etc. By specifying the compilation configuration information, the Emake system can flexibly adapt to the environment and compile it. Compile configuration information such as machine code that can be run in various environments. These compilation configuration information is saved in a configuration file called project.ini Among them, it is generated by the ESB, and the Emake system learns the compiled configuration information by reading this configuration file.
另外,project.ini配置文件可以考虑到不同系统的差异,并且对各种编译配置信息给出了默认值,如果用户的编译环境比较特别,或者有一些特定的需求,也可以手动向project.ini提供参数。In addition, the project.ini configuration file can take into account the differences between different systems, and gives default values for various compilation configuration information. If the user's compilation environment is special, or there are some specific requirements, you can also manually project.ini Provide parameters.
在本申请上述实施例中,源文件检测单元202具体用于:获取检测参数,其中,检测参数包括源文件的时间戳、源文件内容的哈希值和原编译配置信息中的一项或多项,以及检测检测参数是否发生变化,以确定源文件的实时变化状态。In the foregoing embodiment of the present application, the source file detecting unit 202 is specifically configured to: acquire a detection parameter, where the detection parameter includes one or more of a time stamp of the source file, a hash value of the source file content, and original compilation configuration information. Item, and detecting whether the detection parameter has changed to determine the real-time change status of the source file.
Emake系统可通过文件的时间戳来判断文件是否需要进行重新编译,当文件版本回滚后或编译参数变更后,Emake系统不会对文件再次进行编译。The Emake system can determine whether the file needs to be recompiled by the timestamp of the file. After the file version is rolled back or the compilation parameters are changed, the Emake system will not compile the file again.
另外,ECS除了使用文件的时间戳,还可以基于文件内容的哈希值以及编译参数作为增量编译的判断标准,这样,增量编译的准确性会更高。In addition, in addition to using the timestamp of the file, ECS can also be based on the hash value of the file content and the compilation parameters as the criterion for incremental compilation, so that the accuracy of incremental compilation will be higher.
在本申请上述实施例中,源文件的数量为多个,以及依赖匹配单元204具体用于:并发运行多个文件重新编译的测试进程,以供在需要对所述源文件进行重新编译时基于源码状态进行文件重新编译。In the foregoing embodiment of the present application, the number of source files is multiple, and the dependency matching unit 204 is specifically configured to: concurrently run a test process of recompiling multiple files for re-compiling when the source file needs to be recompiled. The source state is recompiled in the file.
在本申请上述实施例中,依赖匹配单元204具体用于:初始化多个工作线程,使用多个工作线程轮询请求队列,以处理文件重新编译的请求,将处理结果放置在结果队列中,并调用结果处理函数对结果队列处理。In the foregoing embodiment of the present application, the dependency matching unit 204 is specifically configured to: initialize a plurality of worker threads, use multiple worker threads to poll the request queue, process the request for file recompilation, and place the processing result in the result queue, and The result handler is called to process the result queue.
图3示出了根据本申请的一个实施例的Emake子系统的逻辑架构图。FIG. 3 shows a logical architecture diagram of an Emake subsystem in accordance with one embodiment of the present application.
如图3所示,Emake子系统是ECS的后台子系统,是一款用eyy4.11开发的控制台程序,将控制台应用程序设计为没有图形用户界面,并编译成独立的可执行文件。As shown in Figure 3, the Emake subsystem is the back-end subsystem of ECS. It is a console program developed with eey4.11. The console application is designed to have no graphical user interface and compiled into a separate executable.
在应用层,控制台应用程序通常从控制台命令处理集的命令行运行,在请求接入后,对该请求的命令、协议进行解析,并调用功能处理模块进行服务定位、资源调度等控制调度,最后,使用应用逻辑进行应用处理,得到系 统输出,其中,系统输出包括过程日志的输出和结果报表输出。At the application layer, the console application usually runs from the command line of the console command processing set. After the request is accessed, the command and protocol of the request are parsed, and the function processing module is called to perform control scheduling such as service positioning and resource scheduling. Finally, using application logic for application processing, get the system System output, where the system output includes the output of the process log and the output of the result report.
其中,功能处理模块具有编译管理、目标生成管理、静态检测处理、并发控制、打包处理和单元测试处理的功能,其中,编译管理的模块连接至依赖引擎。The function processing module has the functions of compilation management, target generation management, static detection processing, concurrency control, packaging processing, and unit test processing, wherein the compiler management module is connected to the dependency engine.
综上,在应用层,控制台应用程序通常从控制台命令处理集的命令行运行,同时在命令提示和运行的应用程序之间交换输入和输出信息。因为信息可写入控制台窗口并从控制台窗口读取,所以这使控制台应用程序成为ECS引入持续集成之服务器编译的绝佳途径,而不必考虑用户界面。In summary, at the application level, the console application typically runs from the command line of the console command processing set, while exchanging input and output information between the command prompt and the running application. Because the information can be written to and read from the console window, this makes the console application a great way for ECS to introduce a continuously integrated server compilation, regardless of the user interface.
其中,Emake子系统的内存处理机制概述如下:Among them, the memory processing mechanism of the Emake subsystem is summarized as follows:
Emake子系统的内存处理机制采用一款高效、灵活、跨平台的内存池实现,其中,内存被划分为节点(node)和切片(slice),node为一大块内存,slice为node上的小片内存,从内存池中申请的每一个内存都属于一个slice。每一个内存池实例里的slice的大小都是一样的,所以这个内存池更像对象池。基于该内存池,可实现一款更加灵活的可以从中申请不同尺寸内存的内存池。The memory processing mechanism of the Emake subsystem uses an efficient, flexible, cross-platform memory pool implementation, in which memory is divided into nodes and slices, node is a large chunk of memory, and slice is a small piece on node. Memory, every memory requested from the memory pool belongs to a slice. The size of the slice in each memory pool instance is the same, so this memory pool is more like an object pool. Based on this memory pool, a more flexible memory pool from which different sizes of memory can be applied can be realized.
具体来说,可用的node链接成一个链表,可用的slice也链接成一个链表。当从内存池中申请内存时,首先检查是否有空闲的slice,如果有,则取出一个,如果没有,就检查最近申请的node里是否还有从未使用过的切片。Specifically, the available nodes are linked into a linked list, and the available slices are also linked into a linked list. When requesting memory from the memory pool, first check if there is a free slice, if there is, then take one, if not, check if there are any unused tiles in the recently applied node.
如果最近申请的node里有从未使用过的slice,那么取出一个,如果没有,则将这个node添加到node链表的头部,再申请一个新node,并从中取出一个slice,并返回。这样,在释放内存时,仅需要将slice插入到空闲的slice链表头部。If there is a slice in the recently applied node that has never been used, then take one. If not, add the node to the head of the node list, apply for a new node, and take a slice from it and return. Thus, when freeing up memory, you only need to insert the slice into the free slice list header.
上述内存池被组织为树状结构。当创建一个内存池时,可以为其指定父内存池,在调用elr_mpl_create(创建函数)时使用父内存池的指针作为第一个参数即可。The above memory pools are organized into a tree structure. When creating a memory pool, you can specify a parent memory pool for it, and use the pointer of the parent memory pool as the first parameter when calling elr_mpl_create (create function).
当一个作为父内存池的内存池被销毁时,它的子内存池也会被销毁。所 以,当一个作为父内存池的内存池和它的子内存池不再使用时,不必将所有的内存池一一销毁,仅仅为父内存池调用销毁接口即可。When a memory pool that is a parent memory pool is destroyed, its child memory pool is also destroyed. Place Therefore, when a memory pool as a parent memory pool and its child memory pool are no longer used, it is not necessary to destroy all the memory pools one by one, and only destroy the interface for the parent memory pool.
如果在创建内存池时不指定父内存池,那么一个全局的内存池就是它的父内存池。这个全局的内存池是在第一次调用elr_mpl_init(初始化内存池函数)时被创建的,所有的内存池结构所占据的内存空间都来自于这个全局内存池。在最后一次调用elr_mpl_finalize(终止化函数)内存池时,这个全局内存池被销毁。同时,可以看出,所有的内存池实例都是这个全局内存池的直接或者间接的子内存池,那么当elr_mpl_finalize被调用后,所有的内存池实例也将被销毁,从而将内存泄露的可能性降到了最低。If you do not specify a parent memory pool when you create a memory pool, then a global memory pool is its parent memory pool. This global memory pool is created the first time you call elr_mpl_init (initialize the memory pool function), and the memory space occupied by all memory pool structures comes from this global memory pool. This global memory pool was destroyed the last time the elr_mpl_finalize (terminating function) memory pool was called. At the same time, it can be seen that all the memory pool instances are direct or indirect sub-memory pools of this global memory pool, then when the elr_mpl_finalize is called, all the memory pool instances will also be destroyed, thus the possibility of leaking memory. Dropped to a minimum.
Emake子系统的内存池也支持多线程,如果需要在多线程环境下使用它,则需要实现六个接口,并且在编译时定义易语言常量ELR_USE_THREAD。The memory pool of the Emake subsystem also supports multithreading. If you need to use it in a multithreaded environment, you need to implement six interfaces and define the easy language constant ELR_USE_THREAD at compile time.
图4示出了根据本申请的一个实施例的线程池工作模型的示意图。4 shows a schematic diagram of a thread pool work model in accordance with one embodiment of the present application.
在Emake子系统中的依赖文件处理、嵌套遍历处理、日志处理等逻辑较为复杂的过程中,各个接口可能会交叉使用和修改资源数据,这样就很容易导致并发问题,如果对于每个资源都要考虑如何保证其并发安全问题,那么整个分析过程就会变得很复杂,而复杂的逻辑往往容易有所疏漏。In the process of logic processing such as file processing, nested traversal processing, and log processing in the Emake subsystem, each interface may cross-use and modify resource data, which easily leads to concurrency problems, if for each resource. To consider how to ensure concurrent security issues, the entire analysis process becomes complicated, and complex logic is often overlooked.
如图4所示的线程池模型就是用来屏蔽单次编译的并发问题的,即编译线程访问自己的资源时不需要考虑其并发安全问题(多个编译访问的资源依然需要处理),具体地,可以将编译的请求排序并调用线程池中的线程依次处理。The thread pool model shown in Figure 4 is used to shield the concurrency problem of a single compilation, that is, the compile thread does not need to consider its concurrent security problem when accessing its own resources (multiple compile access resources still need to be processed), specifically You can sort the compiled requests and call the threads in the thread pool in turn.
线程池模型包括如下几个部分:The thread pool model includes the following sections:
1、线程池管理器(ThreadPool),用于启动、增加、停用、管理线程池。1, thread pool manager (ThreadPool), used to start, increase, disable, manage the thread pool.
2、工作线程(WorkThread),为线程池中的线程,可将执行结果放置到结果队列。2. The worker thread (WorkThread), which is a thread in the thread pool, can place the execution result into the result queue.
3、请求接口(WorkRequest),在图中未示出,用于创建请求对象,以 供工作线程调度任务的执行。3, the request interface (WorkRequest), not shown in the figure, used to create the request object, For the worker thread to schedule the execution of the task.
4、请求队列(RequestQueue),用于存放和提取请求,线程池管理器向请求队列中添加请求。4. A request queue (RequestQueue) for storing and extracting requests, and the thread pool manager adds a request to the request queue.
5、结果队列(ResultQueue),用于存储请求执行结果,线程池管理器可以从结果队列中获取执行结果。5. The result queue (ResultQueue) is used to store the result of the request execution, and the thread pool manager can obtain the execution result from the result queue.
线程池管理器通过添加请求(putRequest)的方法向请求队列添加请求,这些请求事先需要通过传递工作函数、参数、结果处理函数、以及异常处理函数等实现请求接口,接着,初始化一定数量的工作线程,这些工作线程通过轮询的方式不断查看请求队列,只要有请求存在,则会提取出请求并执行。The thread pool manager adds requests to the request queue by adding a request (putRequest). These requests need to implement the request interface by passing work functions, parameters, result handlers, and exception handlers, and then initialize a certain number of worker threads. These worker threads continuously look at the request queue by polling, and as long as a request exists, the request is fetched and executed.
然后,线程池管理器调用方法(poll)查看结果队列是否有值,如果有值,则取出,调用结果处理函数执行。Then, the thread pool manager calls the method (poll) to see if the result queue has a value. If there is a value, it is fetched and the result processing function is called.
通过上述技术方案可知,Emake子系统的核心资源在于请求队列和结果队列,工作线程通过轮询请求队列获得任务,主线程通过查看结果队列获得执行结果。According to the foregoing technical solution, the core resources of the Emake subsystem are the request queue and the result queue, and the worker thread obtains the task by polling the request queue, and the main thread obtains the execution result by viewing the result queue.
因此,队列设计需要实现线程同步、一定阻塞和超时机制,以防止因不断轮询而导致的过多CPU(中央处理器)开销。Therefore, queue design requires thread synchronization, certain blocking, and timeout mechanisms to prevent excessive CPU (Central Processing Unit) overhead due to constant polling.
另外,Emake子系统在开始工作之前,需要知道当前的系统环境,比如标准库在哪里、编译器的安装位置在哪里、需要安装哪些组件等,通过指定编译配置信息,Emake子系统就可以灵活适应环境,编译出各种环境都能运行的机器码等编译配置信息。这些编译配置信息保存在一个叫做proiect.ini的配置文件之中,它由ESB生成,Emake子系统通过读取这个配置文件,获知编译配置信息。In addition, the Emake subsystem needs to know the current system environment before starting work, such as where the standard library is, where the compiler is installed, which components need to be installed, etc. By specifying the compilation configuration information, the Emake subsystem can be flexibly adapted. The environment compiles configuration information such as machine code that can be run in various environments. These compiled configuration information is stored in a configuration file called proiect.ini, which is generated by the ESB. The Emake subsystem reads the configuration file to learn the compiled configuration information.
另外,project.ini配置文件可以考虑到不同系统的差异,并且对各种编译配置信息给出了默认值,如果用户的编译环境比较特别,或者有一些特定的需求,也可以手动向project.ini提供参数。In addition, the project.ini configuration file can take into account the differences between different systems, and gives default values for various compilation configuration information. If the user's compilation environment is special, or there are some specific requirements, you can also manually project.ini Provide parameters.
进一步地,需要确定标准库和头文件的位置。 Further, the location of the standard library and header files needs to be determined.
源码用到的标准库函数(standard library)和头文件(header)可以存放在系统的任意目录中,Emake子系统从配置文件中可以知道标准库和头文件的位置。一般来说,配置文件会给出一个清单,列出几个具体的目录,等到编译时,编译器就按顺序到这几个目录中,寻找目标。The standard library and headers used by the source code can be stored in any directory on the system. The Emake subsystem can know the location of the standard library and header files from the configuration file. In general, the configuration file will give a list of several specific directories. When compiling, the compiler will go to these directories in order to find the target.
更进一步地,需要确定源文件的依赖文件,换句话说,需要获取到源码文件之间的依赖关系,由源码文件之间的依赖关系,编译器可以确定编译的先后顺序。假定A文件依赖于B文件,Emake子系统应该保证做到下面两点:Further, the dependent file of the source file needs to be determined. In other words, the dependency relationship between the source files needs to be obtained, and the compiler can determine the order of compilation by the dependencies between the source files. Assuming the A file depends on the B file, the Emake subsystem should guarantee the following two points:
(1)只有在B文件编译完成后,才开始编译A文件。(1) The A file is only compiled after the B file is compiled.
(2)当B文件发生变化时,A文件会被重新编译。(2) When the B file changes, the A file will be recompiled.
依赖关系保存在一个叫做.d的文件中,里面列出源文件的依赖文件。在确定依赖关系的同时,Emake子系统也确定了,编译时会用到哪些头文件。Dependencies are stored in a file called .d, which lists the dependencies of the source files. While determining the dependencies, the Emake subsystem also determines which header files are used at compile time.
接下来,需要进行头文件的预编译。Next, you need to precompile the header files.
具体来说,不同的源码文件可能引用同一个头文件(比如stdio.h),编译的时候,头文件也必须一起编译。因此,为了节省时间,Emake子系统会在编译源码之前,先编译头文件,这保证了头文件只需编译一次。Specifically, different source files may reference the same header file (such as stdio.h). When compiling, the header files must also be compiled together. Therefore, in order to save time, the Emake subsystem will compile the header file before compiling the source code, which ensures that the header file only needs to be compiled once.
不过,并不是头文件的所有内容都会被预编译,用来声明宏的#define命令,就不会被预编译。However, not all of the contents of the header file are precompiled, and the #define command used to declare the macro will not be precompiled.
预编译完成后,编译器就开始替换掉源码中bash的头文件和宏。After the precompilation is complete, the compiler begins to replace the bash header files and macros in the source code.
插入源码是预编译后的结果,编译器在这一步还会移除注释。Inserting the source code is the result of precompilation, and the compiler will remove the comment in this step.
这一步称为预处理,在完成预处理之后,Emake子系统就开始生成机器码,对于有些编译器来说,还存在一个中间步骤,即先把源码转为汇编码,然后再把汇编码转为机器码。This step is called pre-processing. After the pre-processing is completed, the Emake subsystem starts to generate machine code. For some compilers, there is an intermediate step, that is, first convert the source code into the assembly code, and then transfer the assembly code. For the machine code.
转码后的文件称为object file(对象文件),对象文件还不能运行,必须进一步转成可执行文件。程序要正常运行,还必须有stdout和fwrite这两个函数的代码,它们是由C语言的标准库提供的。The transcoded file is called an object file. The object file cannot be run yet and must be further converted into an executable file. For the program to run properly, you must also have the code for the two functions stdout and fwrite, which are provided by the standard library of the C language.
Emake子系统的下一步工作,就是把外部函数的代码(通常是后缀名 为.1ib和.a的文件)添加到可执行文件中,即linking(连接)步骤,这种通过拷贝将外部函数库添加到可执行文件的方式,叫做static linking(静态连接)。The next step in the Emake subsystem is to put the code of the external function (usually the suffix name). Add the .1ib and .a files to the executable, the linking step, which is a way to add an external library to the executable by copying it, called static linking.
以上结合附图详细说明了本申请的技术方案,通过本申请的技术方案,在源文件发生改变时,需要通过正则匹配遍历该源文件对应的依赖文件,从而确定是否需要基于源码状态自动执行文件重新编译,这样,当确定需要重新编译时,就能为从源文件起的所有文件实现自动重新编译,而无需大量人工操作,提升了软件集成效率,降低了编译成本。The technical solution of the present application is described in detail above with reference to the accompanying drawings. When the source file is changed, the dependency file corresponding to the source file needs to be traversed by regular matching to determine whether the file needs to be automatically executed based on the source code status. Recompile, so that when it is determined that recompilation is required, automatic recompilation of all files from the source file can be achieved without a lot of manual operations, which improves software integration efficiency and reduces compilation costs.
取决于语境,如在此所使用的词语“如果”可以被解释成为“在......时”或“当......时”或“响应于确定”或“响应于检测”。类似地,取决于语境,短语“如果确定”或“如果检测(陈述的条件或事件)”可以被解释成为“当确定时”或“响应于确定”或“当检测(陈述的条件或事件)时”或“响应于检测(陈述的条件或事件)”。Depending on the context, the word "if" as used herein may be interpreted as "when" or "when" or "in response to a determination" or "in response to Detection". Similarly, depending on the context, the phrase "if determined" or "if detected (conditions or events stated)" may be interpreted as "when determined" or "in response to determination" or "when detected (stated condition or event) "Time" or "in response to a test (condition or event stated)".
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如,多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided by the present application, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the device embodiments described above are merely illustrative. For example, the division of the unit is only a logical function division. In actual implementation, there may be another division manner. For example, multiple units or components may be combined. Or it can be integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
上述以软件功能单元的形式实现的集成的单元,可以存储在一个计算机可读取存储介质中。上述软件功能单元存储在一个存储介质中,包括若干指 令用以使得一台计算机装置(可以是个人计算机,服务器,或者网络装置等)或处理器(Processor)执行本申请各个实施例所述方法的部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The above-described integrated unit implemented in the form of a software functional unit can be stored in a computer readable storage medium. The above software functional unit is stored in a storage medium, including several fingers Some steps of a method for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor to perform the methods described in various embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like, which can store program codes. .
以上所述仅为本申请的较佳实施例而已,并不用以限制本申请,凡在本申请的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本申请保护的范围之内。 The above is only the preferred embodiment of the present application, and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc., which are made within the spirit and principles of the present application, should be included in the present application. Within the scope of protection.

Claims (10)

  1. 一种编译方法,其特征在于,包括:A compiling method, comprising:
    实时检测源文件是否发生改变;Real-time detection of whether the source file has changed;
    当确定所述源文件发生改变时,通过正则匹配遍历所述源文件对应的依赖文件,以确定是否对所述源文件进行重新编译。When it is determined that the source file is changed, the dependency file corresponding to the source file is traversed by regular matching to determine whether to recompile the source file.
  2. 根据权利要求1所述的编译方法,其特征在于,在通过正则匹配遍历所述源文件对应的依赖文件的步骤之前,还包括:The compiling method according to claim 1, wherein before the step of traversing the dependent file corresponding to the source file by regular matching, the method further comprises:
    获取当前系统环境;Get the current system environment;
    根据所述当前系统环境,重新配置编译配置信息,以供在需要进行重新编译时使用所述编译配置信息;以及Reconfiguring the compiled configuration information for use in the need to recompile the compiled configuration information according to the current system environment;
    将所述编译配置信息保存在配置文件中。The compiled configuration information is saved in a configuration file.
  3. 根据权利要求2所述的编译方法,其特征在于,实时检测源文件是否发生改变的步骤,具体包括:The compiling method according to claim 2, wherein the step of detecting whether the source file is changed in real time comprises:
    获取检测参数,其中,所述检测参数包括源文件的时间戳、源文件内容的哈希值和原编译配置信息中的一项或多项;以及Obtaining a detection parameter, where the detection parameter includes one or more of a time stamp of the source file, a hash value of the source file content, and the original compilation configuration information;
    检测所述检测参数是否发生变化,以确定所述源文件的实时变化状态。A determination is made as to whether the detected parameter has changed to determine a real-time change status of the source file.
  4. 根据权利要求1至3中任一项所述的编译方法,其特征在于,所述源文件的数量为多个,以及The compiling method according to any one of claims 1 to 3, wherein the number of the source files is plural, and
    通过正则匹配遍历所述源文件对应的依赖文件的步骤,具体包括:The step of traversing the dependency file corresponding to the source file by using a regular match includes:
    并发运行多个文件重新编译的测试进程,以供在需要对所述源文件进行重新编译时基于源码状态进行文件重新编译。A test process that runs multiple file recompilations concurrently for file recompilation based on source state when a recompilation of the source file is required.
  5. 根据权利要求4所述的编译方法,其特征在于,并发运行多个文件重新编译的测试进程的步骤,具体包括:The compiling method according to claim 4, wherein the step of concurrently running the test process of recompiling the plurality of files comprises:
    初始化多个工作线程;Initialize multiple worker threads;
    使用所述多个工作线程轮询请求队列,以处理文件重新编译的请求;Using the plurality of worker threads to poll the request queue to process a request for file recompilation;
    将处理结果放置在结果队列中;Place the processing result in the result queue;
    调用结果处理函数对所述结果队列进行处理。The result handler is called to process the result queue.
  6. 一种编译系统,其特征在于,包括: A compilation system, comprising:
    源文件检测单元,实时检测源文件是否发生改变;The source file detecting unit detects whether the source file has changed in real time;
    依赖匹配单元,当确定所述源文件发生改变时,通过正则匹配遍历所述源文件对应的依赖文件,以确定是否对所述源文件进行重新编译。Relying on the matching unit, when it is determined that the source file is changed, traversing the dependency file corresponding to the source file by regular matching to determine whether to recompile the source file.
  7. 根据权利要求6所述的编译系统,其特征在于,还包括:The compiling system according to claim 6, further comprising:
    环境获取单元,在所述依赖匹配单元遍历所述源文件对应的依赖文件之前,获取当前系统环境;The environment obtaining unit acquires a current system environment before the dependency matching unit traverses the dependent file corresponding to the source file;
    配置单元,根据所述当前系统环境,重新配置编译配置信息,以供在需要进行重新编译时使用所述编译配置信息;以及a configuration unit that reconfigures the compiled configuration information for use in the need to recompile the compiled configuration information according to the current system environment;
    保存单元,将所述编译配置信息保存在配置文件中。The saving unit saves the compiled configuration information in a configuration file.
  8. 根据权利要求7所述的编译系统,其特征在于,所述源文件检测单元具体用于:The compiling system according to claim 7, wherein the source file detecting unit is specifically configured to:
    获取检测参数,其中,所述检测参数包括源文件的时间戳、源文件内容的哈希值和原编译配置信息中的一项或多项,以及检测所述检测参数是否发生变化,以确定所述源文件的实时变化状态。Obtaining a detection parameter, where the detection parameter includes one or more of a time stamp of the source file, a hash value of the source file content, and the original compilation configuration information, and detecting whether the detection parameter changes to determine The real-time change status of the source file.
  9. 根据权利要求6至8中任一项所述的编译系统,其特征在于,所述源文件的数量为多个,以及The compiling system according to any one of claims 6 to 8, wherein the number of the source files is plural, and
    所述依赖匹配单元具体用于:The dependency matching unit is specifically configured to:
    并发运行多个文件重新编译的测试进程,以供在需要对所述源文件进行重新编译时基于源码状态进行文件重新编译。A test process that runs multiple file recompilations concurrently for file recompilation based on source state when a recompilation of the source file is required.
  10. 根据权利要求6至8中任一项所述的编译系统,所述依赖匹配单元具体用于:The compiling system according to any one of claims 6 to 8, wherein the dependency matching unit is specifically configured to:
    初始化多个工作线程,使用所述多个工作线程轮询请求队列,以处理文件重新编译的请求,将处理结果放置在结果队列中,并调用结果处理函数对所述结果队列处理。 Initializing a plurality of worker threads, using the plurality of worker threads to poll the request queue to process the file recompilation request, placing the processing result in the result queue, and calling the result processing function to process the result queue.
PCT/CN2017/093061 2016-10-17 2017-07-15 Compiling method and compiling system WO2018072493A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610900899.1 2016-10-17
CN201610900899.1A CN106325970A (en) 2016-10-17 2016-10-17 Compiling method and compiling system

Publications (1)

Publication Number Publication Date
WO2018072493A1 true WO2018072493A1 (en) 2018-04-26

Family

ID=57819472

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/093061 WO2018072493A1 (en) 2016-10-17 2017-07-15 Compiling method and compiling system

Country Status (2)

Country Link
CN (1) CN106325970A (en)
WO (1) WO2018072493A1 (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111104318A (en) * 2019-12-12 2020-05-05 北京爱奇艺科技有限公司 Unit test result exporting method and device and electronic equipment
CN111142877A (en) * 2019-12-19 2020-05-12 无锡中感微电子股份有限公司 Method, system and storage medium for automatically extracting interface function and parameter type of ROM chip patch
CN111626398A (en) * 2019-02-28 2020-09-04 上海寒武纪信息科技有限公司 Operation method, device and related product
CN112748927A (en) * 2020-12-30 2021-05-04 上海微盟企业发展有限公司 Project interface analysis method and related device
CN112882719A (en) * 2021-03-01 2021-06-01 山东浪潮通软信息科技有限公司 Compiling method, device, equipment and storage medium
CN112925526A (en) * 2021-03-30 2021-06-08 平安科技(深圳)有限公司 Leakcanar-based compiling method, device, equipment and medium
CN113126997A (en) * 2021-04-21 2021-07-16 多点(深圳)数字科技有限公司 Compiling method for generating multiple operation containers by front-end code
CN113835711A (en) * 2021-09-18 2021-12-24 苏州浪潮智能科技有限公司 Compiling control method and device for source code packet of operating system, storage medium and equipment
WO2023245449A1 (en) * 2022-06-21 2023-12-28 北京小米移动软件有限公司 Incremental compilation processing method and apparatus, and electronic device and storage medium
CN117311728A (en) * 2023-09-27 2023-12-29 北京计算机技术及应用研究所 OpenCL automatic translation method

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106325970A (en) * 2016-10-17 2017-01-11 宁德时代新能源科技股份有限公司 Compiling method and compiling system
CN109240698B (en) * 2017-06-08 2021-11-23 中国移动通信集团浙江有限公司 Incremental compiling processing method and device
CN109828759B (en) * 2018-12-15 2023-07-18 中国平安人寿保险股份有限公司 Code compiling method, device, computer device and storage medium
CN111596920A (en) * 2019-02-21 2020-08-28 迈普通信技术股份有限公司 File compiling method and device, compiling equipment and storage medium
CN110109673B (en) * 2019-04-25 2020-10-30 武汉大学 Compiler detection device and method based on Beidou subnanosecond high-precision time service
CN110837048A (en) * 2019-10-30 2020-02-25 深圳市新威尔电子有限公司 Battery detection system based on virtual machine and working method thereof
CN111191216B (en) * 2019-12-26 2024-02-06 航天信息股份有限公司 OFD signature client with JAVA interface and method and system for signature verification
CN112114811A (en) * 2020-08-19 2020-12-22 上海元城汽车技术有限公司 Compiling method, device and equipment
CN112181637B (en) * 2020-09-10 2022-11-11 苏州浪潮智能科技有限公司 Memory resource allocation method and device
CN112783508B (en) * 2021-02-01 2022-05-24 北京百度网讯科技有限公司 File compiling method, device, equipment and storage medium
CN115826938B (en) * 2022-01-29 2023-11-17 宁德时代新能源科技股份有限公司 Method and device for generating and using real-time operating system, electronic equipment and medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100064294A1 (en) * 2008-09-09 2010-03-11 Lockheed Martin Corporation Maintaining Vitality of Data In Safety-Critical Systems
CN102402427A (en) * 2010-09-09 2012-04-04 阿里巴巴集团控股有限公司 Method and device for updating Java application program
CN105335137A (en) * 2014-07-23 2016-02-17 国际商业机器公司 Method and device used for processing source file
CN106325970A (en) * 2016-10-17 2017-01-11 宁德时代新能源科技股份有限公司 Compiling method and compiling system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102811161A (en) * 2011-06-03 2012-12-05 盛乐信息技术(上海)有限公司 Router and network data transmission method thereof

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100064294A1 (en) * 2008-09-09 2010-03-11 Lockheed Martin Corporation Maintaining Vitality of Data In Safety-Critical Systems
CN102402427A (en) * 2010-09-09 2012-04-04 阿里巴巴集团控股有限公司 Method and device for updating Java application program
CN105335137A (en) * 2014-07-23 2016-02-17 国际商业机器公司 Method and device used for processing source file
CN106325970A (en) * 2016-10-17 2017-01-11 宁德时代新能源科技股份有限公司 Compiling method and compiling system

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111626398A (en) * 2019-02-28 2020-09-04 上海寒武纪信息科技有限公司 Operation method, device and related product
CN111626398B (en) * 2019-02-28 2022-12-09 上海寒武纪信息科技有限公司 Operation method, device and related product
CN111104318A (en) * 2019-12-12 2020-05-05 北京爱奇艺科技有限公司 Unit test result exporting method and device and electronic equipment
CN111142877A (en) * 2019-12-19 2020-05-12 无锡中感微电子股份有限公司 Method, system and storage medium for automatically extracting interface function and parameter type of ROM chip patch
CN111142877B (en) * 2019-12-19 2023-10-27 无锡中感微电子股份有限公司 Automatic extracting method, system and storage medium for interface function and parameter type of ROM chip patch
CN112748927A (en) * 2020-12-30 2021-05-04 上海微盟企业发展有限公司 Project interface analysis method and related device
CN112882719A (en) * 2021-03-01 2021-06-01 山东浪潮通软信息科技有限公司 Compiling method, device, equipment and storage medium
CN112882719B (en) * 2021-03-01 2024-03-22 浪潮通用软件有限公司 Compiling method, compiling device, compiling equipment and storage medium
CN112925526B (en) * 2021-03-30 2023-09-19 平安科技(深圳)有限公司 Compiling method, device, equipment and medium based on Leakcanary
CN112925526A (en) * 2021-03-30 2021-06-08 平安科技(深圳)有限公司 Leakcanar-based compiling method, device, equipment and medium
CN113126997A (en) * 2021-04-21 2021-07-16 多点(深圳)数字科技有限公司 Compiling method for generating multiple operation containers by front-end code
CN113835711B (en) * 2021-09-18 2023-08-15 苏州浪潮智能科技有限公司 Compiling control method and device of source code package of operating system, storage medium and equipment
CN113835711A (en) * 2021-09-18 2021-12-24 苏州浪潮智能科技有限公司 Compiling control method and device for source code packet of operating system, storage medium and equipment
WO2023245449A1 (en) * 2022-06-21 2023-12-28 北京小米移动软件有限公司 Incremental compilation processing method and apparatus, and electronic device and storage medium
CN117311728A (en) * 2023-09-27 2023-12-29 北京计算机技术及应用研究所 OpenCL automatic translation method

Also Published As

Publication number Publication date
CN106325970A (en) 2017-01-11

Similar Documents

Publication Publication Date Title
WO2018072493A1 (en) Compiling method and compiling system
EP3785127B1 (en) Selectively tracing portions of computer process execution
KR100868762B1 (en) Method of error detecting method for embedded sofeware
JP5893038B2 (en) Compile-time boundary checking for user-defined types
US20070277163A1 (en) Method and tool for automatic verification of software protocols
US9600411B2 (en) System and method for determining an object's lifetime in an object oriented environment
US20100153693A1 (en) Code execution with automated domain switching
US20070250825A1 (en) Compiling Alternative Source Code Based on a Metafunction
US10078575B2 (en) Diagnostics of state transitions
US9304762B2 (en) Automatically customizing a computer-executable application at runtime
CN112041824A (en) Selective tracing of computer process execution
US20060161896A1 (en) Performing debug requests that are within the debug domain of a class loader
TW201942736A (en) Function selection method and server
CN109284222B (en) Software unit, project testing method, device and equipment in data processing system
US11366657B2 (en) Inferring code deprecation from module deprecation
CN116578282A (en) Code generation method, device, electronic equipment and medium
Waddington et al. Dynamic analysis and profiling of multithreaded systems
Zhang et al. Understanding and statically detecting synchronization performance bugs in distributed cloud systems
CN115705250A (en) Monitoring stack usage to optimize programs
Andrzejak et al. Confguru-A system for fully automated debugging of configuration errors
Entrup et al. ARA: Automatic Instance-Level Analysis in Real-Time Systems
US20180032564A1 (en) Techniques of automatically generating dependencies for applications in embedded systems
Mlinarić Challenges in dynamic software updating
US20240103853A1 (en) Code maintenance system
Denisov Annotations-driven configuration framework for Java applications

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17862775

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17862775

Country of ref document: EP

Kind code of ref document: A1