Statistical method and statistical device for starting time in multi-domain system environment and medium
By capturing and converting the startup events and time information of functional modules in a multi-domain system, the problem of startup time optimization in a multi-domain system is solved, and accurate statistics and optimization of startup order, time consumption and dependencies are achieved.
Patent Information
- Application Number
- CN202411103447.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-12
- Publication Date
- 2024-11-22
AI Technical Summary
In multi-domain systems, individual operating systems cannot effectively optimize startup time and cannot accurately identify objects and dependencies that affect startup time.
This paper provides a startup time statistics method in a multi-domain system environment. By capturing the startup events of functional modules in each domain, the time information is determined, and statistical information on startup order, time consumption, and dependency relationship is obtained based on the same time benchmark.
It achieves clear and accurate optimization of startup time for multi-domain systems, can identify optimization targets, and shorten overall startup time.
Smart Images

Figure CN119003305A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field, and more specifically, to a statistical method, statistical device and medium for startup time in a multi-domain system environment. Background Art
[0002] A multi-domain system generally includes multiple execution domains or execution environments (referred to as domains). A domain usually refers to an isolated computing environment, and each domain can run an operating system independently. This architecture is very useful in multi-core and heterogeneous computing environments, especially in scenarios that require high isolation, security, and resource management. Multi-domain systems can be applied to automotive cockpit products, etc. In a multi-domain system, users generally care about the startup time of the instrument or entertainment system in order to optimize the startup time. In a multi-domain system, each operating system will record the startup time of the corresponding domain, and it is impossible to better optimize the startup time of the multi-domain system. Summary of the invention
[0003] The present application is provided to solve the above defects in the prior art. A statistical method, statistical device and medium for boot time in a multi-domain system environment are needed to solve the problem that a single domain in a multi-domain system cannot specifically obtain objects that affect the boot time and cannot better improve the boot time.
[0004] According to the first scheme of the present application, a statistical method for startup time in a multi-domain system environment is provided, wherein the multi-domain system includes at least two mutually independent first domains, and the statistical method includes the following steps. In the multi-domain system environment, the startup events corresponding to the functional modules in each first domain are captured; the time information corresponding to each startup event is determined under the triggering of each startup event, and the time base of each first domain is the same; based on each startup event and the time information corresponding to each startup event, the startup information of the functional modules in each first domain is obtained; based on the startup information of each functional module in each first domain, statistical information is converted to obtain the statistical information, and the statistical information shows the startup sequence and startup time of each first domain and each functional module, as well as the startup dependency relationship between each module.
[0005] According to a second scheme of the present application, a startup time statistics device in a multi-domain system environment is provided, wherein the multi-domain system includes at least two mutually independent first domains, and the statistics device includes a processing unit, which is configured to: capture startup events corresponding to functional modules in each first domain in the multi-domain system environment; determine time information corresponding to each startup event under the triggering of each startup event, and the time base of each first domain is the same; obtain startup information of each functional module in each first domain based on each startup event and the time information corresponding to each startup event; and convert the startup information of each functional module in each first domain to obtain statistical information.
[0006] According to a third solution of the present application, a computer-readable storage medium is provided, on which a computer program / instruction is stored. When the computer program / instruction is executed by a processor, the steps of the method for counting the startup time of a multi-domain system described in any embodiment of the present application are implemented.
[0007] The statistical methods, statistical devices and media for the startup time in a multi-domain system environment provided by various embodiments of the present application respectively capture the startup events of various functional modules of various first domains, and respectively determine the time information of various startup events, and the time base of various first domains is the same; based on the startup time information of various first domains of the multi-domain system, statistical information is converted to facilitate obtaining the startup sequence, startup time consumption and startup dependency in the same time dimension, so as to solve the problem that a single domain in the multi-domain system cannot specifically obtain the object that affects the startup time and cannot better improve the startup time. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] In the drawings, which are not necessarily drawn to scale, the same reference numerals may describe similar parts in different views. The same reference numerals with letter suffixes or different letter suffixes may represent different instances of similar parts. The accompanying drawings generally illustrate various embodiments by way of example and not limitation, and together with the specification and claims, are used to illustrate the embodiments applied for. When appropriate, the same reference numerals are used throughout the drawings to refer to the same or similar parts. Such embodiments are illustrative and are not intended to be exhaustive or exclusive embodiments of the present apparatus or method.
[0009] Figure 1 A flowchart showing a method for counting startup time in a multi-domain system environment according to an embodiment of the present application is shown;
[0010] Figure 2 A flowchart showing the time information corresponding to each start event according to an embodiment of the present application is shown;
[0011] Figure 3 A schematic diagram showing statistical information according to the first embodiment of the present application;
[0012] Figure 4 A flowchart showing the conversion to obtain statistical information according to an embodiment of the present application is shown;
[0013] Figure 5 A schematic diagram showing statistical information according to a second embodiment of the present application;
[0014] Figure 6 A schematic diagram showing the structure of a statistical device according to an embodiment of the present application is shown;
[0015] Figure 7 A schematic diagram showing the connection between a statistical device and a memory area according to an embodiment of the present application. DETAILED DESCRIPTION
[0016] In order to enable those skilled in the art to better understand the technical solution of the present application, the present application is described in detail below in conjunction with the accompanying drawings and specific implementation examples. The embodiments of the present application are further described in detail below in conjunction with the accompanying drawings and specific implementation examples, but are not intended to limit the present application.
[0017] The words "first", "second" and similar words used in this application do not indicate any order, quantity or importance, but are only used to distinguish. The words "include" or "comprise" and similar words mean that the elements before the word include the elements listed after the word, and do not exclude the possibility of including other elements.
[0018] According to an embodiment of the present application, a statistical method for startup time in a multi-domain system environment is provided, wherein the multi-domain system includes at least two independent first domains. Each first domain has a corresponding operating system, such as a real-time (FreeRTOS) operating system, a mobile (Android) operating system, or a QNX (Quick UNIX) operating system. Each first domain includes each functional module, such as a load partitioning module, an initialization module, etc. The statistical method includes the following steps.
[0019] In step 101, in a multi-domain system environment, the startup events corresponding to the functional modules in each first domain are captured. When the functional modules in each first domain are started, the corresponding startup events are captured. The startup events may include startup start events and startup end events.
[0020] In step 102, the time information corresponding to each start event is determined under the triggering of each start event, and the time reference of each first domain is the same. For example, the start start time information corresponding to the start start event, and the start end time information corresponding to the start end event. The time references of each first domain are the same, and the start start time and start end time of each functional module in the same time dimension can be obtained, so that the start sequence of each functional module can be accurately obtained, and then it is easy to obtain the start dependency relationship of each functional module. If it is not in the same time dimension but according to different time references, the start time and start sequence of each functional module may be chaotic.
[0021] Based on the startup start time information and the startup end time information, the startup time information of each functional module can be further obtained, such as the time difference between the startup end time and the startup start time, so as to obtain the time spent on the startup of each functional module and the time spent on the startup of each first domain, and then determine the startup optimization object based on the startup time spent in the startup process of the multi-domain system.
[0022] In step 103, based on each startup event and the time information corresponding to each startup event, startup information of each functional module in the first domain is obtained. The startup information includes the functional module corresponding to the startup event, information of the first domain and time information, so as to obtain the startup object corresponding to the time information.
[0023] In step 104, based on the startup information of each functional module in each first domain, statistical information is converted to obtain the statistical information, which shows the startup sequence and startup time of each first domain and each functional module, and the startup dependency relationship between each module.
[0024] Through statistical information, the startup sequence of each functional module and the startup sequence of each first domain can be clearly obtained. For example, when the first functional module is started, the various functional modules started before the first functional module can be obtained, and then the functional module objects to be optimized can be obtained to advance the startup start time of the first functional module.
[0025] The total startup time can also be optimized. Based on the startup time of each functional module, it can be determined which functional modules to optimize. For example, if the startup time of the first functional module is 129ms and the startup time of the second functional module is 29ms, then the first functional module can be determined as the object to be optimized. Shortening the startup time of the first functional module can shorten the overall startup time.
[0026] It is also possible to obtain the mutual dependency between the first domains and the startup dependency between the functional modules based on the startup time information of the functional modules of the first domains, and then optimize the startup time of the first domain or the startup time of the functional module. Before the first functional module is started, the startup of the second functional module and the third functional module needs to be completed, so the startup process of the second functional module and the third functional module can be optimized to advance the startup start time of the first functional module.
[0027] Therefore, through the statistical method of startup time in a multi-domain system environment, the dependency of startup time in a multi-domain system environment can be obtained more clearly and accurately, which facilitates more accurate determination of optimization objects and optimization of startup time to a greater extent, that is, not only the functional modules in the first domain can be optimized, but also the related functional modules in other first domains can be accurately located and optimized, thereby further shortening the startup time.
[0028] In some embodiments, determining the time information corresponding to each start event under the triggering of each start event includes the following steps. In step 201, a count value is obtained from a counter under the triggering of the start event. The start events of each first domain obtain the count value from the same counter, so that the time information of the start of each functional module of each first domain can be obtained in the same time dimension.
[0029] In step 202, the time information corresponding to each start event is obtained based on the count value and the count frequency of the counter. Based on the count frequency and the corresponding count value of the same counter, the corresponding time information can be obtained, so as to obtain an accurate start sequence of each functional module. The count frequency can be the time difference between two adjacent counts.
[0030] In some embodiments, the statistical method further includes the following steps. In step 401, the startup information of each functional module in each first domain is written into a memory area. In step 402, different storage areas are allocated to each first domain, and the startup information corresponding to each first domain is stored in the corresponding storage area. The writing process and the storage process of the memory area are performed separately. The startup information of each first domain can be written into the memory area respectively, and the startup information of different first domains is stored in different positions respectively. In this way, the startup information of different first domains can be distinguished, and the startup information of one first domain is prevented from being overwritten by the startup information of other first domains, and part of the startup information is missed, so as to ensure the integrity of the startup information and facilitate accurate acquisition of the startup dependency between each first domain and each functional module.
[0031] In some embodiments, in the memory area, the storage field format of the startup information may include the first domain information, the function module information, and the startup time information. For example, the first domain|load partition module|start time 0.075 seconds; the first domain|load partition module|end time 0.800 seconds; the first domain|initialization module|end time 1.138 seconds. This facilitates the corresponding relationship between the first domain and the function module and the startup time information when reading the startup information of the memory area.
[0032] In some embodiments, based on the startup information of each functional module in each first domain, conversion is performed to obtain statistical information, including: based on the startup information of each functional module in each first domain, identifying the startup time of each functional module; based on the startup time of each functional module, converting to obtain first identification information corresponding to each functional module.
[0033] After obtaining the statistical information, the user can directly obtain the total startup time of each functional module through the first identification information, and then obtain the functional module that consumes a longer time, so as to facilitate the determination of the subsequent startup time optimization object. Figure 3 According to the statistical information shown, the functional modules that consume a long time in the first domain X include functional module D and functional module H, the functional modules that consume a long time in the first domain Y include functional module K, and the functional modules that consume a long time in the first domain Z include functional module N.
[0034] In some embodiments, the statistical information is presented in the form of a list or in the form of a diagram. If it is presented in the form of a list, the startup sequence of each functional module can be displayed through each list item from top to bottom. If it is presented in the form of a diagram, different first domains and the time sequence of startup can be distinguished by different positions or shapes. For example, Figure 3 The diagram is shown, wherein each functional module is presented in the form of a graphic block, and the startup sequence of each different functional module can be displayed through the position of each graphic block.
[0035] In some embodiments, based on the startup information of each functional module in each first domain, conversion is performed to obtain statistical information, and the following also includes: based on the startup information of each functional module in each first domain, identifying the start startup time and the end startup time of each first domain and each functional module; based on the start startup time and the end startup time of each first domain and each functional module, converting to obtain second identification information corresponding to each first domain and each functional module respectively.
[0036] The start start time and end start time of each functional module in the statistical information determine the position in the statistical information, and the second identification information can be the first domain and the position of each functional module. Figure 3Taking the figure as an example, each functional module is represented by a square block, and a vertical bar diagram is formed according to the startup order. Different first domains are represented by different vertical bar diagrams, which can indicate the sequence of the functional modules and the sequence of the start and end time of different first domains.
[0037] pass Figure 3 It can be seen that the startup order of each functional module in the first domain X is functional module A, functional module B, functional module C, functional module D, functional module E, functional module F, functional module G and functional module H. Among them, the startup time of each functional module can also be obtained, for example, the startup time of functional module A is 3ms, the startup time of functional module B is 12ms, etc.
[0038] In some embodiments, based on the startup information of each functional module in each first domain, converting to obtain statistical information also includes the following steps.
[0039] In step 501, based on the startup information of each functional module of each first domain, the startup crossover time point corresponding to the first domain started first and the first domain started later is identified, and the startup crossover time point is the time point when the first domain started later starts.
[0040] In step 502, based on the startup intersection time point, a first functional module of the first domain that starts to start first corresponding to the startup intersection time point is obtained;
[0041] In step 503, based on the first functional module, the startup intersection time point and the first domain to be started later, third identification information is converted to indicate the startup dependency relationship between the first functional module and the first domain to be started later.
[0042] For example, after the startup of a certain functional module of the first domain is completed, the startup of the first functional module started first in another first domain is started, or during the startup of a certain functional module of the first domain, the startup of the first functional module started first in another first domain is started, etc., then this time point is the startup crossover time point. The startup crossover time point can make the user more clearly aware of the startup dependency relationship between different first domains, and can also remove some first domains and functional modules that are not related to the startup time optimization of the target first domain and target functional module, thereby reducing unnecessary startup optimization operations and making the startup optimization operations more targeted.
[0043] The third identification information may include various types, including: Figure 3As shown in the arrow, the startup of the first domain Z starts after the startup of the F function module of the second sub-region of the first domain X is completed. Therefore, if you want to speed up the startup of the first domain, you need to optimize the startup process of each function module of the first sub-region of the first domain and the function module E and function module F of the second sub-region, which have nothing to do with the first domain Y. The startup of the first domain Y starts during the startup of the H function module of the second sub-region of the first domain X. Therefore, if you want to speed up the startup of the first domain, you need to optimize the startup process of each function module of the sub-region of the first domain X and each function module of the second sub-region, which have nothing to do with the first domain Z. In order to obtain the mutual dependence between different first domains, users can directly locate the function modules and first domains with mutual dependence by viewing the statistical information.
[0044] In some embodiments, each first domain of the multi-domain system includes at least two independent sub-regions, and based on the startup information of each functional module in each first domain, the statistical information is converted, and the following steps are also included. In step 501, based on the startup information of each functional module in each first domain, the startup time information of each functional module corresponding to each sub-region is identified. The first domain may be divided into various sub-regions, and the functions of each sub-region may be different.
[0045] In step 502, the startup time information of each functional module corresponding to each sub-region is obtained to obtain the total startup time information of each sub-region. The total startup time of different sub-regions may be different, and may differ by hundreds of milliseconds. The total startup time information of the sub-region can be counted based on the information of the first domain described by the functional module and the information of the sub-region.
[0046] In step 503, based on the total startup time information of each sub-region and each functional module corresponding to each sub-region, fourth identification information representing each functional module corresponding to each sub-region and fifth identification information representing the total startup time information of each sub-region are converted. Figure 3 As shown, the first domain X includes function module A, function module B, function module C and function module D, and the total startup time of the first sub-region is 205ms. The second sub-region includes function module E, function module F, function module G and function module H, and the total startup time of the second sub-region is 460ms. The third sub-region of the first domain Z includes function module L, function module M and function module N. A horizontal line can be used as the fourth identification information to divide different sub-regions.
[0047] This allows users to more clearly understand the startup time of each sub-region, and also helps to determine sub-regions with dependencies. For example, if there is a startup intersection time point between the first sub-region of the first domain in the startup sequence and the second sub-region of another first domain, the startup of the first sub-region can be optimized to optimize the startup time of the second domain, so that the startup time of the second domain is advanced.
[0048] According to an embodiment of the present application, a statistical device for startup time in a multi-domain system environment is also provided, wherein the multi-domain system includes at least two independent first domains, and the statistical device 600 includes a processing unit 601, which is configured to: capture startup events corresponding to functional modules in each first domain in the multi-domain system environment; determine time information corresponding to each startup event under the triggering of each startup event, and the time base of each first domain is the same; obtain startup information of each functional module in each first domain based on each startup event and the time information corresponding to each startup event; and convert the startup information of each functional module in each first domain to obtain statistical information.
[0049] The statistical device 600 can obtain the dependency of the startup time in a multi-domain system environment more clearly and accurately, so as to facilitate more accurate determination of the optimization object and optimize the startup time to a greater extent, that is, it can not only optimize the functional modules in the first domain, but also accurately locate and optimize the related functional modules in other first domains, thereby further shortening the startup time.
[0050] In some embodiments, the processing unit 601 includes a capture module corresponding to each first domain, the capture module captures the startup event of each functional module corresponding to the first domain, and determines the time information corresponding to each startup event under the triggering of the startup event. The time information obtained by the capture module is sent to the memory area for storage.
[0051] In some embodiments, the processing unit 601 may obtain the startup events of each functional module through a log module standard interface.
[0052] In some embodiments, the statistical device further includes a counter, and determining the time information corresponding to each start event under the triggering of each start event includes: obtaining a count value from the counter under the triggering of the start event. Based on the count value and the counting frequency of the counter, the time information corresponding to each start event is obtained. It is possible to ensure that the time information of the start of each functional module of each first domain is obtained in the same time dimension, so as to obtain an accurate start sequence of each functional module.
[0053] In some embodiments, the memory area 700 includes a writing module 701 and a storage module 702. The writing module 701 writes the time information of each first domain, and the storage module 702 allocates different storage areas to each first domain and stores the startup information corresponding to each first domain in the corresponding storage area. Figure 7 As shown, the first capture module 6011, the second capture module 6012 and the third capture module 6013 are respectively included, each capture module corresponds to a different first domain, and each capture module sends the corresponding time information to the memory area 700. It is prevented that the startup information of one first domain is covered by the startup information of other first domains, and a part of the startup information is missed, so as to ensure the integrity of the startup information, and facilitate to accurately obtain the startup dependency relationship between the first domains and between the functional modules.
[0054] In some embodiments, the processing unit 601 further includes a translation module in the last activated first domain, the translation module being configured to: trigger access to the memory area after the last functional module is activated; obtain the activation information of each functional module in each first domain in the memory area, and convert it to obtain statistical information. Figure 3 Taking the statistical information shown as an example, the translation module can be set in the first domain Z.
[0055] According to an embodiment of the present application, a computer-readable storage medium is also provided, on which a computer program / instruction is stored, and when the computer program / instruction is executed by a processor, the steps of the statistical method for the startup time of a multi-domain system described in any embodiment of the present application are implemented. The statistical method can obtain the dependency relationship of the startup time in a multi-domain system environment more clearly and accurately, and facilitate more accurate determination of the optimization object and optimization of the startup time to a greater extent, that is, not only the functional modules in the first domain can be optimized, but also the related functional modules in other first domains can be accurately located and optimized, further shortening the startup time.
[0056] In addition, although exemplary embodiments have been described herein, the scope includes any and all embodiments based on the present application with equivalent elements, modifications, omissions, combinations (e.g., various embodiments intersecting schemes), adaptations or changes. The elements in the claims will be interpreted broadly based on the language adopted in the claims, and are not limited to the examples described in this specification or during the implementation of the application, and the examples will be interpreted as non-exclusive. Therefore, this specification and examples are intended to be considered as examples only, and the true scope and spirit are indicated by the following claims and the full scope of their equivalents.
[0057] The above description is intended to be illustrative rather than restrictive. For example, the above examples (or one or more of them) can be used in combination with each other. For example, those of ordinary skill in the art can use other embodiments when reading the above description. In addition, in the above-mentioned specific embodiments, various features can be grouped together to simplify the application. This should not be interpreted as a feature of an application that does not require protection being necessary for any claim. On the contrary, the subject matter of the present application may be less than all the features of the embodiments of a specific application. Thus, the following claims are incorporated into the specific embodiments as examples or embodiments, wherein each claim is independently used as a separate embodiment, and it is considered that these embodiments can be combined with each other in various combinations or arrangements. The scope of the present invention should be determined with reference to the full scope of the equivalent forms of the attached claims and these claims.
[0058] The above embodiments are only exemplary embodiments of the present application and are not intended to limit the present invention. The protection scope of the present invention is defined by the claims. Those skilled in the art may make various modifications or equivalent substitutions to the present invention within the essence and protection scope of the present application, and such modifications or equivalent substitutions shall also be deemed to fall within the protection scope of the present invention.
Claims
1. A statistical method for boot time in a multi-domain system environment, characterized in that: The multi-domain system includes at least two mutually independent first domains, and the statistical method includes: Capturing startup events corresponding to the functional modules in each first domain in a multi-domain system environment; Determining the time information corresponding to each start event under the triggering of each start event, and the time base of each first domain is the same; Based on each startup event and the time information corresponding to each startup event, obtaining startup information of each functional module in the first domain; Based on the startup information of each functional module in each first domain, conversion is performed to obtain statistical information, where the statistical information shows the startup sequence and startup time consumption of each first domain and each functional module, as well as the startup dependency relationship between each module.
2. The statistical method according to claim 1, characterized in that: Determining the time information corresponding to each start event under the triggering of each start event includes: Acquiring a count value from a counter when triggered by the start event; Based on the count value and the count frequency of the counter, time information corresponding to each start event is obtained.
3. The statistical method according to claim 1, characterized in that: The statistical method also includes: Writing the startup information of each functional module in each first domain into the memory area; Different storage areas are allocated to the first domains, and the startup information corresponding to the first domains is stored in the corresponding storage areas.
4. The statistical method according to claim 1, characterized in that: Based on the startup information of each functional module in each first domain, conversion is performed to obtain statistical information, including: Based on the startup information of each functional module of each first domain, the startup time of each functional module is identified; and according to the startup time of each functional module, first identification information corresponding to each functional module is converted.
5. The statistical method according to claim 1, characterized in that: Based on the startup information of each functional module in each first domain, converting to obtain statistical information also includes: Based on the startup information of each functional module of each first domain, identifying the start startup time and the end startup time of each first domain and each functional module; Based on the start start time and the end start time of each first domain and each functional module, second identification information corresponding to each first domain and each functional module is converted.
6. The statistical method according to claim 1, characterized in that: Based on the startup information of each functional module in each first domain, converting to obtain statistical information also includes: Based on the startup information of each functional module of each first domain, a startup crossover time point corresponding to the first domain that starts to start first and the first domain that starts later is identified, and the startup crossover time point is the time point when the first domain that starts later starts to start; Based on the startup intersection time point, obtaining a first functional module of a first domain that starts to start first corresponding to the startup intersection time point; Based on the first functional module, the startup intersection time point and the first domain that is started later, third identification information is converted to indicate a startup dependency relationship between the first functional module and the first domain that is started later.
7. The statistical method according to claim 1, characterized in that: Each first domain of the multi-domain system includes at least two independent sub-areas, and based on the startup information of each functional module in each first domain, the statistical information is converted, and further includes: Based on the startup information of each functional module of each first domain, the startup time information of each functional module corresponding to each sub-region is identified; The startup time information of each functional module corresponding to each sub-region is obtained to obtain the total startup time information of each sub-region; Based on the total startup time information of each sub-region and each functional module corresponding to each sub-region, fourth identification information representing each functional module corresponding to the sub-region and fifth identification information representing the total startup time information of each sub-region are converted.
8. A device for counting startup time in a multi-domain system environment, characterized in that: The multi-domain system comprises at least two mutually independent first domains, and the statistical device comprises a processing unit configured as follows: Capture the startup events corresponding to the functional modules in each first domain in a multi-domain system environment; determine the time information corresponding to each startup event under the triggering of each startup event, and the time base of each first domain is the same; obtain the startup information of each functional module in each first domain based on each startup event and the time information corresponding to each startup event; convert the startup information of each functional module in each first domain to obtain statistical information.
9. The statistical device according to claim 8, characterized in that: The statistical device further includes a counter, which determines the time information corresponding to each start event under the triggering of each start event, including: Acquiring a count value from the counter when triggered by the start event; Based on the count value and the count frequency of the counter, time information corresponding to each start event is obtained.
10. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instruction is executed by a processor, the steps of the method for counting the startup time of a multi-domain system described in any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Starting time consumption recording method and device
CN120653315A
