Disclosure of Invention
Accordingly, an objective of the present application is to provide a crash analysis method, a crash analysis device, an electronic device, and a storage medium, which solve or partially solve the above-mentioned problems.
Based on the above object, a first aspect of the present application provides a crash parsing method, including:
receiving a crash file;
analyzing the collapse file to obtain stack frame data information of the collapse file, wherein each stack frame data information comprises at least one stack frame;
taking each stack frame in the at least one stack frame as a target stack frame respectively;
Analyzing attribute information of the target stack frame, determining a target storage space corresponding to the attribute information from at least one storage space of a database according to the attribute information, and acquiring symbol data corresponding to the target stack frame from the target storage space;
and integrating and outputting the obtained symbol data corresponding to the at least one stack frame.
In some embodiments, prior to the receiving the collapsed file, the method further comprises:
receiving a symbol table file for crash parsing;
analyzing the symbol table file to obtain a plurality of symbol data;
and sub-packaging the plurality of symbol data into at least one group, forwarding the at least one group of symbol data to at least one storage space of the database for storage through an intermediate transponder, wherein the group of symbol data corresponds to one storage space.
In some embodiments, the parsing the symbol table file to obtain a plurality of symbol data includes:
storing the symbol table file in a temporary memory;
determining an analysis task for analyzing the symbol table file, and generating a corresponding first message queue according to the analysis task;
and sending the first message queue to a parser, and parsing the symbol table file in the temporary memory by using the parser to obtain a plurality of symbol data.
In some embodiments, sub-packaging the plurality of symbol data into at least one group, forwarding the at least one group of symbol data to at least one storage space of the database for storage via an intermediate transponder, comprising:
in response to determining that the symbol table file parsing is complete, the intermediate forwarder generates a second message queue to send to the parser;
the parser forwards the parsed plurality of symbol data to the database through an intermediate forwarder;
and sub-packaging according to the address information of each group of preset number by utilizing the database based on the address information of the plurality of symbol data to obtain at least one group of symbol data, and storing the at least one group of symbol data in at least one storage space of the database.
In some embodiments, before the sub-packaging is performed with the database based on the address information of the plurality of symbol data according to each set of the predetermined number of address information, the method further comprises:
determining the mapping relation of each symbol data, recording the mapping relation of each symbol data into at least one mapping diagram, and storing the at least one mapping diagram in the database.
In some embodiments, the map comprises at least one of:
A range map representing a functional range relationship;
an address map representing address relationships;
an inclusion map representing an inclusion function relationship.
In some embodiments, after said forwarding of at least one set of symbol data to at least one storage space of said database via an intermediate forwarder, further comprises:
determining the number of symbol data in each storage space, and taking the storage space with the number of symbol data smaller than a first threshold value as a sparse storage space;
and counting the number of the sparse storage spaces, and in response to determining that the number of the sparse storage spaces is larger than a second threshold, merging the sparse storage spaces into at least one dense storage space, wherein the storage number of the dense storage spaces is smaller than or equal to the preset number.
In some embodiments, the determining, according to the attribute information, a target storage space corresponding to the attribute information from at least one storage space of a database, and acquiring symbol data corresponding to the target stack frame from the target storage space includes:
transmitting the attribute information to the database through the intermediate forwarder;
And determining a target storage space corresponding to the attribute information from at least one storage space of the database, and acquiring symbol data corresponding to the target stack frame from the target storage space through the intermediate forwarder.
In some embodiments, the database comprises at least one of:
a relational database for storing source information of the symbol data;
a remote dictionary service database for caching symbol inquiry instructions;
a base database comprising said at least one storage space.
In some embodiments, the parsing the attribute information of the target stack frame includes:
determining the name of the target stack frame according to the address information of the target stack frame;
acquiring target source information corresponding to the name of the target stack frame from the relational database through the intermediate forwarder;
caching the target source information as a symbol inquiry instruction in the remote dictionary service database through the intermediate forwarder;
and determining the attribute information based on the address information of the target stack frame, the name of the target stack frame and the target source information.
In some embodiments, determining a target storage space corresponding to the attribute information from at least one storage space of the database, and acquiring, by the intermediate forwarder, symbol data corresponding to the target stack frame from the target storage space includes:
Transmitting the attribute information to the base database through the intermediate forwarder;
determining a target mapping relation based on the attribute information by utilizing the basic database according to at least one mapping diagram corresponding to the attribute information;
and determining a corresponding target storage space from at least one storage space of the basic database according to the target mapping relation, and acquiring symbol data corresponding to the target mapping relation from the target storage space.
In some embodiments, the respective symbol data in each memory space is stored in the form of key-value pairs, wherein the key-value pairs include: and a key formed by the attribute information and a value formed by the symbol data.
Based on the same inventive concept, a second aspect of the present application provides a crash analysis device, including:
the crash file receiving module is used for receiving the crash file;
the analysis module is used for analyzing the collapse file to obtain stack frame data information of the collapse file, wherein each stack frame data information comprises at least one stack frame;
the symbol acquisition module is used for taking each stack frame in the at least one stack frame as a target stack frame respectively; analyzing attribute information of the target stack frame, determining a target storage space corresponding to the attribute information from at least one storage space of a database according to the attribute information, and acquiring symbol data corresponding to the target stack frame from the target storage space;
And the output module is used for integrating and outputting the obtained symbol data corresponding to the at least one stack frame.
Based on the same inventive concept, a third aspect of the present application proposes an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, said processor implementing the method according to the first aspect when executing said program.
Based on the same inventive concept, a fourth aspect of the present application proposes a non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the method of the first aspect.
As can be seen from the above, according to the crash analysis method, the device, the electronic equipment and the storage medium provided by the application, symbol data are packaged into each storage space of the database in advance for storage, so that after a crash file is received, stack frame data information is obtained by analyzing the crash file, corresponding target storage spaces are searched from each storage space for each stack frame in the stack frame data information, then analysis and matching are carried out from the target storage spaces, symbol data corresponding to the stack frame are determined, and as the number of the symbol data in each storage space is relatively smaller, the data reading amount is greatly reduced, and the analysis and matching time can be accelerated; and finally, analyzing and matching the stack frame data information with one or more corresponding symbol data to form analysis results to be output so as to judge the collapse file according to the output analysis results and timely formulate a solution strategy for the collapse situation. The collapse analysis mode can effectively improve analysis efficiency, reduce collapse analysis time, and effectively reduce reading pressure due to the fact that the reading quantity in the analysis process is greatly reduced.
Detailed Description
The principles and spirit of the present application will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are presented merely to enable those skilled in the art to better understand and practice the application and are not intended to limit the scope of the application in any way. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the application to those skilled in the art.
In the present application, it is to be understood that any number of elements in the drawings is for illustration and not limitation, and that any naming is used for distinction only and not for limitation.
The application provides a collapse analysis scheme, which is characterized in that symbol data are sub-packaged into each storage space of a database in advance for storage, so that after a collapse file is received, stack frame data information is obtained by analyzing the collapse file, corresponding target storage spaces are searched from each storage space for each stack frame in the stack frame data information, and then analysis and matching are carried out on the stack frame data from the target storage spaces, so that symbol data corresponding to the stack frame are determined, and the number of symbol data in each storage space is relatively smaller, so that the data reading amount is greatly reduced, and the analysis and matching time can be accelerated; and finally, analyzing and matching the stack frame data information with one or more corresponding symbol data to form analysis results to be output so as to judge the collapse file according to the output analysis results and timely formulate a solution strategy for the collapse situation.
The principles and spirit of the present application are explained in detail below with reference to several representative embodiments thereof.
Referring to fig. 1A, an application scenario of a crash parsing method according to an embodiment of the present application is shown. The application scenario includes a terminal device 101, a server 102, and a data storage system 103. The terminal device 101, the server 102 and the data storage system 103 may be connected through a wired or wireless communication network. Terminal device 101 includes, but is not limited to, a PC side (Personal Computer ), desktop computer, mobile phone, mobile computer, tablet computer, media player, smart wearable device view, personal digital assistant (personal digital assistant, PDA) or other electronic device capable of performing the functions described above, and the like. The server 102 and the data storage system 103 may be independent physical servers, or may be a server cluster or a distributed system formed by a plurality of physical servers, or may be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs, and basic cloud computing services such as big data and artificial intelligence platforms.
The server 102 is configured to provide a crash resolution service to a user of the terminal device 101, and a client in communication with the server 102 is installed in the terminal device 101, and when an application of the terminal device 101 crashes, a crash file may be sent to the server 102 through the client. The server 102 analyzes the collapse file to obtain stack frame data information, searches a corresponding target storage space from each storage space for each stack frame in the stack frame data information, analyzes and matches the stack frame data information from the target storage space, and determines symbol data corresponding to the stack frame; and finally, analyzing and matching the stack frame data information with one or more corresponding symbol data to form an analysis result and outputting the analysis result. The analysis result can be displayed on the display interface of the server 102 for viewing by related personnel, so as to determine the reason of the crash and process the crash condition. The analysis result may be fed back to the terminal device 101 or other electronic devices with display functions for viewing. The data storage system 103 provides data storage support for the operation of the server 102, for example, temporary storage of crash files and storage of programs that perform crash parsing methods.
An infrastructure for crash resolution is built in the server 102, as shown in fig. 1B, and includes:
the symbol table uploading module (fine_symbol) is connected with the apigmataway (traffic forwarding module) of the terminal equipment, the packing platform/RD of the terminal equipment can pack and pack the symbol table file into symbol table.
And the temporary memory (tbs) is connected with the symbol table uploading module, and the symbol table uploading module uploads the symbol table file to the tbs for temporary storage.
And a parser (reduced_sym_player) for generating a message queue (RocketMQ) to send to the parser, and the parser parses the symbol table file stored in the temporary memory.
An intermediate forwarder (pc_date_proxy) is connected to the parser for intermediate forwarding of some instructions or data.
A relational database (MySQL) connected to the intermediate forwarder, and the parser is configured to parse the symbol table file and then to store the parsed symbol table source file in the relational database via the intermediate forwarder.
A remote dictionary service database (redis) is connected to the intermediate forwarder for temporarily storing the requests or data required in MySQL.
And the basic database (ABase) is connected with the intermediate transponder and is used for sub-packaging a plurality of symbol data obtained after the symbol table file is analyzed, and sub-packaging the symbol data into a plurality of pockets (storage spaces) for storage.
And the crash file analysis module (pc_stack_walk) is connected with the intermediate forwarder and is used for analyzing the received crash file (RPC, remote Procedure Call, remote procedure call request) and analyzing the crash file, acquiring one or more symbol data corresponding to the crash file from the corresponding target storage space of the basic database by the intermediate forwarder through the relational database according to the analysis result, and integrating and outputting the symbol data.
The crash parsing method according to an exemplary embodiment of the present application is described below in conjunction with the application scenarios shown in fig. 1A and 1B. It should be noted that the above application scenario is only shown for the convenience of understanding the spirit and principle of the present application, and the embodiments of the present application are not limited in any way. Rather, embodiments of the application may be applied to any scenario where applicable.
The embodiment of the application provides a crash analysis method which is applied to a server.
In the crash analysis method of the present embodiment, before performing crash analysis on a crash file, a symbol table file required for crash analysis needs to be stored, as shown in fig. 2A, where the process of storing includes:
step 2A1, a symbol table file for crash parsing is received.
In the implementation, a packaging platform (i.e., a client installed in the terminal device) on the terminal device packages the generated symbol table file, and forms a packaged file (for example, a symbol. Byte/android_upload) after packaging, and forwards the packaged file to a symbol table uploading module (fine_symbol) through a traffic forwarding module (apigmatay).
And 2A2, analyzing the symbol table file to obtain a plurality of symbol data.
In practice, the symbol table file contains a large amount of symbol data, and the symbol data contained in the symbol table file needs to be parsed and divided into a plurality of parts (pockets) for storage.
In some embodiments, the step 2A2 specific process includes:
step 2a21, storing the symbol table file in a temporary memory.
In particular implementations, the symbol table upload module uploads the symbol table file to a temporary memory (tbs) for temporary storage. And the subsequent calling analysis is convenient.
Step 2A22, determining an analysis task for analyzing the symbol table file, and generating a corresponding first message queue according to the analysis task.
When the method is implemented, after the symbol table file is stored in the temporary memory, the symbol table uploading module generates a first message queue (RocketMQ) according to the analysis task and sends the first message queue to the analyzer.
Step 2a23, sending the first message queue to a parser, and parsing the symbol table file in the temporary memory by using the parser to obtain a plurality of symbol data.
In a specific implementation, after receiving the first message queue, the parser starts to retrieve the symbol table file from the temporary memory to parse the huge symbol table file into a plurality of symbol data, and in the parsing process, the mapping relationship corresponding to the symbol data and source information (for example, source of the symbol data) of each symbol data are parsed together, where the mapping relationship includes at least one of the following: functional scope, address relationships, and inclusion functional relationships, etc.
And 2A3, sub-packaging the plurality of symbol data into at least one group, forwarding the at least one group of symbol data to at least one storage space of the database for storage through an intermediate transponder, wherein one group of symbol data corresponds to one storage space.
Through the steps, the symbol data can be divided into a plurality of storage spaces (pockets) for storage, so that in the subsequent process of calling and searching after the collapse file is analyzed, only the symbol data corresponding to the collapse file is required to be searched from the corresponding one or more storage spaces, the whole symbol table file is not required to be called and searched, the searching time can be saved, and the efficiency of the collapse analysis is improved.
In some embodiments, step 2A3 specifically includes:
in step 2a31, in response to determining that the symbol table file parsing is complete, the intermediate forwarder generates a second message queue to send to the parser.
When the method is implemented, after the intermediate forwarder analyzes the symbol table file, the intermediate forwarder can grab the analyzed information, so that the intermediate forwarder can generate a second information queue (RocketMQ) and send the second information queue to the analyzer, and the analyzer can start a sending process.
And step 2A32, the parser forwards the parsed plurality of symbol data to the database through an intermediate repeater.
In the implementation, after receiving the second message queue, the parser sends the symbol data, the source information and the mapping relation after the parsing is completed to the intermediate forwarder for forwarding. The intermediate forwarder has the function of intermediate route forwarding and can be matched with a proper database according to specific data information.
In some embodiments, the database comprises at least one of:
a relational database (MySQL) for storing source information of the symbol data; a remote dictionary service database (redis) for caching symbolic query instructions; a base database (ABase) comprising said at least one storage space.
When the analyzer sends the source information to the intermediate forwarder, the intermediate forwarder forwards the source information to the relational database; when the parser sends the symbol data or the mapping relation to the intermediate forwarder, the symbol data or the mapping relation is forwarded to the basic database.
Step 2a33, determining a mapping relation of each symbol data, recording the mapping relation of each symbol data into at least one mapping diagram, and storing the at least one mapping diagram in the database.
In particular, the mapping relationship represents some characteristics of the symbol data, including functional characteristics and attribute characteristics, and the symbol data can be searched for through the characteristics later.
In some embodiments, the map comprises at least one of:
a range map (RangeMap) representing a functional range relationship; an address map (AddressMap) representing the address relationship; an inclusion map (containedrange map) representing inclusion function relationships.
The procedure for recording the mapping relationship using each map is as follows:
through the scheme, various mapping relations of the symbol data can be stored in the form of the mapping diagrams, so that corresponding mapping relations can be determined according to the mapping diagrams when crash analysis is carried out later, and then corresponding symbol data can be searched according to the mapping relations, wherein the symbol data comprises information such as method names, line numbers of code lines and the like.
And step 2A34, sub-packaging according to each group of preset number of address information by utilizing the database based on the address information of the plurality of symbol data to obtain at least one group of symbol data, and storing the at least one group of symbol data in at least one storage space of the database.
In some embodiments, the respective symbol data in each memory space is stored in the form of key-value pairs, wherein the key-value pairs include: keys formed by attribute information of symbol data, and values formed by symbol data.
The attribute information includes: the address information, the name or the source information can search corresponding mapping relation in each mapping diagram according to the attribute information of each stack frame in the collapse information, and symbol data can be fetched from the corresponding storage space according to the mapping relation.
In some embodiments, the method further comprises:
and 2A4, determining the number of the symbol data in each storage space, and taking the storage space with the number of the symbol data smaller than a first threshold value as a sparse storage space.
And 2A5, counting the number of the sparse storage spaces, and in response to determining that the number of the sparse storage spaces is larger than a second threshold, merging the sparse storage spaces into at least one dense storage space, wherein the storage number of the dense storage spaces is smaller than or equal to the preset number.
At present, a mac symbol table file sometimes has a very sparse condition, a part of symbols often exist in the head, a hole (for example, the hole has a size of 1G or more than 1G) is formed in the middle, a large number of pockets are generated, storage redundancy is increased, the key (key) scale is increased from tens of thousands to millions or tens of millions, and the symbol table file dump is greatly piled up in a database.
According to sparse characteristics, a multi-stage page table-like manner can be adopted to carry out multi-stage division and grouping (chunk), and for sparse parts (namely sparse storage space), the storage-intensive storage space (such as large pockets) is merged, so that the number of pockets is greatly reduced, from millions of levels to thousands of levels, and the time for subsequent crash analysis can be reduced from hours to minutes. The efficiency of breakdown analysis is greatly improved.
The crash parsing process, as shown in FIG. 2B, includes:
step 2B1, receiving a crash file.
In the implementation, if a crash situation occurs on the terminal equipment, the client installed on the terminal equipment integrates the crash situation into a crash file and uploads the crash file to the server. Wherein the crash file is a dump file that includes the RPC request. Specifically, the crash file parsing module (pc_stack_walk) on the server is utilized to receive the uploaded crash file.
And 2B2, analyzing the collapse file to obtain stack frame data information of the collapse file, wherein each stack frame data information comprises at least one stack frame.
In particular implementation, a crash file parsing module is utilized to parse a crash file to obtain a context (i.e., at least one stack frame) of the crash file, and determine a name (e.g., a mobile) and an address (e.g., an address) corresponding to each stack frame.
And step 2B3, taking each stack frame in the at least one stack frame as a target stack frame respectively.
In the implementation, the first stack frame obtained by analysis is used as a target stack frame to start inquiry.
And 2B4, analyzing the attribute information of the target stack frame, determining a target storage space corresponding to the attribute information from at least one storage space of a database according to the attribute information, and acquiring symbol data corresponding to the target stack frame from the target storage space.
In specific implementation, the first stack frame (i.e., the target stack frame) is parsed by using the crash file parsing module, and attribute information corresponding to the first stack frame is determined. Because the attribute information and the symbol data in the database are stored in the form of key value pairs, after the attribute information of the first stack frame is analyzed, the symbol data such as the method name and the line number of the code line corresponding to the first stack frame can be queried according to the attribute information.
In some embodiments, step 2B4 specifically includes:
step 2B41, determining the name of the target stack frame according to the address information of the target stack frame.
In implementation, the crash file parsing module parses out the name (module) to which the stack frame belongs according to the address of the first stack frame (i.e., the target stack frame).
Step 2B42, obtaining, by the intermediate forwarder, target source information corresponding to the name of the target stack frame from the relational database.
In the implementation, the crash file analysis module forwards the name of the target stack frame to the relational database through the intermediate forwarder, and searches target source information (meta information) corresponding to the name from the relational database to obtain the size of the chunk_size.
Step 2B43, caching the target source information as a symbol inquiry instruction in the remote dictionary service database through the intermediate forwarder.
In the implementation, the intermediate forwarder is used as the transit, and the target source information is cached in a remote dictionary service database (redis) so as to be convenient to call.
Step 2B44, determining the attribute information based on the address information of the target stack frame, the name of the target stack frame and the target source information.
In specific implementation, according to address, chunk _size and module of the target stack frame, an abase key (i.e. key) of the chunk to which the address belongs can be obtained, where abase key=module_name+ (address/chunk_size)
Step 2B45, transmitting the attribute information to the database through the intermediate forwarder.
And step 2B46, determining a target storage space corresponding to the attribute information from at least one storage space of the database, and acquiring symbol data corresponding to the target stack frame from the target storage space through the intermediate forwarder.
In some embodiments, step 2B46 specifically includes:
step 2B461 of transmitting the attribute information to the base database through the intermediate forwarder.
Step 2B462, determining, by using the base database, a target mapping relationship according to at least one mapping corresponding to the attribute information based on the attribute information.
Step 2B463, determining a corresponding target storage space from at least one storage space of the base database according to the target mapping relationship, and acquiring symbol data corresponding to the target mapping relationship from the target storage space.
In implementation, the abs key determined according to the attribute information may query a data structure (RangeMap, addressMap, containedRangeMap) of several maps (i.e., maps) of the chunk to which the target stack frame address belongs, where the maps store mapping relationships between memory addresses and method information, and trace back stack frame modes.
After the map data structure is obtained by the base database, the target storage space where the target stack frame is located can be queried through the mapping relation, and symbol data (namely, a method name and a line number corresponding to the target stack frame) of a key (abase key) determined by the attribute information is queried from the target storage space. And the next stack frame can be found by including a map (containedrange map), the restoration of the symbol data (e.g., method name and line number) of the next stack frame proceeds according to the procedure of steps 2B41 to 2B46 described above.
Through the scheme, the symbol data corresponding to each stack frame are sequentially obtained according to the obtained sequence of the stack frames, and the searching of the symbol data in a key value pair mode can rapidly improve the number searching efficiency.
And 2B5, integrating and outputting the obtained symbol data corresponding to the at least one stack frame.
In the specific implementation, symbol data corresponding to each stack frame is obtained through the process, the symbol data are sequenced and integrated according to the sequence of the stack frames after analysis, a final analysis result is obtained, and the analysis result is output to a display interface capable of being displayed. The display interface may be a display interface directly arranged on the server, or may be other display interfaces connected with the server in a wired or wireless manner. Therefore, the user can acquire the content of the symbol data analyzed by the crash file through the display interface, and further quickly determine the cause of the crash.
Through the scheme of the embodiment, symbol data are sub-packaged into each storage space of a database in advance for storage, so that after a collapse file is received, stack frame data information is obtained by analyzing the collapse file, corresponding target storage spaces are searched from each storage space for each stack frame in the stack frame data information, then the corresponding symbol data of the stack frame are analyzed and matched from the target storage spaces, and the number of the symbol data in each storage space is relatively small, so that the data reading amount is greatly reduced, and the analysis and matching time can be accelerated; and finally, analyzing and matching the stack frame data information with one or more corresponding symbol data to form analysis results to be output so as to judge the collapse file according to the output analysis results and timely formulate a solution strategy for the collapse situation.
The crash analysis mode can effectively improve analysis efficiency, reduce crash analysis time, and effectively reduce reading pressure due to the fact that the reading quantity is greatly reduced in the analysis process.
It should be noted that, the method of the embodiment of the present application may be performed by a single device, for example, a computer or a server. The method of the embodiment can also be applied to a distributed scene, and is completed by mutually matching a plurality of devices. In the case of such a distributed scenario, one of the devices may perform only one or more steps of the method of an embodiment of the present application, the devices interacting with each other to accomplish the method.
It should be noted that the foregoing describes some embodiments of the present application. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments described above and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
Based on the same inventive concept, the application also provides a crash analysis device corresponding to the crash analysis method of any embodiment.
Referring to fig. 3, a crash parsing apparatus includes:
a crash file receiving module 31, configured to receive a crash file;
the parsing module 32 is configured to parse the crash file to obtain stack frame data information of the crash file, where each stack frame data information includes at least one stack frame;
a symbol acquisition module 33, configured to take each stack frame in the at least one stack frame as a target stack frame respectively; analyzing attribute information of the target stack frame, determining a target storage space corresponding to the attribute information from at least one storage space of a database according to the attribute information, and acquiring symbol data corresponding to the target stack frame from the target storage space;
and the output module 34 is configured to integrate and output the obtained symbol data corresponding to the at least one stack frame.
In some embodiments, the apparatus further comprises:
the symbol table receiving module is used for receiving the symbol table file analyzed by breakdown;
the parsing module 32 is configured to parse the symbol table file to obtain a plurality of symbol data;
and the storage module is used for sub-packaging the plurality of symbol data into at least one group, forwarding the at least one group of symbol data to at least one storage space of the database through the intermediate transponder for storage, wherein one group of symbol data corresponds to one storage space.
In some embodiments, parsing module 32 includes:
a temporary storage unit for storing the symbol table file in a temporary memory;
the first message generating unit is used for determining an analysis task for analyzing the symbol table file and generating a corresponding first message queue according to the analysis task;
and the analysis unit is used for sending the first message queue to an analyzer, and analyzing the symbol table file in the temporary memory by using the analyzer to obtain a plurality of symbol data.
In some embodiments, the memory module comprises:
a second message generating unit, configured to determine that the symbol table file parsing is completed, where the intermediate forwarder generates a second message queue and sends the second message queue to the parser;
a forwarding unit, configured to forward the parsed symbol data to the database through an intermediate forwarder by using the parser;
and the storage unit is used for sub-packaging according to each group of preset number of address information by utilizing the address information of the plurality of symbol data of the database to obtain at least one group of symbol data, and storing the at least one group of symbol data in at least one storage space of the database.
In some embodiments, the memory module further comprises:
and the mapping analysis unit is used for determining the mapping relation of each symbol data, recording the mapping relation of each symbol data into at least one mapping diagram, and storing the at least one mapping diagram in the database.
In some embodiments, the map comprises at least one of:
a range map representing a functional range relationship;
an address map representing address relationships;
an inclusion map representing an inclusion function relationship.
In some embodiments, the memory module further comprises: the sparse processing unit is specifically used for:
determining the number of symbol data in each storage space, and taking the storage space with the number of symbol data smaller than a first threshold value as a sparse storage space; and counting the number of the sparse storage spaces, and in response to determining that the number of the sparse storage spaces is larger than a second threshold, merging the sparse storage spaces into at least one dense storage space, wherein the storage number of the dense storage spaces is smaller than or equal to the preset number.
In some embodiments, the symbol acquisition module 33 comprises:
an attribute forwarding unit, configured to send the attribute information to the database through the intermediate forwarder;
And the searching unit is used for determining a target storage space corresponding to the attribute information from at least one storage space of the database, and acquiring symbol data corresponding to the target stack frame from the target storage space through the intermediate forwarder.
In some embodiments, the database comprises at least one of:
a relational database for storing source information of the symbol data;
a remote dictionary service database for caching symbol inquiry instructions;
a base database comprising said at least one storage space.
In some embodiments, the symbol acquisition module 33 comprises: the attribute analysis unit is specifically configured to:
determining the name of the target stack frame according to the address information of the target stack frame; acquiring target source information corresponding to the name of the target stack frame from the relational database through the intermediate forwarder; caching the target source information as a symbol inquiry instruction in the remote dictionary service database through the intermediate forwarder; and determining the attribute information based on the address information of the target stack frame, the name of the target stack frame and the target source information.
In some embodiments, the search unit is specifically configured to:
Transmitting the attribute information to the base database through the intermediate forwarder; determining a target mapping relation based on the attribute information by utilizing the basic database according to at least one mapping diagram corresponding to the attribute information; and determining a corresponding target storage space from at least one storage space of the basic database according to the target mapping relation, and acquiring symbol data corresponding to the target mapping relation from the target storage space.
In some embodiments, the respective symbol data in each memory space is stored in the form of key-value pairs, wherein the key-value pairs include: and a key formed by the attribute information and a value formed by the symbol data.
For convenience of description, the above devices are described as being functionally divided into various modules, respectively. Of course, the functions of each module may be implemented in the same piece or pieces of software and/or hardware when implementing the present application.
The device of the foregoing embodiment is configured to implement the corresponding method in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiment, which is not described herein.
Based on the same inventive concept, the application also provides an electronic device corresponding to the method of any embodiment, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor implements the method of any embodiment when executing the program.
Fig. 4 shows a more specific hardware architecture of an electronic device according to this embodiment, where the device may include: processor 410, memory 420, input/output interface 430, communication interface 440, and bus 450. Wherein processor 410, memory 420, input/output interface 430, and communication interface 440 enable communication connections within the device between each other via bus 450.
The processor 410 may be implemented by a general-purpose CPU (Central Processing Unit ), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, etc. for executing relevant programs to implement the technical solutions provided in the embodiments of the present disclosure.
The Memory 420 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory ), static storage device, dynamic storage device, or the like. Memory 420 may store an operating system and other application programs, and when the technical solutions provided by the embodiments of the present specification are implemented in software or firmware, the relevant program codes are stored in memory 420 and invoked for execution by processor 410.
The input/output interface 430 is used to connect with an input/output module to realize information input and output. The input/output module may be configured as a component in a device (not shown) or may be external to the device to provide corresponding functionality. Wherein the input devices may include a keyboard, mouse, touch screen, microphone, various types of sensors, etc., and the output devices may include a display, speaker, vibrator, indicator lights, etc.
The communication interface 440 is used to connect communication modules (not shown) to enable communication interactions of the device with other devices. The communication module may implement communication through a wired manner (such as USB, network cable, etc.), or may implement communication through a wireless manner (such as mobile network, WIFI, bluetooth, etc.).
Bus 450 includes a path to transfer information between components of the device (e.g., processor 410, memory 420, input/output interface 430, and communication interface 440).
It should be noted that although the above device only shows the processor 410, the memory 420, the input/output interface 430, the communication interface 440, and the bus 450, in the implementation, the device may further include other components necessary to achieve normal operation. Furthermore, it will be understood by those skilled in the art that the above-described apparatus may include only the components necessary to implement the embodiments of the present description, and not all the components shown in the drawings.
The electronic device of the foregoing embodiment is configured to implement the corresponding crash analysis method in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiment, which is not described herein.
Based on the same inventive concept, the present application also provides a non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method according to any of the embodiments above, corresponding to the method according to any of the embodiments above.
The computer readable media of the present embodiments, including both permanent and non-permanent, removable and non-removable media, may be used to implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device.
The storage medium of the foregoing embodiments stores computer instructions for causing the computer to perform the method of any of the foregoing embodiments, and has the advantages of the corresponding method embodiments, which are not described herein.
Those of ordinary skill in the art will appreciate that: the discussion of any of the embodiments above is merely exemplary and is not intended to suggest that the scope of the application (including the claims) is limited to these examples; the technical features of the above embodiments or in the different embodiments may also be combined within the idea of the application, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the application as described above, which are not provided in detail for the sake of brevity.
Additionally, well-known power/ground connections to Integrated Circuit (IC) chips and other components may or may not be shown within the provided figures, in order to simplify the illustration and discussion, and so as not to obscure the embodiments of the present application. Furthermore, the devices may be shown in block diagram form in order to avoid obscuring the embodiments of the present application, and also in view of the fact that specifics with respect to implementation of such block diagram devices are highly dependent upon the platform within which the embodiments of the present application are to be implemented (i.e., such specifics should be well within purview of one skilled in the art). Where specific details (e.g., circuits) are set forth in order to describe example embodiments of the application, it should be apparent to one skilled in the art that embodiments of the application can be practiced without, or with variation of, these specific details. Accordingly, the description is to be regarded as illustrative in nature and not as restrictive.
While the application has been described in conjunction with specific embodiments thereof, many alternatives, modifications, and variations of those embodiments will be apparent to those skilled in the art in light of the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.
The present embodiments are intended to embrace all such alternatives, modifications and variances which fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, and the like, which are within the spirit and principles of the embodiments of the application, are intended to be included within the scope of the application.