CN105700992B - A kind of embedded system log recording method and diary record system - Google Patents

A kind of embedded system log recording method and diary record system Download PDF

Info

Publication number
CN105700992B
CN105700992B CN201610104856.2A CN201610104856A CN105700992B CN 105700992 B CN105700992 B CN 105700992B CN 201610104856 A CN201610104856 A CN 201610104856A CN 105700992 B CN105700992 B CN 105700992B
Authority
CN
China
Prior art keywords
daily record
character string
string information
address field
virtual address
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.)
Active
Application number
CN201610104856.2A
Other languages
Chinese (zh)
Other versions
CN105700992A (en
Inventor
游毓
杨万云
马翼
田达海
彭鹏
向平
周士兵
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hunan Goke Microelectronics Co Ltd
Original Assignee
Hunan Goke Microelectronics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hunan Goke Microelectronics Co Ltd filed Critical Hunan Goke Microelectronics Co Ltd
Priority to CN201610104856.2A priority Critical patent/CN105700992B/en
Publication of CN105700992A publication Critical patent/CN105700992A/en
Application granted granted Critical
Publication of CN105700992B publication Critical patent/CN105700992B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording 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/3466Performance evaluation by tracing or monitoring
    • G06F11/3476Data logging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3013Monitoring 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/1805Append-only file systems, e.g. using logs or journals to store data
    • G06F16/1815Journaling 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 a kind of embedded system log recording method and diary record system, change link configuration files, virtual address field is set in bin file, that is str address field, character string information in daily record is put into str address field, the instruction in addition to character string information in daily record is put into iram address field, the data in daily record are put into dram address field;Export the variate-value in the virtual address and daily record of above-mentioned character string information.Character string information is put into str address field by the present invention, and is not take up the ram spaces of embedded system, greatlys save cost;Variate-value in the virtual address and daily record of an output string information of the invention, reduces interface data amount, alleviates the load of system CPU and Peripheral Interface, improve the business execution efficiency of whole system.

Description

A kind of embedded system log recording method and diary record system
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 essential that current existing log recording scheme is as shown in Figure 1. In embedded systems, when needing output journal, CPU will be combined into one completely by the data content in Iram and Dram Log information, such as " Invalid Power State:0xFF ", then pass through daily record output interface(The interfaces such as serial ports, network interface) Journal displaying terminal is transferred to, corresponding daily record is finally shown in journal displaying terminal.
Prior art is to export complete log information by interface, then by taking log information above as an example, embedding " Invalid Power State will be stored among ram in embedded system:These changeless character string informations of 0x ", The variate-value FF of output is stored simultaneously, and the storage of variable only needs 1 byte, and corresponding character string information will account for 22 Byte, changeless character string occupy substantial amounts of space, and in embedded systems internal memory space be it is precious and Limited, inside ram sizes and chip cost especially in asic chip are closely related, so in typically in asic chip Portion Ram is extremely limited, and generally, the space that these character string informations take account for 20% or so of program gross space, utilize Extremely limited ram immobilizes storing these and takes the character string information of big quantity space, is said from the angle of cost, non- It is often unreasonable;When spread out of by external interface simultaneously, these character strings equally can be also transmitted, and can be taken suitable Peripheral Interface resource and CPU calculation resources, when Peripheral Interface is slower, for example serial ports, substantial amounts of log information would be possible to shadow The regular traffic of embedded system is rung, reduce the business execution efficiency of whole system, because the function effect of log system is whole The regular traffic of individual system, this is also unacceptable.These character string informations are the information that some are fixed, in daily record really Information content be included in print variable it is worthwhile in.
The content of the invention
The technical problems to be solved by the invention are, in view of the shortcomings of the prior art, providing a kind of embedded system daily record note Recording method and diary record system.
In order to solve the above technical problems, the technical solution adopted in the present invention is:A kind of embedded system log recording side Method, comprise the following steps:
1)Link configuration files are changed, virtual address is set in the file destination bin file of built-in system software Section, i.e. str address field, the character string information in daily record is put into str address field, will remove character string information in daily record Instruction in addition is put into iram address field, and the data in daily record are put into dram address field;
2)Export the variate-value in the virtual address and daily record of above-mentioned character string information.
It is further comprising the steps of:According to step 2)Character string information virtual address and daily record in variate-value, from institute Character string information corresponding to extraction in str address field is stated, and variate-value and character string information are combined, daily record is completed and shows Show.The display result of the daily record compared with log recording mechanism display result it is completely the same, it is convenient that daily record is analyzed.
Correspondingly, the invention provides a kind of diary record system, including:
Embedded system:For storing the instruction and data in daily record outside character string information;
Daily record output interface:For the variate-value in the virtual address and daily record of output string information;
Str address field:For storing the character string information in daily record.
The embedded system includes:
Iram address field:For storing the instruction in addition to character string information in daily record;
Dram address field:For storing the data in daily record.
Str address field is a virtual address field, does not have corresponding actual ram among embedded system, Character string information in each daily record can all have an one-to-one virtual address, and now in iram address fields and dram Instruction and data in address field is all without comprising the character string information in print log, effectively reducing to iram and dram Space requirement.
The diary record system also includes journal displaying terminal:For in the virtual address and daily record according to character string information Variate-value, character string information corresponding to extraction, and variate-value and character string information is combined from the address field of the str Come, complete journal displaying.The display result of daily record compared with log recording mechanism display result it is completely the same, it is convenient to day Will is analyzed.
Compared with prior art, the advantageous effect of present invention is that:Character string information is put into str ground by the present invention In the section of location, and the ram spaces of embedded system are not take up, greatly save cost;The void of an output string information of the invention Intend the variate-value in address and daily record, reduce interface data amount, alleviate the load of system CPU and Peripheral Interface, improve The business execution efficiency of whole system.
Brief description of the drawings
Fig. 1 is existing log recording solution principle figure;
Fig. 2 is build targets generation phase schematic diagram of the embodiment of the present invention;
Fig. 3 is journal displaying terminal structure schematic diagram.
Embodiment
The following three phases of the present invention point are realized:
1)The generation of embedded software build targets is set
When generating the target bin file of embedded software, in general pattern is that instruction is put into iram(Instruct Ram)'s Address field, place data into dram(Data Ram)Address field, iram address field and dram address fields have all actually corresponded to embedding Ram among embedded system(Random access memory)Address.In the present invention, it is necessary to change link configuration files(It can join Examine:《Fundamentals of Compiling》, author:Alfred V.Aho、Ravi Sethi、Jeffrey D.Ullman), by the character string in daily record Information is specially put among str address field, and str address field is a virtual address field, among embedded system Not corresponding actual ram, the character string information in each daily record can all have an one-to-one virtual address, And now the instruction and data in iram address fields and dram address fields all without comprising the character string information 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 only exported in the virtual address and daily record of character string corresponding to this daily record when carrying out daily record output Variate-value, for example, before daily record " Invalid Power State:0xFF ", if the virtual address of daily record character string is 0x213451d0, then this daily record only needs to export 5 bytes by daily record output interface in this case:0x21 0x34 0x51 0xd0 0xff, that is, this daily record output is completed, and original daily record needs to complete the output of 24 bytes, greatly Reduce interface data amount greatly, reduce system CPU and Peripheral Interface load.
3)Journal displaying terminal display mechanism
, it is necessary to be parsed to daily record, above bar after journal displaying terminal receives the daily record that embedded system sends Exemplified by daily record, the data that journal displaying terminal receives are 0x21 0x34 0x51 0xd0 0xff, and word is obtained from the message The address 0x213451d0 of string is accorded with, after getting address, is extracted from the str sections of the target bin file of built-in system software Corresponding character string information:“Invalid Power State:0x ", while variate-value 0xff and character string information are combined Come, final daily record displayed on the terminals:“Invalid Power State:0xFF ", final journal displaying is completed, the daily record Display result compared with log mechanism display result it is completely the same, it is convenient that daily record is analyzed.
Such as Fig. 3, journal displaying terminal of the invention includes:
Hardware interface submodule:It is responsible for obtaining the log information that daily record output interface is sent, and the log information is transmitted Submodule is assembled to parsing;
Parsing assembling submodule:The log information that is sended over for parsing hardware interface submodule, and will parse Character string virtual address is sent to character extracting sub-module, and receives the character string information obtained from character extracting sub-module, group Install into complete log information and be sent to daily record output sub-module;
Character extracting sub-module:It is virtual according to this for receiving the character string virtual address for parsing assembling submodule and sending After address obtains character string information from the file destination bin file of built-in system software, character string information is sent to solution Analysis assembling submodule;
Daily record output sub-module:For the complete log information for parsing assembling submodule transmission to be output into display eventually End.
Journal displaying terminal can be that PC, mobile phone etc. support log interface and the hardware system of daily record output, can use The exploitation of the SDKs such as VC, QT is realized.

