CN105700992A - Embedded system log recording method and log recording system - Google Patents
Embedded system log recording method and log recording system Download PDFInfo
- Publication number
- CN105700992A CN105700992A CN201610104856.2A CN201610104856A CN105700992A CN 105700992 A CN105700992 A CN 105700992A CN 201610104856 A CN201610104856 A CN 201610104856A CN 105700992 A CN105700992 A CN 105700992A
- Authority
- CN
- China
- Prior art keywords
- character string
- daily record
- string information
- address field
- log
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/34—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
- G06F11/3466—Performance evaluation by tracing or monitoring
- G06F11/3476—Data logging
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3003—Monitoring arrangements specially adapted to the computing system or computing system component being monitored
- G06F11/3013—Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is an embedded system, i.e. a combination of hardware and software dedicated to perform a certain function in mobile devices, printers, automotive or aircraft systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/18—File system types
- G06F16/1805—Append-only file systems, e.g. using logs or journals to store data
- G06F16/1815—Journaling file systems
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computing Systems (AREA)
- Quality & Reliability (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Mathematical Physics (AREA)
- Computer Hardware Design (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention discloses an embedded system log recording method and a log recording system. The method comprises the steps that a link configuration file is modified, a virtual address field, namely, an str address field, is set in a bin file, character string information in a log is put into the str address field, instructions, except the character string information, in the log are put into an iram address field, and data in the log is put into a dram address field; a virtual address of the character string information and variable values in the log are output. According to the embedded system log recording method and the log recording system, the character string information is put into the str address field, an ram space of the embedded system is not occupied, and the cost is greatly reduced; only the virtual address of the character string information and the variable values in the log are output, the interface data volume is decreased, loads of a system CPU and peripheral interfaces are reduced, and the service execution efficiency of the whole system is improved.
Description
Technical field
The present invention relates to a kind of embedded system log recording method and diary record system。
Background technology
In embedded systems, log recording is requisite, and current existing log recording scheme is as shown in Figure 1。In embedded systems, when needs output journal, CPU will be combined into a full log information by the data content in Iram and Dram, such as " InvalidPowerState:0xFF ", then pass through daily record output interface (interface such as serial ports, network interface) and be transferred to journal displaying terminal, journal displaying terminal finally demonstrates corresponding daily record。
Prior art is to be exported by interface by complete log information, so for log information above, " InvalidPowerState:0x " these changeless character string informations will be stored in the middle of ram in embedded systems, store the variate-value FF of output simultaneously, the storage of variable has only to 1 byte, and the character string information of correspondence will account for 22 bytes, changeless character string occupies substantial amounts of space, and memory space internal in embedded systems is precious and limited, especially the inside ram size in asic chip and chip cost are closely related, so the inside Ram being typically in asic chip is extremely limited, generally, the space that these character string informations take account for about the 20% of program gross space, extremely limited ram is utilized to take the character string information of big quantity space to store these and immobilize, from the angle of cost, very unreasonable;When being undertaken spreading out of by external interface simultaneously, these character strings equally also can be transmitted, suitable Peripheral Interface resource and CPU calculation resources can be taken, when Peripheral Interface is slower, such as serial ports, substantial amounts of log information, it would be possible to affect the regular traffic of embedded system, reduces the business execution efficiency of whole system, because the function effect of the log system regular traffic of whole system, this is also unacceptable。These character string informations are information that some are fixing, quantity of information real in daily record be included in the variable that prints worthwhile in。
Summary of the invention
The technical problem to be solved is, not enough for prior art, it is provided that a kind of embedded system log recording method and diary record system。
For solving above-mentioned technical problem, the technical solution adopted in the present invention is: a kind of embedded system log recording method, comprises the following steps:
1) amendment link configuration file, the file destination bin file of built-in system software arranges virtual address field, the i.e. address field of str, character string information in daily record is put in the address field of str, the instruction except character string information in daily record is put into the address field of iram, the data in daily record are put into the address field of dram;
2) variate-value in the virtual address of above-mentioned character string information and daily record is exported。
Further comprising the steps of: according to step 2) the virtual address of character string information and daily record in variate-value, from the address field of described str, extract the character string information of correspondence, and variate-value and character string information combined, complete journal displaying。The display result of this daily record compared with the display result of log recording mechanism completely the same, convenient daily record is analyzed。
Correspondingly, the invention provides a kind of diary record system, including:
Embedded system: for storing in daily record the instruction and data outside character string information;
Daily record output interface: for the variate-value in the virtual address of output string information and daily record;
The address field of str: for storing the character string information in daily record。
Described embedded system includes:
The address field of iram: for storing the instruction except character string information in daily record;
The address field of dram: for storing the data in daily record。
The address field of str is a virtual address field, corresponding actual ram is not had in the middle of embedded system, character string information in each daily record all can have a virtual address one to one, and now the instruction and data in iram address field and dram address field is all without the character string information comprised in print log, the space requirement to iram and dram effectively reduced。
This diary record system also includes journal displaying terminal: for the variate-value in the virtual address according to character string information and daily record, the character string information of correspondence is extracted from the address field of described str, and variate-value and character string information are combined, complete journal displaying。The display result of daily record compared with the display result of log recording mechanism completely the same, convenient daily record is analyzed。
Compared with prior art, character string information is put in the address field of str by the had the beneficial effect that present invention of the present invention, and is not take up the ram space of embedded system, is greatly saved cost;Variate-value in the virtual address of the present invention output string information and daily record, decreases interface data amount, alleviates the load of system CPU and Peripheral Interface, improves the business execution efficiency of whole system。
Accompanying drawing explanation
Fig. 1 is existing log recording solution principle figure;
Fig. 2 is embodiment of the present invention build targets generation phase schematic diagram;
Fig. 3 is journal displaying terminal structure schematic diagram。
Detailed description of the invention
The present invention divides the three below stage to realize:
1) embedded software build targets generates and arranges
When generating the target bin file of embedded software, general pattern is that instruction is put into iram(instruction Ram) address field, place data into dram(data Ram) address field, the ram(random access memory in the middle of embedded system that the address field of iram and dram address field are all actual corresponding) address。In the present invention, amendment link configuration file is needed (to be referred to: " Fundamentals of Compiling ", author: AlfredV.Aho, RaviSethi, JeffreyD.Ullman), character string information in daily record is put into specially in the middle of the address field of a str, the address field of str is a virtual address field, corresponding actual ram is not had in the middle of embedded system, character string information in each daily record all can have a virtual address one to one, and now the instruction and data in iram address field and dram address field is all without the character string information comprised in print log, the space requirement to iram and dram effectively reduced。
2) the daily record output mechanism of embedded system
The present invention is when carrying out daily record output, only export the variate-value in the virtual address of character string corresponding to this daily record and daily record, daily record " InvalidPowerState:0xFF " before such as, if the virtual address of daily record character string is 0x213451d0, this daily record has only to export 5 byte: 0x210x340x510xd00xff by daily record output interface so in this case, namely this daily record output is completed, and original daily record has needed the output of 24 bytes, greatly reduce interface data amount, decrease system CPU and Peripheral Interface load。
3) journal displaying terminal demonstration mechanism
After journal displaying terminal receives the daily record that embedded system is sent, need daily record is resolved, above bar daily record is example, the data that journal displaying terminal receives are 0x210x340x510xd00xff, the address 0x213451d0 of character string is obtained from this message, after getting address, the character string information of correspondence is extracted: " InvalidPowerState:0x " from the str section of the target bin file of built-in system software, variate-value 0xff and character string information are combined simultaneously, final daily record displayed on the terminals: " InvalidPowerState:0xFF ", complete final journal displaying, the display result of this daily record compared with the display result of log mechanism completely the same, conveniently daily record is analyzed。
Such as Fig. 3, the journal displaying terminal of the present invention includes:
Hardware interface submodule: be responsible for obtaining the log information that daily record output interface sends, and this log information is sent to parsing assembling submodule;
Resolve and assemble submodule: for resolving the log information that hardware interface submodule sends over, and the character string virtual address parsed is sent to character extraction submodule, and receive the character string information extracting submodule acquisition from character, it is completed complete log information and is sent to daily record output sub-module;
Character extracts submodule: assemble, for receiving to resolve, the character string virtual address that submodule sends, and after obtaining character string information according to this virtual address, character string information is sent to parsing and assembles submodule from the file destination bin file of built-in system software;
Daily record output sub-module: for exporting display terminal by resolving the complete log information assembling submodule transmission。
Journal displaying terminal can be that PC, mobile phone etc. support log interface and the hardware system of daily record output, it is possible to use the SDK exploitations such as VC, QT realize。
Claims (6)
1. an embedded system log recording method, it is characterised in that comprise the following steps:
1) amendment link configuration file, the file destination bin file of built-in system software arranges virtual address field, the i.e. address field of str, character string information in daily record is put in the address field of str, the instruction except character string information in daily record is put into the address field of iram, the data in daily record are put into the address field of dram;
2) variate-value in the virtual address of above-mentioned character string information and daily record is exported。
2. embedded system log recording method according to claim 1, it is characterized in that, further comprising the steps of: according to step 2) the virtual address of character string information and daily record in variate-value, the character string information of correspondence is extracted from the address field of described str, and variate-value and character string information are combined, complete journal displaying。
3. a diary record system, it is characterised in that including:
Embedded system: for storing in daily record the instruction and data outside character string information;
Daily record output interface: for the variate-value in the virtual address of output string information and daily record;
The address field of str: for storing the character string information in daily record。
4. diary record system according to claim 3, it is characterised in that described embedded system includes:
The address field of iram: for storing the instruction except character string information in daily record;
The address field of dram: for storing the data in daily record。
5. diary record system according to claim 4, it is characterized in that, this diary record system also includes journal displaying terminal: for the variate-value in the virtual address according to character string information and daily record, the character string information of correspondence is extracted from the address field of described str, and variate-value and character string information are combined, complete journal displaying。
6. diary record system according to claim 5, it is characterised in that described journal displaying terminal includes:
Hardware interface submodule: be responsible for obtaining the log information that daily record output interface sends, and this log information is sent to parsing assembling submodule;
Resolve and assemble submodule: for resolving the log information that hardware interface submodule sends over, and the character string virtual address parsed is sent to character extraction submodule, and receive the character string information extracting submodule acquisition from character, it is completed complete log information and is sent to daily record output sub-module;
Character extracts submodule: assemble, for receiving to resolve, the character string virtual address that submodule sends, and after obtaining character string information according to this virtual address, character string information is sent to parsing and assembles submodule from the file destination bin file of built-in system software;
Daily record output sub-module: for exporting display terminal by resolving the complete log information assembling submodule transmission。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610104856.2A CN105700992B (en) | 2016-02-26 | 2016-02-26 | A kind of embedded system log recording method and diary record system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610104856.2A CN105700992B (en) | 2016-02-26 | 2016-02-26 | A kind of embedded system log recording method and diary record system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105700992A true CN105700992A (en) | 2016-06-22 |
CN105700992B CN105700992B (en) | 2017-11-21 |
Family
ID=56222399
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610104856.2A Active CN105700992B (en) | 2016-02-26 | 2016-02-26 | A kind of embedded system log recording method and diary record system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105700992B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107423204A (en) * | 2017-06-30 | 2017-12-01 | 北京五八信息技术有限公司 | Processing method, device and the terminal of the Operation Log of application program |
CN107515827A (en) * | 2017-08-21 | 2017-12-26 | 湖南国科微电子股份有限公司 | Storage method, device and the SSD of the self-defined daily records of PCIE SSD |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1425986A (en) * | 2003-01-17 | 2003-06-25 | 清华大学 | Automatic compressing/decompressing file system and its compressing algorithm |
CN101320348A (en) * | 2008-06-25 | 2008-12-10 | 中兴通讯股份有限公司 | Log function implementing method of embedded system |
CN103927251A (en) * | 2014-03-18 | 2014-07-16 | 烽火通信科技股份有限公司 | Log management method for embedded system |
-
2016
- 2016-02-26 CN CN201610104856.2A patent/CN105700992B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1425986A (en) * | 2003-01-17 | 2003-06-25 | 清华大学 | Automatic compressing/decompressing file system and its compressing algorithm |
CN101320348A (en) * | 2008-06-25 | 2008-12-10 | 中兴通讯股份有限公司 | Log function implementing method of embedded system |
CN103927251A (en) * | 2014-03-18 | 2014-07-16 | 烽火通信科技股份有限公司 | Log management method for embedded system |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107423204A (en) * | 2017-06-30 | 2017-12-01 | 北京五八信息技术有限公司 | Processing method, device and the terminal of the Operation Log of application program |
CN107515827A (en) * | 2017-08-21 | 2017-12-26 | 湖南国科微电子股份有限公司 | Storage method, device and the SSD of the self-defined daily records of PCIE SSD |
CN107515827B (en) * | 2017-08-21 | 2021-07-27 | 湖南国科微电子股份有限公司 | PCIE SSD custom log storage method and device and SSD |
Also Published As
Publication number | Publication date |
---|---|
CN105700992B (en) | 2017-11-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN100437579C (en) | Method for realizing AJAX webpage | |
EP1676210B1 (en) | Method and apparatus for handling text and binary mark up languages in a computing device | |
CN110908712A (en) | Data processing method and equipment for cross-platform mobile terminal | |
CN107153636A (en) | It is a kind of to realize the method and system that business datum is quickly exported with PDF format | |
CN109684607B (en) | JSON data analysis method and device, computer equipment and storage medium | |
CN110297999A (en) | A kind of web page template generation method and device, webpage loading method and front-end server and Website server | |
CN107766532A (en) | A kind of front end Node.js automates positive static method | |
CN106339237B (en) | For the plug-in unit loading frame and method of the field JavaEE WEB application | |
CN102999337A (en) | Browser packaging system and method | |
CN103645908A (en) | Full life circle development achievement system of intemetware | |
CN101848148B (en) | Data transmission processing system, device and method applied to financial message language | |
CN100511140C (en) | Method for script language calling multiple output parameter interface by component software system | |
CN106648569A (en) | Target serialization achieving method and device | |
CN109274724A (en) | A kind of realization system and method for front and back end separation architecture | |
CN111723314B (en) | Webpage display method and device, electronic equipment and computer readable storage medium | |
CN101763432A (en) | Method for constructing lightweight webpage dynamic view | |
CN105700992A (en) | Embedded system log recording method and log recording system | |
CN106126299B (en) | Service plug-in processing method and device | |
CN111898982A (en) | Electronic invoice generation method | |
CN115065945B (en) | Short message link generation method and device, electronic equipment and storage medium | |
CN114186958A (en) | Method, computing device and storage medium for exporting list data as spreadsheet | |
CN105528219A (en) | Dynamic packaging method for response under REST style framework | |
EP4024201A1 (en) | Front-end application orchestration method, apparatus, electronic device, medium and program product | |
Thirunavukkarasu et al. | Creating Payment Application and Cryptocurrency on the Ethereum Blockchain | |
CN116975087A (en) | Heterogeneous data source retrieval method, device, equipment and medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
EE01 | Entry into force of recordation of patent licensing contract | ||
EE01 | Entry into force of recordation of patent licensing contract |
Application publication date: 20160622 Assignee: Jiangsu Xinsheng Intelligent Technology Co., Ltd. Assignor: GOKE MICROELECTRONICS CO., LTD. Contract record no.: 2018430000021 Denomination of invention: Embedded system log recording method and log recording system Granted publication date: 20171121 License type: Common License Record date: 20181203 |