CN104750488B - A kind of software debugging daily record output control method - Google Patents
A kind of software debugging daily record output control method Download PDFInfo
- Publication number
- CN104750488B CN104750488B CN201510135284.XA CN201510135284A CN104750488B CN 104750488 B CN104750488 B CN 104750488B CN 201510135284 A CN201510135284 A CN 201510135284A CN 104750488 B CN104750488 B CN 104750488B
- Authority
- CN
- China
- Prior art keywords
- daily record
- function
- hash
- character string
- numerical value
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 28
- 238000004364 calculation method Methods 0.000 claims abstract description 7
- 238000007689 inspection Methods 0.000 claims 1
- 238000001514 detection method Methods 0.000 abstract description 3
- 230000007423 decrease Effects 0.000 description 2
- 230000018109 developmental process Effects 0.000 description 2
- 238000010252 digital analysis Methods 0.000 description 2
- 238000006073 displacement reaction Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 239000002253 acid Substances 0.000 description 1
- 150000007513 acids Chemical class 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000012886 linear function Methods 0.000 description 1
- 230000007257 malfunction Effects 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 230000011218 segmentation Effects 0.000 description 1
- 239000011800 void material Substances 0.000 description 1
Abstract
The present invention is more particularly directed to a kind of software debugging daily records to export control method.The software debugging daily record exports control method, including function log control module and function journal output module two parts, the function for opening daily record output will be needed to be added in the Hash table for realizing daily record switch, Hash table carries out Hash calculation with the character string numerical value of source files of program title and function name, and carries out collision detection by Hash value;Daily record output point carries out Hash Search according to the character string numerical value of program file title and function name, to opening the function of output control, carries out daily record output.The software debugging daily record exports control method, Hash calculation is carried out using the character string numerical value of source files of program title and function name, the output of match control function daily record can effectively reduce loss of the daily record control to performance in the case where contour performance requirement is developed in driving.
Description
Technical field
The present invention relates to computer software debugging technique field, more particularly to a kind of software debugging daily record output control is realized
Method.
Background technology
In recent years, the diversification with economy, life style with the continuous development of computer technology, people are in work and life
It is increasing to the demand of computer application software in work.More and more with the type of application software, scale is increasing, is
The running for making computer highly efficient, present software generally use multithreading.However, the scale with software is got over
Come bigger, the complexity of debugging is also higher and higher.So inquire, track and analyze for the ease of operator in the future, system can produce
Birthday will log, to record behavior and the state of each thread operation.
After carrying out drive software development process or software deployment to scene, it is soft that the progress of the debugging acids such as dbg cannot be relied on
The case where positioning of part problem, can only generally rely on the information such as daily record, statistics, warning.Traditional software debugging daily record be all by
It is recorded according to software module, and by the log recording of same module or multiple modules among identical file.However, in software
Debugging process in, the output quantity of daily record is often quite huge and is not easy to read.In order to which check on entire program executes step
Suddenly, it needs to open multiple journal files comparisons to check, can just check on.Not only heavy workload, but also easily malfunction, one is small
The heart will miss the detail of track problems, and log analysis is very difficult.In addition, the debugging log of function rank is due to information
It measures huge, can also computer performance be caused to decline, and common directly performance can be caused to decline into line function character match.
In order to solve problem above, the present invention proposes a kind of software debugging daily record output control method, to realize
The control of function daily record exports, and help is provided to the positioning of site problems.
Hash table(Hash table)Also hash table is cried, is according to key value(Key value)And it directly accesses
Data structure.That is, it is recorded by the way that key value is mapped to a position in table to access, to accelerate lookup
Speed.This mapping function is called hash function, and the array for storing record is called hash table.
Hash function can make the access process to a data sequence more rapid effective, pass through hash function, data element
Element will be positioned quickly.
The common method of Hash method includes following several:
(1)Direct addressing:It is hash address to take some of keyword or keyword linear function values.That is H (key)=key
Or H (key)=akey b, wherein a and b are constant(This hash function is called itself function).If wherein H (key)In
Through there is value, just looked for toward next, until H (key)Middle void value, just puts in.
(2)Digital analysis method:One group of data, such as the birthdate of one group of employee are analyzed, at this moment we have found that birth
Former bit digitals of date are substantially the same, and in this case, the probability to conflict occur will be very big, but it have been found that the date
Latter several indicate that the digital difference at month and exact date is very big, if constituting hash address with subsequent number, rush
Prominent probability can be substantially reduced.Therefore digital analysis method is exactly the rule for finding out number, is constructed as far as possible using these data
Conflict the lower hash address of probability.
(3)Middle square method:The centre several after keyword square is taken to be used as hash address.
(4)Jackknife method:It is divided into the identical several parts of digit, last part digit can be different keyword, then
Take this several part superposition and(Remove carry)As hash address.Numerical digit superposition can have displacement superposition and boundary to be superimposed two kinds
Method.Displacement superposition is the lowest order alignment of each section after dividing, and is then added;Boundary superposition is from one end to another
End folds back and forth along segmentation circle, and then alignment is added.
(5)Random number method:A random function is selected, takes the random value of keyword as hash address, commonly used in key
The different occasion of word length.
(6)Leaving remainder method:It is scattered to take keyword to remove the remainder of rear gained by some number p no more than the long m of hash table table
Column address.That is H (key)=key MOD p, p=m.Not only can be to the direct modulus of keyword, it also can be in folding, square taking
Modulus after equal operations.It is critically important to the selection of p, prime number or m are generally taken, if p choosings is bad, easy tos produce synonym.
Invention content
In order to compensate for the shortcomings of the prior art, the present invention provides a kind of simple and effective software debugging daily record output controls
Implementation method.
The present invention is achieved through the following technical solutions:
A kind of software debugging daily record output control method, it is characterised in that:Including function daily record control and function day
Will exports two parts, is as follows:
(1)Function daily record controls
Function log control module will need the function for opening daily record output to be added in Hash table to realize that daily record switchs,
Hash table carries out Hash calculation with the character string numerical value of source files of program title and function name, and is rushed by Hash value
Prominent detection;
(2)Function daily record exports
Function journal output module is in each daily record output point according to the character string of source files of program title and function name
Numerical value carries out Hash Search, is matched to function log control module, if the daily record output of daily record output point is opened,
Carry out daily record output.
The step(1)In, Hash table is in terms of the character string numerical value of source files of program title and function name progress Hash
It calculates, character string numerical computational formulas is:αm=(αm-1+(cm*65535)+(cm/ 65535)) * 11, wherein αmFor source files of program
M-th of character string numerical value of title and function name, cmFor m-th of character of source files of program title and function name, m is
Natural number, as m=1, α0=0。
The step(1)In, Hash hash formula is:Hash=((α * 65535)+(α/65535)) %n, wherein α are word
Symbol string numerical value, n are Hash bucket size.
The beneficial effects of the invention are as follows:The software debugging daily record exports control method, utilizes source files of program title
Hash calculation is carried out with the character string numerical value of function name, the output of match control function daily record can be contour in driving exploitation
Loss of the daily record control to performance is effectively reduced under performance requirement.
Description of the drawings
Attached drawing 1 is that function of the present invention exports debugging log control module schematic diagram.
Specific implementation mode
The present invention is described in detail below in conjunction with the accompanying drawings.
The software debugging daily record exports control method, including function daily record control and function daily record export two parts,
It is as follows:
(1)Function daily record controls
Function log control module will need the function for opening daily record output to be added in Hash table to realize that daily record switchs,
Hash table carries out Hash calculation with the character string numerical value of source files of program title and function name, and is rushed by Hash value
Prominent detection;
(2)Function daily record exports
Function journal output module is in each daily record output point according to the character string of source files of program title and function name
Numerical value carries out Hash Search, is matched to function log control module, if the daily record output of daily record output point is opened,
Carry out daily record output.
The step(1)In, Hash table is in terms of the character string numerical value of source files of program title and function name progress Hash
It calculates, character string numerical computational formulas is:αm=(αm-1+(cm*65535)+(cm/ 65535)) * 11, wherein αmFor source files of program
M-th of character string numerical value of title and function name, cmFor m-th of character of source files of program title and function name, m is
Natural number, as m=1, α0=0。
The step(1)In, Hash hash formula is:Hash=((α * 65535)+(α/65535)) %n, wherein α are word
Symbol string numerical value, n are Hash bucket size.
The present invention mainly carries out Hash hash using the character string numerical value of source files of program title and function name, and leads to
It crosses Hash lookup and realizes function daily record switch, under the influence of smaller performance, this method is defeated to the control for carrying out daily record according to function
Go out, prodigious help can be provided to the positioning of site problems.
Claims (3)
1. a kind of software debugging daily record exports control method, it is characterised in that:Including function daily record control and function daily record
Two parts are exported, are as follows:
(1)Function daily record controls
Function log control module will need the function for opening daily record output to be added in Hash table to realize that daily record switchs, Hash
Table carries out Hash calculation with the character string numerical value of source files of program title and function name, and carries out conflict inspection by Hash value
It surveys;
(2)Function daily record exports
Function journal output module is in each daily record output point according to the character string numerical value of source files of program title and function name
Hash Search is carried out, is matched to function log control module, if the daily record output of daily record output point is opened, is carried out
Daily record exports.
2. software debugging daily record according to claim 1 exports control method, it is characterised in that:The step(1)
In, Hash table carries out Hash calculation with the character string numerical value of source files of program title and function name, and character string numerical computations are public
Formula is:αm=(αm-1+(cm*65535)+(cm/ 65535)) * 11, wherein αmIt is m-th of source files of program title and function name
Character string numerical value, cmFor m-th of character of source files of program title and function name, m is natural number, as m=1, α0=0。
3. software debugging daily record according to claim 1 exports control method, it is characterised in that:The step(1)
In, Hash hash formula is:Hash=((α * 65535)+(α/65535)) %n, wherein α are character string numerical value, and n is that Hash bucket is big
It is small.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510135284.XA CN104750488B (en) | 2015-03-26 | 2015-03-26 | A kind of software debugging daily record output control method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510135284.XA CN104750488B (en) | 2015-03-26 | 2015-03-26 | A kind of software debugging daily record output control method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104750488A CN104750488A (en) | 2015-07-01 |
CN104750488B true CN104750488B (en) | 2018-07-31 |
Family
ID=53590243
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510135284.XA Active CN104750488B (en) | 2015-03-26 | 2015-03-26 | A kind of software debugging daily record output control method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104750488B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105930256B (en) * | 2016-04-14 | 2018-07-17 | 北京思特奇信息技术股份有限公司 | A kind of log-output method and device using log4j single cent parts |
CN108594690A (en) * | 2018-07-25 | 2018-09-28 | 江苏精微特电子股份有限公司 | A kind of application structure of micropressure sensor in button control field |
CN111159128B (en) * | 2019-12-30 | 2022-04-22 | 浪潮电子信息产业股份有限公司 | Log output method and device and computer readable storage medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101697520A (en) * | 2009-11-12 | 2010-04-21 | 杭州华三通信技术有限公司 | Method and device for processing system logs |
CN103731355A (en) * | 2013-12-31 | 2014-04-16 | 迈普通信技术股份有限公司 | Method and system for avoiding Hash collision during MAC address learning |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4397354B2 (en) * | 2005-06-28 | 2010-01-13 | 富士通株式会社 | Test recording method, test recording apparatus, and test recording program |
-
2015
- 2015-03-26 CN CN201510135284.XA patent/CN104750488B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101697520A (en) * | 2009-11-12 | 2010-04-21 | 杭州华三通信技术有限公司 | Method and device for processing system logs |
CN103731355A (en) * | 2013-12-31 | 2014-04-16 | 迈普通信技术股份有限公司 | Method and system for avoiding Hash collision during MAC address learning |
Also Published As
Publication number | Publication date |
---|---|
CN104750488A (en) | 2015-07-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103729442B (en) | Record the method and database engine of transaction journal | |
JP6639420B2 (en) | Method for flash-optimized data layout, apparatus for flash-optimized storage, and computer program | |
US10489455B2 (en) | Scoped search engine | |
KR100230767B1 (en) | Method of data storage and search for dynamic memory | |
TWI617928B (en) | Systems, apparatuses, and methods for feature searching | |
CN107180018B (en) | Accelerate compression method and the device using the method based on hash | |
CN104504105B (en) | A kind of storage method of real-time data base | |
CN104750488B (en) | A kind of software debugging daily record output control method | |
CN106663047A (en) | Systems and methods for oprtimized signature comparisons and data replication | |
CN104408034A (en) | Text big data-oriented Chinese word segmentation method | |
CN108268596B (en) | Method and system for searching data stored in memory | |
US11327881B2 (en) | Technologies for column-based data layouts for clustered data systems | |
Guz et al. | Real-time analytics as the killer application for processing-in-memory | |
CN202443462U (en) | Device for assisting upper computer to search free block in page mapping unit block | |
Salkhordeh et al. | Constant time garbage collection in ssds | |
Kaplan et al. | Deduplication in resistive content addressable memory based solid state drive | |
Fevgas et al. | HyR-tree: a spatial index for hybrid flash/3D XPoint storage | |
CN105335296A (en) | Data processing method, apparatus and system | |
He et al. | Read as Needed: Building {WiSER}, a {Flash-Optimized} Search Engine | |
CN103678204B (en) | Processor and data processing method | |
Glombiewski et al. | Designing an event store for a modern three-layer storage hierarchy | |
Kharade et al. | Selection of small index to reduce the number of pages for improving efficiency | |
Song et al. | LIFM: A Persistent Learned Index for Flash Memory | |
KR20240044230A (en) | Device and method for data high-speed processing blockchain-based | |
KR20240044232A (en) | Device and method for data high-speed processing key-value database-based |
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 | ||
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20230328 Address after: 250000 building S02, No. 1036, Langchao Road, high tech Zone, Jinan City, Shandong Province Patentee after: Shandong Inspur Scientific Research Institute Co.,Ltd. Address before: No. 1036, Shandong high tech Zone wave road, Ji'nan, Shandong Patentee before: INSPUR GROUP Co.,Ltd. |