Claims (3)

1. a kind of embedded system log recording method, it is characterised in that comprise the following steps:
1)Link configuration files are changed, virtual address field are set in the file destination bin file of built-in system software, i.e., Str address field, the character string information in daily record is put into str address field, by daily record in addition to character string information Instruction be put into iram address field, the data in daily record are put into dram address field;
2)Export the variate-value in the virtual address and daily record of above-mentioned character string information;
3)According to step 2)Character string information virtual address and daily record in variate-value, carried from the address field of the str Corresponding character string information is taken, and variate-value and character string information are combined, completes journal displaying.
A kind of 2. diary record system, it is characterised in that including:
Embedded system:For setting virtual address field, i.e. str address field in file destination bin file, by daily record Character string information be put into str address field, the instruction in addition to character string information in daily record is put into iram address Section, the data in daily record are put into dram address field;
Daily record output interface:For the variate-value in the virtual address and daily record of output string information;
Journal displaying terminal:For the variate-value in the virtual address and daily record according to character string information, from the address of the str Character string information corresponding to extraction in section, and variate-value and character string information are combined, complete journal displaying.
3. diary record system according to claim 2, it is characterised in that the journal displaying terminal includes:
Hardware interface submodule:It is responsible for obtaining the log information that daily record output interface is sent, and sends the log information to solution Analysis assembling submodule;
Parsing assembling submodule:The log information sended over for parsing hardware interface submodule, and the character that will be parsed String virtual address is sent to character extracting sub-module, and receives the character string information obtained from character extracting sub-module, has assembled Daily record output sub-module is sent into complete log information;
Character extracting sub-module:For receiving the character string virtual address for parsing assembling submodule and sending, according to the virtual address After obtaining character string information from the file destination bin file of built-in system software, character string information is sent to parsing group Fill submodule;
Daily record output sub-module:For the complete log information for parsing assembling submodule transmission to be output into display terminal.
CN201610104856.2A 2016-02-26 2016-02-26 A kind of embedded system log recording method and diary record system Active CN105700992B (en)

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 CN105700992A (en) 2016-06-22
CN105700992B true 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)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107423204B (en) * 2017-06-30 2020-12-25 北京五八信息技术有限公司 Processing method and device for operation log of application program and terminal
CN107515827B (en) * 2017-08-21 2021-07-27 湖南国科微电子股份有限公司 PCIE SSD custom log storage method and device and SSD

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101320348A (en) * 2008-06-25 2008-12-10 中兴通讯股份有限公司 Log function implementing method of embedded system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1200354C (en) * 2003-01-17 2005-05-04 清华大学 Automatic compressing/decompressing file system and its compressing algorithm
CN103927251B (en) * 2014-03-18 2017-02-01 烽火通信科技股份有限公司 Log management method for embedded system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101320348A (en) * 2008-06-25 2008-12-10 中兴通讯股份有限公司 Log function implementing method of embedded system

