CN107480038A - The method for analyzing performance of real time operating system - Google Patents

The method for analyzing performance of real time operating system Download PDF

Info

Publication number
CN107480038A
CN107480038A CN201710751263.XA CN201710751263A CN107480038A CN 107480038 A CN107480038 A CN 107480038A CN 201710751263 A CN201710751263 A CN 201710751263A CN 107480038 A CN107480038 A CN 107480038A
Authority
CN
China
Prior art keywords
performance
current
performance evaluation
chained list
real time
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
Application number
CN201710751263.XA
Other languages
Chinese (zh)
Other versions
CN107480038B (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.)
Beijing Wing Hui Information Technology Co Ltd
Original Assignee
Beijing Wing Hui Information Technology 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 Beijing Wing Hui Information Technology Co Ltd filed Critical Beijing Wing Hui Information Technology Co Ltd
Priority to CN201710751263.XA priority Critical patent/CN107480038B/en
Publication of CN107480038A publication Critical patent/CN107480038A/en
Application granted granted Critical
Publication of CN107480038B publication Critical patent/CN107480038B/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/3495Performance evaluation by tracing or monitoring for systems
    • 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/3452Performance evaluation by statistical analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Probability & Statistics with Applications (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention belongs to computer realm, and in particular to the method for analyzing performance of real time operating system.The method for analyzing performance of real time operating system, comprises the following steps:(1) initialize;(2) during system tick interrupt each time, the current task control block on each core is sampled by event acquisition call back function;(3) analytic statistics is carried out to the performance evaluation message of the task control block of all cores;(4) with the result of character graphics interface display performance evaluation chained list.

Description

The method for analyzing performance of real time operating system
Technical field
The invention belongs to computer realm, and in particular to the method for analyzing performance of real time operating system.
Background technology
System performance analysis instrument has systematic function bottleneck analysis and positioning function for real time operating system, so that Developer can be influenceed the key position of systematic function with fast positioning and it is optimized.
System performance analysis instrument is the sharp weapon in real time operating system later development tuning stage.For real-time oss System, but system bottleneck can not be pin-pointed to function rank by general system performance analysis instrument, can only check and appoint Rank of being engaged in performance accounting in systems;Current performance data is only able to display, can not log history data and use big data mode Analyzed;The total load of system is can only obtain under SMP multinuclears, distribution situation of the total load on each core can not be shown; Some network analysis instruments just can be used normally using invasive mode, it is necessary to change system code.
The content of the invention
Goal of the invention:The present invention has made improvements in view of the above-mentioned problems of the prior art, i.e., the invention discloses real-time The method for analyzing performance of operating system.
Technical scheme:The method for analyzing performance of real time operating system, comprises the following steps:
(1) initialize
(11) start-up parameter that parsing user is passed to, judges whether the start-up parameter that user is passed to is legal, if user is passed to Start-up parameter it is illegal, then using the start-up parameter that is passed to of default parameters substitution user, subsequently into step (12);If user Incoming start-up parameter is legal, then is directly entered step (12);
(12) judge whether state machine is normal, if state machine is abnormal, terminate this operation, if state machine is normal, basis Start-up parameter creates object, then updates state machine, terminates initial work;
(2) during system tick interrupt each time, by event acquisition call back function to the current task on each core Control block is sampled, wherein:
Current task control block sampling on each core is comprised the following steps:
(21) task control block when pronucleus is obtained, if when the task control block of pronucleus is not belonging to perfs and priority Not least priority, then the task control block is encapsulated as performance evaluation message, then by the being sent to property of performance evaluation message Queue can be analyzed, into step (22);Conversely, it is directly entered step (22);
(22) judge whether current platform is symmetric multiprocessor pattern, if current platform is not symmetric multiprocessor mould Formula, terminate this operation;If current platform is symmetric multiprocessor pattern, into step (23);
(23) judge whether that all cores have all carried out information gathering, if all cores have all carried out information gathering, terminate this Operation, if not all cores have all carried out information gathering, then carry out information gathering using the next core of internuclear interrupt notification;
(3) analytic statistics is carried out to the performance evaluation message of the task control block of all cores
(31) performance evaluation message is obtained from performance evaluation queue, into step (32);
(32) according to performance evaluation message constructing performance analysis data node, into step (33);
(33) judge whether current performance analysis data node is new performance analysis data node, if current performance Analyze data node is not new performance analysis data node, then into step (35);If current performance analysis data node It is new performance analysis data node, then into step (34);
(34) judge whether the performance evaluation chained list of current performance analysis data is full, if performance evaluation chained list is full, Chained list tail node is then deleted, into step (35), if performance evaluation chained list is less than being directly entered step (35);
(35) performance evaluation chained list is rearranged from big to small according to counting;
(4) with the result of character graphics interface display performance evaluation chained list, comprise the following steps:
(41) performance evaluation chained list is obtained, into step (42);
(42) the reference summation T of performance evaluation chained list is obtained, into step (43);
(43) a performance analysis data is obtained, into step (44);
(44) if the reference count accounting of current performance analyze data quotes summation and is more than 30%, display font is red Color, conversely, into step (45);
(45) if the reference count accounting of current performance analyze data quotes summation and is more than 20%, display font is Huang Color, conversely, into step (46);
(46) if the reference count accounting of current performance analyze data quotes summation and is more than 10%, display font is green Color, conversely, into step (47);
(47) current performance analyze data is printed, into step (48);
(48) judge whether to have printed all performance analysis datas, if not printed all performance evaluation numbers According into step (43), if having printed all performance analysis datas, terminating this operation.
Further, lowest priority is 255 in step (21).
Further, performance evaluation message contains current CPU ID, Thread Id, process ID, PC value words in step (21) Section.
Further, the counting in step (35) refers to the reference number of identical PC values.
Further, the result of the performance evaluation chained list of step (4) include thread name, Thread Id, process ID, CPU ID, Symbolic address, PC values, count value, function name, and refresh simultaneously identify systematic function accounting height in different colors in real time.
Beneficial effect:The method for analyzing performance of real time operating system disclosed by the invention has the advantages that:
(1) start-up parameter can be configured according to specific system load environment;
(2) can be quickly to systematic function bottleneck and focus Code location;
(3) the internuclear distribution situation of system load can be obtained;
(4) with character graphics display performance analysis result, make result clear;
(5) real-time refresh performance analysis result, result is made effectively, in real time;
(6) it with log history data and can be analyzed, make result accurate, reliable;
(7) it can not only be used for the performance issue of analysis kernel, while application code can be analyzed.
Brief description of the drawings
Fig. 1 is the flow chart of initialization;
Fig. 2 is the flow chart sampled to the current task control block on core;
Fig. 3 is the flow chart of analytic statistics;
Fig. 4 is the flow chart of display.
Embodiment:
The embodiment of the present invention is described in detail below.
As shown in figures 1-4, the method for analyzing performance of real time operating system, comprises the following steps:
(1) initialize
(11) start-up parameter that parsing user is passed to, judges whether the start-up parameter that user is passed to is legal, if user is passed to Start-up parameter it is illegal, then using the start-up parameter that is passed to of default parameters substitution user, subsequently into step (12);If user Incoming start-up parameter is legal, then is directly entered step (12);
(12) judge whether state machine is normal, if state machine is abnormal, terminate this operation, if state machine is normal, basis Start-up parameter creates object, then updates state machine, terminates initial work;
(2) during system tick interrupt each time, by event acquisition call back function to the current task on each core Control block (TCB) is sampled, wherein:
Current task control block sampling on each core is comprised the following steps:
(21) task control block when pronucleus is obtained, if (being English when the task control block of pronucleus is not belonging to perfs Performance abbreviation) and the not least priority of priority, then the task control block is encapsulated as performance evaluation message, so The performance evaluation message is sent to performance evaluation queue afterwards, into step (22);Conversely, it is directly entered step (22);
(22) judge whether current platform is symmetric multiprocessor pattern (SMP), if current platform is not symmetric multi-processors Device pattern, terminate this operation;If current platform is symmetric multiprocessor pattern, into step (23);
(23) judge whether that all cores have all carried out information gathering, if all cores have all carried out information gathering, terminate this Operation, if not all cores have all carried out information gathering, then carry out information gathering using the next core of internuclear interrupt notification;
(3) analytic statistics is carried out to the performance evaluation message of the task control block of all cores
(31) performance evaluation message is obtained from performance evaluation queue, into step (32);
(32) according to performance evaluation message constructing performance analysis data node, into step (33);
(33) judge whether current performance analysis data node is new performance analysis data node, if current performance Analyze data node is not new performance analysis data node, then into step (35);If current performance analysis data node It is new performance analysis data node, then into step (34);
(34) judge whether the performance evaluation chained list of current performance analysis data is full, if performance evaluation chained list is full, Chained list tail node is then deleted, into step (35), if performance evaluation chained list is less than being directly entered step (35);
(35) performance evaluation chained list is rearranged from big to small according to counting;
(4) with the result of character graphics interface display performance evaluation chained list, comprise the following steps:
(41) performance evaluation chained list is obtained, into step (42);
(42) the reference summation T of performance evaluation chained list is obtained, into step (43);
(43) a performance analysis data is obtained, into step (44);
(44) if the reference count accounting of current performance analyze data quotes summation and is more than 30%, display font is red Color, conversely, into step (45);
(45) if the reference count accounting of current performance analyze data quotes summation and is more than 20%, display font is Huang Color, conversely, into step (46);
(46) if the reference count accounting of current performance analyze data quotes summation and is more than 10%, display font is green Color, conversely, into step (47);
(47) current performance analyze data is printed, into step (48);
(48) judge whether to have printed all performance analysis datas, if not printed all performance evaluation numbers According into step (43), if having printed all performance analysis datas, terminating this operation.
Further, lowest priority is 255 in step (21).
Further, performance evaluation message contains current CPU ID, Thread Id, process ID, PC value words in step (21) Section.
Further, the counting in step (35) refers to the reference number of identical PC values.
Further, the result of the performance evaluation chained list of step (4) include thread name, Thread Id, process ID, CPU ID, Symbolic address, PC values, count value, function name, and refresh simultaneously identify systematic function accounting height in different colors in real time, make system It is clear to count result.
Embodiments of the present invention are elaborated above.But the present invention is not limited to above-mentioned embodiment, In art those of ordinary skill's possessed knowledge, it can also be done on the premise of present inventive concept is not departed from Go out various change.

Claims (5)

1. the method for analyzing performance of real time operating system, it is characterised in that comprise the following steps:
(1) initialize
(11) start-up parameter that is passed to of parsing user, judges whether the start-up parameter that user is passed to is legal, if opening of being passed to of user Dynamic parameter is illegal, then the start-up parameter being passed to using default parameters substitution user, subsequently into step (12);If user is passed to Start-up parameter it is legal, then be directly entered step (12);
(12) judge whether state machine is normal, if state machine is abnormal, terminate this operation, if state machine is normal, according to startup Parameter creates object, then updates state machine, terminates initial work;
(2) during system tick interrupt each time, the current task on each core is controlled by event acquisition call back function Block is sampled, wherein:
Current task control block sampling on each core is comprised the following steps:
(21) task control block when pronucleus is obtained, if when the task control block of pronucleus is not belonging to perfs and priority is non-most Low priority, then the task control block is encapsulated as performance evaluation message, the performance evaluation message is then sent to performance point Queue is analysed, into step (22);Conversely, it is directly entered step (22);
(22) judge whether current platform is symmetric multiprocessor pattern, if current platform is not symmetric multiprocessor pattern, knot Shu Benci is operated;If current platform is symmetric multiprocessor pattern, into step (23);
(23) judge whether that all cores have all carried out information gathering, if all cores have all carried out information gathering, terminate this operation, If not all cores have all carried out information gathering, then information gathering is carried out using the next core of internuclear interrupt notification;
(3) analytic statistics is carried out to the performance evaluation message of the task control block of all cores
(31) performance evaluation message is obtained from performance evaluation queue, into step (32);
(32) according to performance evaluation message constructing performance analysis data node, into step (33);
(33) judge whether current performance analysis data node is new performance analysis data node, if current performance evaluation Back end is not new performance analysis data node, then into step (35);If current performance analysis data node is new Performance analysis data node, then into step (34);
(34) judge whether the performance evaluation chained list of current performance analysis data is full, if performance evaluation chained list is full, deletes Except chained list tail node, into step (35), if performance evaluation chained list is less than being directly entered step (35);
(35) performance evaluation chained list is rearranged from big to small according to counting;
(4) with the result of character graphics interface display performance evaluation chained list, comprise the following steps:
(41) performance evaluation chained list is obtained, into step (42);
(42) the reference summation T of performance evaluation chained list is obtained, into step (43);
(43) a performance analysis data is obtained, into step (44);
(44) if the reference count accounting of current performance analyze data quotes summation and is more than 30%, display font is red, instead It, into step (45);
(45) if the reference count accounting of current performance analyze data quotes summation and is more than 20%, display font is yellow, instead It, into step (46);
(46) if the reference count accounting of current performance analyze data quotes summation and is more than 10%, display font is green, instead It, into step (47);
(47) current performance analyze data is printed, into step (48);
(48) judge whether to have printed all performance analysis datas, if not printed all performance analysis datas, enter Enter step (43), if having printed all performance analysis datas, terminate this operation.
2. the method for analyzing performance of real time operating system according to claim 1, it is characterised in that minimum in step (21) Priority is 255.
3. the method for analyzing performance of real time operating system according to claim 1, it is characterised in that performance in step (21) Analysis message contains current CPU ID, Thread Id, process ID, PC value fields.
4. the method for analyzing performance of real time operating system according to claim 1, it is characterised in that the meter in step (35) Number refers to the reference number of identical PC values.
5. the method for analyzing performance of real time operating system according to claim 1, it is characterised in that the performance of step (4) Analyzing the result of chained list includes thread name, Thread Id, process ID, CPU ID, symbolic address, PC values, count value, function name, and Refresh in real time and simultaneously identify systematic function accounting height in different colors.
CN201710751263.XA 2017-08-28 2017-08-28 Performance analysis method of real-time operating system Active CN107480038B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710751263.XA CN107480038B (en) 2017-08-28 2017-08-28 Performance analysis method of real-time operating system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710751263.XA CN107480038B (en) 2017-08-28 2017-08-28 Performance analysis method of real-time operating system

Publications (2)

Publication Number Publication Date
CN107480038A true CN107480038A (en) 2017-12-15
CN107480038B CN107480038B (en) 2020-07-28

Family

ID=60602918

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710751263.XA Active CN107480038B (en) 2017-08-28 2017-08-28 Performance analysis method of real-time operating system

Country Status (1)

Country Link
CN (1) CN107480038B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111045906A (en) * 2019-11-21 2020-04-21 中国航空工业集团公司西安航空计算技术研究所 Unified architecture GPU performance sampling and storing method based on finite-state machine

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070043531A1 (en) * 2004-06-30 2007-02-22 Sun Microsystems, Inc. Method and apparatus for precisely identifying effective addresses associated with hardware events
CN102063330A (en) * 2011-01-05 2011-05-18 北京航空航天大学 Performance data acquisition method for large-scale parallel program
CN103207821A (en) * 2013-05-03 2013-07-17 北京百度网讯科技有限公司 CPU (Central Processing Unit) performance evaluation method and device
CN105204952A (en) * 2015-08-21 2015-12-30 北京控制工程研究所 Fault tolerance management method of multi-core operation system
US20170153958A1 (en) * 2015-11-30 2017-06-01 Oracle International Corporation Detecting degraded core performance in multicore processors
CN106855840A (en) * 2015-12-09 2017-06-16 北京神州泰岳软件股份有限公司 A kind of system CPU analysis method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070043531A1 (en) * 2004-06-30 2007-02-22 Sun Microsystems, Inc. Method and apparatus for precisely identifying effective addresses associated with hardware events
CN102063330A (en) * 2011-01-05 2011-05-18 北京航空航天大学 Performance data acquisition method for large-scale parallel program
CN103207821A (en) * 2013-05-03 2013-07-17 北京百度网讯科技有限公司 CPU (Central Processing Unit) performance evaluation method and device
CN105204952A (en) * 2015-08-21 2015-12-30 北京控制工程研究所 Fault tolerance management method of multi-core operation system
US20170153958A1 (en) * 2015-11-30 2017-06-01 Oracle International Corporation Detecting degraded core performance in multicore processors
CN106855840A (en) * 2015-12-09 2017-06-16 北京神州泰岳软件股份有限公司 A kind of system CPU analysis method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
ITEYE_4524: "系统性能瓶颈定位浅谈", 《HTTPS://BLOG.CSDN.NET/ITEYE_4524/ARTICLE/DETAILS/82371001》 *
NICO DE WITTE等: "Comparing Dual-Core SMP/AMP Performance on a", 《ANNUAL JOURNAL OF ELECTRONICS》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111045906A (en) * 2019-11-21 2020-04-21 中国航空工业集团公司西安航空计算技术研究所 Unified architecture GPU performance sampling and storing method based on finite-state machine

Also Published As

Publication number Publication date
CN107480038B (en) 2020-07-28

Similar Documents

Publication Publication Date Title
US11138058B2 (en) Hierarchical fault determination in an application performance management system
CN102801714B (en) Method for analyzing and reducing SQL (Structured Query Language) command in TNS (Transparent Network Substrate) protocol in by-pass manner
CN107862425B (en) Wind control data acquisition method, device and system and readable storage medium
US20110252407A1 (en) System and method for information extraction from within an active application during execution
US9367432B2 (en) Testing system
CN110535727A (en) Asset identification method and apparatus
CN109271315B (en) Script code detection method, script code detection device, computer equipment and storage medium
CN110096430A (en) Third party's SDK entry test method, apparatus, terminal and storage medium
CN106529283A (en) Software defined network-oriented controller security quantitative analysis method
CN107885675B (en) Multifunctional measuring instrument program control command processing method
CN107480038A (en) The method for analyzing performance of real time operating system
CN113703781B (en) Storage system interface generation method and device, electronic equipment and readable storage medium
CN111404889A (en) Auditing method and device and client
Šljivo et al. Interactive web visualizer for IEEE 802.11 ah ns-3 module
US10061681B2 (en) System for discovering bugs using interval algebra query language
CN115668895A (en) Resource configuration determining method and device of cloud service system
CN116755828A (en) Parameter value configuration method, analysis method, electronic device and storage medium
JP5735998B2 (en) Operation system
CN115576831A (en) Test case recommendation method, device, equipment and storage medium
CN115658478A (en) Test case screening method and device, electronic equipment and storage medium
CN114330363A (en) Industrial control protocol vulnerability mining method based on vulnerability semantic intelligent analysis
CN111143398B (en) Extra-large set query method and device based on extended SQL function
CN108933689A (en) A kind of data collection system and method
CN111414299A (en) SSD extended information obtaining method and device based on hdparm
CN112306850A (en) Test case generation method and device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant