CN106325970A - Compiling method and compiling system - Google Patents

Compiling method and compiling system Download PDF

Info

Publication number
CN106325970A
CN106325970A CN201610900899.1A CN201610900899A CN106325970A CN 106325970 A CN106325970 A CN 106325970A CN 201610900899 A CN201610900899 A CN 201610900899A CN 106325970 A CN106325970 A CN 106325970A
Authority
CN
China
Prior art keywords
file
source file
compiling
described source
configuration information
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
CN201610900899.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.)
Contemporary Amperex Technology Co Ltd
Original Assignee
Contemporary Amperex Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Contemporary Amperex Technology Co Ltd filed Critical Contemporary Amperex Technology Co Ltd
Priority to CN201610900899.1A priority Critical patent/CN106325970A/en
Publication of CN106325970A publication Critical patent/CN106325970A/en
Priority to PCT/CN2017/093061 priority patent/WO2018072493A1/en
Pending legal-status Critical Current

Links

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

Abstract

The invention provides a compiling method and a compiling system, wherein the compiling method comprises the following steps: detecting whether a source file is changed or not in real time; when the source file is determined to be changed, traversing the dependent file corresponding to the source file through regular matching to determine whether to recompile the source file. By the technical scheme, automatic recompilation of all files from the source file is conveniently realized without a large amount of manual operation, the software integration efficiency is improved, and the compiling cost is reduced.

Description