Also Published As

Publication number Publication date
CN105700992A (en) 2016-06-22

Similar Documents

Publication Publication Date Title
CN101295302B (en) Advertisement releasing system and method
ES2524311T3 (en) Method and system to expand the capabilities of integrated devices through network clients
CN102902537B (en) Based on the embedded type WEB MVC Development Framework of FastCGI and html template
WO2009147844A1 (en) Web page distribution system
CN109561078A (en) A kind of exterior chain url resource transfer method and device
CN101763357A (en) Method and system for browser to load internet resources
CN104394211A (en) Hadoop-based user behavior analysis system design and implementation method
CN109543121A (en) A kind of exterior chain url resource transfer method and device
CN106462524A (en) Interconnect systems and methods using hybrid memory cube links
CN104267972B (en) Browser local interface extended method and device
CN110908712A (en) Data processing method and equipment for cross-platform mobile terminal
CN101126977A (en) ISAPI based WEB static page generation method
CN101848148B (en) Data transmission processing system, device and method applied to financial message language
CN102999337A (en) Browser packaging system and method
CN105700992B (en) A kind of embedded system log recording method and diary record system
Gligorić et al. Performance evaluation of compact binary XML representation for constrained devices
CN101848239B (en) High-timeliness distributed service integration calling system
CN101334872B (en) Electronic government documents exchanging method based on web service
CN100511140C (en) Method for script language calling multiple output parameter interface by component software system
CN105634972A (en) Method for improving access efficiency of Web client
CN110445585A (en) Based on PPP information frame framing and frame decoding hardware accelerator
CN103678330A (en) Method, system and device for loading webpage data
CN111723314B (en) Webpage display method and device, electronic equipment and computer readable storage medium
CN103513986A (en) Method for using CGI technology for achieving dynamic web server in no-operation system
CN105282238B (en) A kind of method for managing resource

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