Compilation Method and compiling system
[technical field]
The present invention relates to background compilation technical field, particularly relate to a kind of Compilation Method and a kind of compiling system.
[background technology]
At present, along with the fast development of electric automobile, improving constantly BMS (battery management system), this allows for BMS Exploitation become increasingly complex, complexity and the cost of exploitation all increase severely.Such as, in AUTOSAR (automobile open systems framework), Use traditional Integrated Simulation to compile, often face and cause that ineffective systems, autgmentability are poor, construction cycle length, bug are many etc. Problem.
Specifically, BMS based on AUTOSAR develops, and the work that the compiling of its Integrated Simulation realizes is manual by developer Writing what source file script completed, the workload of this step is quite big, can consume for a long time, and wants developer's technology Ask the highest.And once having new function, developer must remodify script, and spend a lot of time and debug, sternly Ghost image rings development efficiency.
Therefore, how to promote the Integrated Simulation efficiency in BMS development process, become technical problem the most urgently to be resolved hurrily.
[summary of the invention]
Embodiments provide a kind of Compilation Method and a kind of compiling system, it is intended to solve BMS in correlation technique and open The problem that Integrated Simulation efficiency during Faing is too low, it is possible to promote Integrated Simulation efficiency, reduces compiling cost.
First aspect, embodiments provides a kind of Compilation Method, including: whether detection resources file changes in real time Become;The dependent file that described source file is corresponding is traveled through, to determine whether described source file is compiled again by canonical coupling Translate.
In the above embodiment of the present invention, in the step being traveled through dependent file corresponding to described source file by canonical coupling Before, also include: obtain current system environment;According to described current system environment, reconfigure compiling configuration information, for Described compiling configuration information is used when needs recompilate;And described compiling configuration information is saved in configuration file In.
In the above embodiment of the present invention, the step whether real-time detection resources file changes, specifically include: obtain inspection Surveying parameter, wherein, described detection parameter includes the timestamp of source file, the cryptographic Hash of source file content and former compiling configuration information In one or more;And detect whether described detection parameter changes, to determine the real-time change shape of described source file State.
In the above embodiment of the present invention, the quantity of described source file is multiple, and described by canonical coupling traversal The step of the dependent file that source file is corresponding, specifically includes: concurrently run multiple file recompilate test process, for Need to carry out file recompility based on source code state when described source file is recompilated.
In the above embodiment of the present invention, concurrently run the step of the test process that multiple file recompilates, specifically wrap Include: initialize multiple worker thread;Use the plurality of worker thread polling request queue, to process asking of file recompility Ask;Result is placed in result queue;Call result treatment function described result queue is processed.
Second aspect, embodiments provides a kind of compiling system, including: source file detector unit, detects in real time Whether source file changes;Rely on matching unit, travel through the dependent file that described source file is corresponding, with really by canonical coupling Determine whether described source file to be recompilated.
In the above embodiment of the present invention, also include: environment acquiring unit, travel through described source at described dependence matching unit Before the dependent file that file is corresponding, obtain current system environment;Dispensing unit, according to described current system environment, joins again Put compiling configuration information, for using described compiling configuration information when needs recompilate;And storage unit, by institute State compiling configuration information to be saved in configuration file.
In the above embodiment of the present invention, described source file detector unit specifically for: obtain detection parameter, wherein, institute State detection parameter and include or many in the timestamp of source file, the cryptographic Hash of source file content and former compiling configuration information , and detect whether described detection parameter changes, to determine the real-time change state of described source file.
In the above embodiment of the present invention, the quantity of described source file is multiple, and described dependence matching unit is concrete For: concurrently run the test process that multiple file recompilates, for when described source file is recompilated by needs File recompility is carried out based on source code state.
In the above embodiment of the present invention, described dependence matching unit specifically for: initialize multiple worker thread, use The plurality of worker thread polling request queue, to process the request that file recompilates, is placed on result team by result In row, and call result treatment function described result queue is processed.
By above technical scheme, for too low the asking of Integrated Simulation efficiency in the BMS development process in correlation technique Topic, when source file changes, travels through, by canonical coupling, the dependent file that this source file is corresponding, determines whether needs Automatically perform file based on source code state to recompilate, so, when determine need to recompilate time, can be from source file just All Files realizes automatically recompilating, and without a large amount of manual operations, improves Integrated Simulation efficiency, reduces and is compiled into This.
[accompanying drawing explanation]
In order to be illustrated more clearly that the technical scheme of the embodiment of the present invention, below by embodiment required use attached Figure is briefly described, it should be apparent that, the accompanying drawing in describing below is only some embodiments of the present invention, for this area From the point of view of those of ordinary skill, on the premise of not paying creative work, it is also possible to obtain the attached of other according to these accompanying drawings Figure.
Fig. 1 shows the flow chart of Compilation Method according to an embodiment of the invention;
Fig. 2 shows the block diagram of compiling system according to an embodiment of the invention;
Fig. 3 shows the logical architecture figure of Emake subsystem according to an embodiment of the invention;
Fig. 4 shows the schematic diagram of thread pool work model according to an embodiment of the invention.
[detailed description of the invention]
In order to be better understood from technical scheme, below in conjunction with the accompanying drawings the embodiment of the present invention is retouched in detail State.
It will be appreciated that described embodiment be only the present invention a part of embodiment rather than whole embodiments.Base Embodiment in the present invention, those of ordinary skill in the art obtained under not making creative work premise all its Its embodiment, broadly falls into the scope of protection of the invention.
The term used in embodiments of the present invention is only merely for describing the purpose of specific embodiment, and is not intended to be limiting The present invention." a kind of ", " described " and " being somebody's turn to do " of singulative used in the embodiment of the present invention and appended claims It is also intended to include most form, unless context clearly shows that other implications.
Fig. 1 shows the flow chart of Compilation Method according to an embodiment of the invention.
As it is shown in figure 1, the Compilation Method that the embodiment of the present invention provides, including:
Step 102, whether real-time detection resources file changes.
Step 104, when determining that described source file changes, by canonical coupling traversal corresponding the depending on of described source file Rely file, to determine whether described source file is recompilated.
In technique scheme, when detecting that source file changes, need to further determine whether this source document Part recompilates, in particular it is necessary to travel through the dependent file that this source file is corresponding, so that it is determined that be by canonical coupling No needs automatically perform file based on source code state and recompilate, so, when determine need to recompilate time, can be just from source document The All Files that part rises realizes automatically recompilating, and without a large amount of manual operations, improves Integrated Simulation efficiency, reduces volume It is translated into this.
In the present embodiment, executive agent is Emake system.Emake is the rear station subsystem of ECS, is a eyy4.11 The Console program of exploitation, by control station application programming for not having graphic user interface, and is compiled into independent performing File.Control station application program generally runs from order line, exchanges defeated between command cue and the application program of operation simultaneously Enter and output information.Because information writable control station window also reads, so this makes control station application journey from control station window Sequence becomes the excellent approach that ECS introduces the server compiling of continuous integrating, without considering user interface.
In the above embodiment of the present invention, before step 104, also include: obtain current system environment;According to current system System environment, reconfigures compiling configuration information, for using compiling configuration information when needs recompilate;And will compile Translate configuration information to be saved in configuration file.
In the present embodiment, executive agent is Emake system, and Emake system is before starting working, it is to be appreciated that current System environments, such as java standard library where, the installation site of compiler where, need which assembly etc. is installed, by specifying Compiling configuration information, Emake system just can compile out the machine code that various environment can run etc. compile with flexible adaptation environment Configuration information.These compiling configuration informations are saved among a configuration file being called project.ini, and it is by ESB (Embedded System Build, embedded system builds) generates, and Emake system, by reading this configuration file, is known Compiling configuration information.
It addition, project.ini configuration file is considered that the difference of different system, and to various compiling configuration letters Breath gives default value, if the translation and compiling environment of user is relatively special, or has some specific demands, it is also possible to manually to Project.ini provides parameter.
In the above embodiment of the present invention, step 102 specifically includes: obtaining detection parameter, wherein, detection parameter includes source One or more in the timestamp of file, the cryptographic Hash of source file content and former compiling configuration information;And detection detection ginseng Whether number changes, to determine the real-time change state of source file.
By the timestamp of file, Emake system can judge that file, the need of recompilating, works as FileVersion After rollback or compiling parameter modification after, file will not be compiled by Emake system again.
It addition, except the timestamp using file, it is also possible to cryptographic Hash based on file content and compiling parameter conduct The criterion of incremental compilation, so, the accuracy of incremental compilation can be higher.
In the above embodiment of the present invention, the quantity of source file is multiple, and step 104 specifically includes: concurrently run The test process that multiple files recompilate, enters based on source code state for when described source file is recompilated by needs Style of writing part recompilates.
Program and dependence storehouse are compiled from source code state, solve c or c++ program because of compiling option, operation system System platform or library file version is different and the compatibility issue that causes.
In the above embodiment of the present invention, concurrently run the step of the test process that multiple file recompilates, specifically wrap Include: initialize multiple worker thread;Use multiple worker thread polling request queue, to process the request that file recompilates; Result is placed in result queue;Call result treatment function result queue is processed.
Wherein, Emake system uses the Queue (queue) of e language to realize thread synchronization.
Fig. 2 shows the block diagram of compiling system according to an embodiment of the invention.
As in figure 2 it is shown, the compiling system 200 that the embodiment of the present invention provides, including: source file detector unit 202 and dependence Matching unit 204.
Wherein, whether source file detector unit 202 changes for real-time detection resources file;Rely on matching unit 204 For when determining that described source file changes, travel through the dependent file that described source file is corresponding, with really by canonical coupling Determine whether described source file to be recompilated.
In the present embodiment, executive agent is Emake system.Emake is the rear station subsystem of ECS, is a eyy4.11 The Console program of exploitation, by control station application programming for not having graphic user interface, and is compiled into independent performing File.Control station application program generally runs from order line, exchanges defeated between command cue and the application program of operation simultaneously Enter and output information.Because information writable control station window also reads, so this makes control station application journey from control station window Sequence becomes the excellent approach that ECS introduces the server compiling of continuous integrating, without considering user interface.
In technique scheme, when detecting that source file changes, need to further determine whether this source document Part recompilates, in particular it is necessary to travel through the dependent file that this source file is corresponding, so that it is determined that be by canonical coupling No needs automatically perform file based on source code state and recompilate, so, when determine need to recompilate time, can be just from source document The All Files that part rises realizes automatically recompilating, and without a large amount of manual operations, improves Integrated Simulation efficiency, reduces volume It is translated into this.
In the above embodiment of the present invention, also include: environment acquiring unit 206, travel through described source relying on matching unit Before the dependent file that file is corresponding, obtain current system environment;Dispensing unit 208, according to current system environment, reconfigures Compiling configuration information, for using compiling configuration information when needs recompilate;And storage unit 210, will compiling Configuration information is saved in configuration file.
Emake system before starting working, it is to be appreciated that current system environments, such as java standard library where, compiling The installation site of device where, need which assembly etc. is installed, by specifying compiling configuration information, Emake system just can be clever Live and adapt to environment, compile out the compiling configuration informations such as the machine code that various environment can run.These compiling configuration informations preserve Among a configuration file being called project.ini, it is generated by ESB, and Emake system is by reading this configuration literary composition Part, knows compiling configuration information.
It addition, project.ini configuration file is considered that the difference of different system, and to various compiling configuration letters Breath gives default value, if the translation and compiling environment of user is relatively special, or has some specific demands, it is also possible to manually to Project.ini provides parameter.
In the above embodiment of the present invention, source file detector unit 202 specifically for: obtain detection parameter, wherein, detection It is one or more that parameter includes in the timestamp of source file, the cryptographic Hash of source file content and former compiling configuration information, and Whether detection detection parameter changes, to determine the real-time change state of source file.
By the timestamp of file, Emake system can judge that file, the need of recompilating, works as FileVersion After rollback or compiling parameter modification after, file will not be compiled by Emake system again.
It addition, ECS is except using the timestamp of file, it is also possible to cryptographic Hash based on file content and compiling parameter are made For the criterion of incremental compilation, so, the accuracy of incremental compilation can be higher.
In the above embodiment of the present invention, the quantity of source file is multiple, and rely on matching unit 204 specifically for: Concurrently run multiple file recompilate test process, for when described source file is recompilated by needs based on source Code state carries out file recompility.
In the above embodiment of the present invention, rely on matching unit 204 specifically for: initialize multiple worker thread, use Multiple worker thread polling request queues, to process the request that file recompilates, are placed on result in result queue, And call result treatment function to result queue's process.
Fig. 3 shows the logical architecture figure of Emake subsystem according to an embodiment of the invention.
As it is shown on figure 3, Emake subsystem is the rear station subsystem of ECS, it it is the control station journey of a eyy4.11 exploitation Sequence, by control station application programming for not having graphic user interface, and is compiled into independent executable file.
In application layer, the order line that control station application program generally processes collection from console instructions is run, and accesses in request After, order, the agreement of this request is resolved, and calling function processing module carries out positioning service, scheduling of resource etc. and controls Scheduling, finally, uses application logic to carry out application process, obtains system output, and wherein, system output includes the defeated of process logs Go out and result report output.
Wherein, functional processing module has compiling management, target generates management, Static Detection process, con current control, packing Processing and the function of unit testing process, wherein, the module of compiling management is connected to rely on engine.
To sum up, in application layer, the order line that control station application program generally processes collection from console instructions is run, and exists simultaneously Exchange input and output information between command cue and the application program of operation.Because information writable control station window from control Platform window processed reads, so this makes control station application program become the excellent approach that ECS introduces the server compiling of continuous integrating, Without considering user interface.
Wherein, the internal memory treatment mechanism of Emake subsystem is summarized as follows:
The internal memory treatment mechanism of Emake subsystem uses a efficient, flexible, cross-platform memory pool to realize, wherein, interior Depositing and be divided into node (node) and section (slice), node is a bulk of internal memory, and slice is the small pieces internal memory on node, from In memory pool, each internal memory of application broadly falls into a slice.The size of the slice in each memory pool example is one Sample, so this memory pool is more like object pool.Based on this memory pool, can realize a can therefrom applying for not more flexibly Memory pool with size internal memory.
Specifically, available node is linked into a chained list, and available slice is also linked into a chained list.When from interior When depositing application internal memory in pond, first check whether available free slice, if it has, then take out one, if it did not, just check Whether also have from original section in the node of application recently.
If have from original slice in the node of application recently, then take out one, if it is not, by this Individual node adds the head of node chained list to, then applies for a new node, and is taken out a slice, and returns.So, When releasing memory, it is only necessary to slice is inserted into the slice chained list head of free time.
Above-mentioned memory pool is organized as tree.When creating a memory pool, can be that it specifies father's memory pool, Use the pointer of father's memory pool as first parameter when calling elr_mpl_create (establishment function).
When a memory pool as father's memory pool is destroyed, its sub-memory pool also can be destroyed.So, when one As the memory pool of father's memory pool and its sub-memory pool not in use by time, it is not necessary to all of memory pool is destroyed one by one, only Destruction interface is called for father's memory pool.
If not specifying father's memory pool when creating memory pool, then an overall memory pool is exactly its father's internal memory Pond.The memory pool of this overall situation is created when calling elr_mpl_init (initializing memory pool function) for the first time, institute Memory headroom occupied by some memory pool structures both is from this global memory pool.Call elr_mpl_ the last time During finalize (terminationization function) memory pool, this global memory pool is destroyed.Simultaneously, it can be seen that all of memory pool Example is all the most sub-memory pool of this global memory pool, then when elr_mpl_finalize is called After, all of memory pool example is also by destroyed, thus falls below minimum by the probability of RAM leakage.
The memory pool of Emake subsystem also supports multithreading, if needing to use it under multi-thread environment, then needs reality Existing six interfaces, and the definition e language constant ELR_USE_THREAD when compiling.
Fig. 4 shows the schematic diagram of thread pool work model according to an embodiment of the invention.
The mistake that dependent file in Emake subsystem processes, the nested logic such as traversal processing, log processing is complex Cheng Zhong, each interface may cross-reference and amendment resource data, thus easily lead to concurrent problem, if for often Individual resource will consider how to ensure its concurrent safety problem, then whole analysis process will become the most complicated, and complexity Logic tends to slip.
Thread pool model as shown in Figure 4 is just used to the concurrent problem of shielding single compiling, i.e. compiles thread accesses Without the concern for its concurrent safety problem (resource that multiple compilings access still needs to process) during oneself resource, specifically, The request sequence of compiling the thread called in thread pool can be processed successively.
Thread pool model includes following several part:
1, thread pool manager (ThreadPool), is used for starting, increases, disables, manages thread pool.
2, worker thread (WorkThread), for the thread in thread pool, can be placed into result queue by performing result.
3, request interface (WorkRequest), the most not shown, for request to create object, adjusts for worker thread The execution of degree task.
4, request queue (RequestQueue), is used for depositing and extracting request, and thread pool manager is in request queue Add request.
5, result queue (ResultQueue), is used for storing request and performs result, and thread pool manager can be from result team Row obtain and performs result.
Thread pool manager adds request by the method adding request (putRequest) to request queue, these requests Need in advance to realize request interface by transmission working function, parameter, result treatment function and abnormality processing function etc., connect , initialize a number of worker thread, these worker threads constantly check request queue by the way of poll, as long as having Request exists, then can extract request and perform.
Then, thread pool manager call method (poll) checks whether result queue has value, if there being value, then takes out, Call result treatment function to perform.
By technique scheme, the core resource of Emake subsystem is request queue and result queue, work Thread obtains task by polling request queue, and main thread performs result by checking that result queue obtains.
Therefore, cohort design needs to realize thread synchronization, certain obstruction and timeout mechanism, to prevent from leading because of continuous poll Excess CPU (central processing unit) expense caused.
It addition, Emake subsystem is before starting working, it is to be appreciated that current system environments, such as java standard library is at which In, the installation site of compiler where, need which assembly etc. is installed, by specifying compiling configuration information, Emake subsystem Just can compile out the compiling configuration informations such as the machine code that various environment can run with flexible adaptation environment.These compile configuration Information is saved among a configuration file being called project.ini, and it is generated by ESB, and Emake subsystem is by reading this Individual configuration file, knows compiling configuration information.
It addition, project.ini configuration file is considered that the difference of different system, and to various compiling configuration letters Breath gives default value, if the translation and compiling environment of user is relatively special, or has some specific demands, it is also possible to manually to Project.ini provides parameter.
Further, it is thus necessary to determine that java standard library and the position of header file.
Standard library function (standard library) and header file (header) that source code is used can leave system in Any catalogue in, Emake subsystem from configuration file it is known that java standard library and the position of header file.In general, join Putting file and can provide an inventory, list several concrete catalogue, until compiling, compiler arrives these catalogues the most in order In, find target.
Further, it is thus necessary to determine that the dependent file of source file, in other words, need to get between sound code file Dependence, by the dependence between sound code file, compiler may determine that the sequencing of compiling.Assuming that A file relies on In B file, Emake subsystem should be ensured that accomplishes following 2 points:
(1) only after B file has compiled, just start to compile A file.
(2) when B file changes, A file can be recompiled.
Dependence is saved in a file being called .d, and the dependent file of source file is listed in the inside.Determining dependence While relation, Emake subsystem also determines, and can use which header file during compiling.
It follows that need to carry out the precompile of header file.
Specifically, different sound code files may quote same header file (such as stdio.h), the when of compiling, Header file also must compile together.Therefore, in order to time-consuming, Emake subsystem can be before compiling source code, first compiling head literary composition Part, which ensure that header file only need to compile once.
But, it is not that all the elements of header file all can be by precompile, for stating grand #define order, the most not Can be by precompile.
After precompile completes, compiler begins to replace the header file of bash in source code and grand.
Insertion source code is the result after precompile, and compiler also can remove annotation in this step.
This step is referred to as pretreatment, and after completing pretreatment, Emake subsystem begins to generate machine code, for having For a little compilers, there is also an intermediate steps, i.e. first source code is transferred to assembler code, the most again assembler code is transferred to machine Code.
File after transcoding is referred to as object file (obj ect file), and obj ect file can't be run, it is necessary to turns further Become executable file.Program is properly functioning, it is necessary to have the code of stdout and fwrite the two function, and they are by C The java standard library of language provides.
The further work of Emake subsystem, it is simply that the code of external function (typically entitled .lib's and .a of suffix File) to add in executable file, i.e. linking (connection) step, this being added to by outer function library by copy can Perform the mode of file, be called static linking (static connection).
Technical scheme is described in detail, by technical scheme, at source file above in association with accompanying drawing When changing, need to travel through, by canonical coupling, the dependent file that this source file is corresponding, determine whether to need based on source Code state automatically performs file and recompilates, so, when determine need to recompilate time, can be just all literary compositions from source file Part realizes automatically recompilating, and without a large amount of manual operations, improves Integrated Simulation efficiency, reduces compiling cost.
The foregoing is only the preferred embodiments of the present invention, be not limited to the present invention, for the skill of this area For art personnel, the present invention can have various modifications and variations.All within the spirit and principles in the present invention, that is made any repaiies Change, equivalent, improvement etc., should be included within the scope of the present invention.
Depend on linguistic context, word as used in this " if " can be construed to " ... time " or " when ... Time " or " in response to determining " or " in response to detection ".Similarly, depend on linguistic context, phrase " if it is determined that " or " if detection (condition of statement or event) " " when determining " or " in response to determining " can be construed to or " when the detection (condition of statement Or event) time " or " in response to detection (condition of statement or event) ".
In several embodiments provided by the present invention, it should be understood that disclosed system, apparatus and method, permissible Realize by another way.Such as, device embodiment described above is only schematically, such as, and described unit Dividing, be only a kind of logic function and divide, actual can have other dividing mode, such as, multiple unit or group when realizing Part can in conjunction with or be desirably integrated into another system, or some features can be ignored, or does not performs.Another point, shown Or the coupling each other discussed or direct-coupling or communication connection can be indirect by some interfaces, device or unit Coupling or communication connection, can be electrical, machinery or other form.
It addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, it is also possible to It is that unit is individually physically present, it is also possible to two or more unit are integrated in a unit.Above-mentioned integrated list Unit both can realize to use the form of hardware, it would however also be possible to employ hardware adds the form of SFU software functional unit and realizes.
The above-mentioned integrated unit realized with the form of SFU software functional unit, can be stored in an embodied on computer readable and deposit In storage media.Above-mentioned SFU software functional unit is stored in a storage medium, including some instructions with so that a computer Device (can be personal computer, server, or network equipment etc.) or processor (Processor) perform the present invention each The part steps of method described in embodiment.And aforesaid storage medium includes: USB flash disk, portable hard drive, read only memory (Read- Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disc or CD etc. various The medium of program code can be stored.
The foregoing is only presently preferred embodiments of the present invention, not in order to limit the present invention, all essences in the present invention Within god and principle, any modification, equivalent substitution and improvement etc. done, within should be included in the scope of protection of the invention.

Claims (10)

1. a Compilation Method, it is characterised in that including:
Whether detection resources file changes in real time;
When determining that described source file changes, travel through the dependent file that described source file is corresponding, with really by canonical coupling Determine whether described source file to be recompilated.
Compilation Method the most according to claim 1, it is characterised in that corresponding traveling through described source file by canonical coupling Dependent file step before, also include:
Obtain current system environment;
According to described current system environment, reconfigure compiling configuration information, for using institute when needs recompilate State compiling configuration information;And
Described compiling configuration information is saved in configuration file.
Compilation Method the most according to claim 2, it is characterised in that the step that whether detection resources file changes in real time Suddenly, specifically include:
Obtaining detection parameter, wherein, described detection parameter includes the timestamp of source file, the cryptographic Hash of source file content and former volume That translates in configuration information is one or more;And
Detect whether described detection parameter changes, to determine the real-time change state of described source file.
Compilation Method the most according to any one of claim 1 to 3, it is characterised in that the quantity of described source file is many Individual, and
Traveled through the step of dependent file corresponding to described source file by canonical coupling, specifically include:
Concurrently run the test process that multiple file recompilates, for the base when described source file is recompilated by needs File recompility is carried out in source code state.
Compilation Method the most according to claim 4, it is characterised in that the test concurrently running the recompility of multiple file is entered The step of journey, specifically includes:
Initialize multiple worker thread;
Use the plurality of worker thread polling request queue, to process the request that file recompilates;
Result is placed in result queue;
Call result treatment function described result queue is processed.
6. a compiling system, it is characterised in that including:
Source file detector unit, whether real-time detection resources file changes;
Rely on matching unit, when determining that described source file changes, travel through described source file by canonical coupling corresponding Dependent file, to determine whether to recompilate described source file.
Compiling system the most according to claim 6, it is characterised in that also include:
Environment acquiring unit, before described dependence matching unit travels through the dependent file that described source file is corresponding, obtains current System environments;
Dispensing unit, according to described current system environment, reconfigures compiling configuration information, recompilates at needs Time use described compiling configuration information;And
Storage unit, is saved in described compiling configuration information in configuration file.
Compiling system the most according to claim 7, it is characterised in that described source file detector unit specifically for:
Obtaining detection parameter, wherein, described detection parameter includes the timestamp of source file, the cryptographic Hash of source file content and former volume That translates in configuration information is one or more, and detects whether described detection parameter changes, to determine described source file Real-time change state.
9. according to the compiling system according to any one of claim 6 to 8, it is characterised in that the quantity of described source file is many Individual, and
Described dependence matching unit specifically for:
Concurrently run the test process that multiple file recompilates, for the base when described source file is recompilated by needs File recompility is carried out in source code state.
10. according to the compiling system according to any one of claim 6 to 8, described dependence matching unit specifically for:
Initialize multiple worker thread, use the plurality of worker thread polling request queue, to process what file recompilated Request, is placed on result in result queue, and calls result treatment function and process described result queue.
CN201610900899.1A 2016-10-17 2016-10-17 Compiling method and compiling system Pending CN106325970A (en)

Priority Applications (2)

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

Applications Claiming Priority (1)

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

Publications (1)

Publication Number Publication Date
CN106325970A true CN106325970A (en) 2017-01-11

Family

ID=57819472

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610900899.1A Pending CN106325970A (en) 2016-10-17 2016-10-17 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
WO2018072493A1 (en) * 2016-10-17 2018-04-26 宁德时代新能源科技股份有限公司 Compiling method and compiling system
CN109240698A (en) * 2017-06-08 2019-01-18 中国移动通信集团浙江有限公司 A kind of incremental compilation processing method and processing device
CN109828759A (en) * 2018-12-15 2019-05-31 中国平安人寿保险股份有限公司 Code compiling method, device, computer installation and storage medium
CN110109673A (en) * 2019-04-25 2019-08-09 武汉大学 A kind of compiler detection device and method based on Beidou subnanosecond grade high-precision time service
CN110837048A (en) * 2019-10-30 2020-02-25 深圳市新威尔电子有限公司 Battery detection system based on virtual machine and working method thereof
CN111191216A (en) * 2019-12-26 2020-05-22 航天信息股份有限公司 OFD signature client with JAVA interface and method and system for signature and signature verification thereof
CN112114811A (en) * 2020-08-19 2020-12-22 上海元城汽车技术有限公司 Compiling method, device and equipment
CN112181637A (en) * 2020-09-10 2021-01-05 苏州浪潮智能科技有限公司 Memory resource allocation method and device
CN112783508A (en) * 2021-02-01 2021-05-11 北京百度网讯科技有限公司 File compiling method, device, equipment and storage medium
CN115826938A (en) * 2022-01-29 2023-03-21 宁德时代新能源科技股份有限公司 Method and device for generating and using real-time operating system, electronic equipment and medium

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111626398B (en) * 2019-02-28 2022-12-09 上海寒武纪信息科技有限公司 Operation method, device and related product
CN111104318B (en) * 2019-12-12 2023-06-02 北京爱奇艺科技有限公司 Unit test result export method and device and electronic equipment
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
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
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
WO2023245449A1 (en) * 2022-06-21 2023-12-28 北京小米移动软件有限公司 Incremental compilation processing method and apparatus, and electronic device and storage medium

Citations (2)

* 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
CN105335137A (en) * 2014-07-23 2016-02-17 国际商业机器公司 Method and device used for processing source file

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8250535B2 (en) * 2008-09-09 2012-08-21 Lockheed Martin Corporation Maintaining vitality of data in safety-critical systems
CN102402427B (en) * 2010-09-09 2015-09-02 阿里巴巴集团控股有限公司 A kind of update method of java application and device
CN106325970A (en) * 2016-10-17 2017-01-11 宁德时代新能源科技股份有限公司 Compiling method and compiling system

Patent Citations (2)

* 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
CN105335137A (en) * 2014-07-23 2016-02-17 国际商业机器公司 Method and device used for processing source file

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
ALPHAJAY: ""Easy make-emake"", 《开源中国》 *

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018072493A1 (en) * 2016-10-17 2018-04-26 宁德时代新能源科技股份有限公司 Compiling method and compiling system
CN109240698B (en) * 2017-06-08 2021-11-23 中国移动通信集团浙江有限公司 Incremental compiling processing method and device
CN109240698A (en) * 2017-06-08 2019-01-18 中国移动通信集团浙江有限公司 A kind of incremental compilation processing method and processing device
CN109828759A (en) * 2018-12-15 2019-05-31 中国平安人寿保险股份有限公司 Code compiling method, device, computer installation and storage medium
CN109828759B (en) * 2018-12-15 2023-07-18 中国平安人寿保险股份有限公司 Code compiling method, device, computer device and storage medium
CN110109673A (en) * 2019-04-25 2019-08-09 武汉大学 A kind of compiler detection device and method based on Beidou subnanosecond grade high-precision time service
CN110837048A (en) * 2019-10-30 2020-02-25 深圳市新威尔电子有限公司 Battery detection system based on virtual machine and working method thereof
CN111191216A (en) * 2019-12-26 2020-05-22 航天信息股份有限公司 OFD signature client with JAVA interface and method and system for signature and signature verification 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
CN112181637A (en) * 2020-09-10 2021-01-05 苏州浪潮智能科技有限公司 Memory resource allocation method and device
CN112181637B (en) * 2020-09-10 2022-11-11 苏州浪潮智能科技有限公司 Memory resource allocation method and device
CN112783508A (en) * 2021-02-01 2021-05-11 北京百度网讯科技有限公司 File compiling method, device, equipment and storage medium
CN115826938A (en) * 2022-01-29 2023-03-21 宁德时代新能源科技股份有限公司 Method and device for generating and using real-time operating system, electronic equipment and medium
CN115826938B (en) * 2022-01-29 2023-11-17 宁德时代新能源科技股份有限公司 Method and device for generating and using real-time operating system, electronic equipment and medium

Also Published As

Publication number Publication date
WO2018072493A1 (en) 2018-04-26

Similar Documents

Publication Publication Date Title
CN106325970A (en) Compiling method and compiling system
JP6122493B2 (en) Adaptively portable library
US7316005B2 (en) Data race detection using sequential program analysis
US9898387B2 (en) Development tools for logging and analyzing software bugs
EP2359247B1 (en) Transforming user script code for debugging
US9684786B2 (en) Monitoring an application in a process virtual machine
US8302073B2 (en) Moving and copying dependencies along with source code
US20110258600A1 (en) Using a dsl for calling apis to test software
JP5893038B2 (en) Compile-time boundary checking for user-defined types
US7900198B2 (en) Method and system for parameter profile compiling
US8887141B2 (en) Automatically modifying a native code module accessed from virtual machine bytecode to determine execution information
US8881107B2 (en) Automatic memory leak detection
US20150370690A1 (en) Development tools for refactoring computer code
US9104804B2 (en) Method and system for invoking just-in-time debugger
US8677316B2 (en) Enforcement of architectural design during software development
US20070180455A1 (en) Qualitatively Annotated Code
US20110126179A1 (en) Method and System for Dynamic Patching Software Using Source Code
US7322026B2 (en) Scoring assertions
US20080127118A1 (en) Method and system for dynamic patching of software
US9841960B2 (en) Dynamic provision of debuggable program code
US20070168742A1 (en) Isolating code modules
KR20130020135A (en) System and method of providing the developer list of developing code simultaneously in an integrated development environment
US11720348B2 (en) Computing node allocation based on build process specifications in continuous integration environments
US7673051B2 (en) Resource usage conflict identifier
CN107632934B (en) Function copying method and device in C-sharp

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20170111