13
General Information & Proc.c General Information & Proc.c Juan Luis Pardo González Juan Luis Pardo González Javier Lara Valtueña Javier Lara Valtueña

General Information & Proc.c General Information & Proc.c Juan Luis Pardo González Javier Lara Valtueña

Embed Size (px)

Citation preview

Page 1: General Information & Proc.c General Information & Proc.c Juan Luis Pardo González Javier Lara Valtueña

General Information & Proc.cGeneral Information & Proc.c

Juan Luis Pardo GonzálezJuan Luis Pardo GonzálezJavier Lara ValtueñaJavier Lara Valtueña

Page 2: General Information & Proc.c General Information & Proc.c Juan Luis Pardo González Javier Lara Valtueña

General Information & Proc.cGeneral Information & Proc.c

-General Information: General Metrics -General Information: General Metrics GraphsGraphs

-Proc.c: Proc.c Metrics Graphs.-Proc.c: Proc.c Metrics Graphs.

Page 3: General Information & Proc.c General Information & Proc.c Juan Luis Pardo González Javier Lara Valtueña

General Information: General Metrics GraphsGeneral Information: General Metrics Graphs

This round graph shows This round graph shows the percentage of Source the percentage of Source Code,Comments,Blank Code,Comments,Blank Lines,Inactive and Lines,Inactive and PreProcessor of the whole PreProcessor of the whole written code.written code.

Half of the code is Source Half of the code is Source Code,fourth part of the Code,fourth part of the code is Comment Code.code is Comment Code.

There is almost one line of There is almost one line of Comment Code per two Comment Code per two lines of Source Code.lines of Source Code.It is a GOOD MARK.It is a GOOD MARK.

Page 4: General Information & Proc.c General Information & Proc.c Juan Luis Pardo González Javier Lara Valtueña

General Information: General Metrics GraphsGeneral Information: General Metrics Graphs

This graph shows the five This graph shows the five most commented most commented functions.functions.

All functions have more All functions have more than one of Comment than one of Comment Ratio.They have more Ratio.They have more comment lines than comment lines than source lines.source lines.

Page 5: General Information & Proc.c General Information & Proc.c Juan Luis Pardo González Javier Lara Valtueña

General Information: General Metrics GraphsGeneral Information: General Metrics Graphs

Sched(): This function determines the scheduling policy. It is called Sched(): This function determines the scheduling policy. It is called whenever a process must be added to one of the scheduling queues whenever a process must be added to one of the scheduling queues to decide where to insert it. As a side-effect the process' priority may to decide where to insert it. As a side-effect the process' priority may be updated.be updated.

do_revive(): Revive a process that was waiting for something.do_revive(): Revive a process that was waiting for something.

Clock_handler: Clock_handler: This executes on each clock tick (i.e., every time the This executes on each clock tick (i.e., every time the timer chip generates an interrupt). It does a little bit of work so the clock timer chip generates an interrupt). It does a little bit of work so the clock task does not have to be called on every tick. task does not have to be called on every tick.

Page 6: General Information & Proc.c General Information & Proc.c Juan Luis Pardo González Javier Lara Valtueña

General Information: General Metrics GraphsGeneral Information: General Metrics Graphs

This graph shows the five This graph shows the five Largest functions.Largest functions.

All of them have more All of them have more than 200 lines of code.than 200 lines of code.

Tcp_frag2conn() is by Tcp_frag2conn() is by far the largest far the largest function,with more than function,with more than 700 lines of code, when 700 lines of code, when ip_ioctl() which is the ip_ioctl() which is the second only has second only has roughly 400 lines.roughly 400 lines.

Page 7: General Information & Proc.c General Information & Proc.c Juan Luis Pardo González Javier Lara Valtueña

General Information: General Metrics GraphsGeneral Information: General Metrics Graphs

This graph shows the five This graph shows the five Largest files.Largest files.

All of them have more All of them have more than 1000 lines of code.than 1000 lines of code.

Two groups can be Two groups can be distinguished: The first distinguished: The first three files with more three files with more than 2500 lines of than 2500 lines of code,and the rest with code,and the rest with less than 2000 lines of less than 2000 lines of code.code.

Page 8: General Information & Proc.c General Information & Proc.c Juan Luis Pardo González Javier Lara Valtueña

General Information: General Metrics GraphsGeneral Information: General Metrics Graphs

This graph shows the five This graph shows the five more complex files according more complex files according to average cyclomatic to average cyclomatic complexity.complexity.All of them have an All of them have an average complexity average complexity greater than 21.greater than 21.According to LaquSo According to LaquSo methodology these are high methodology these are high risk parts of the program risk parts of the program because its average because its average cyclomatic complexity is cyclomatic complexity is greater than 21.greater than 21.

Page 9: General Information & Proc.c General Information & Proc.c Juan Luis Pardo González Javier Lara Valtueña

General Information: General Metrics GraphsGeneral Information: General Metrics Graphs

This graph shows the five This graph shows the five more complex functions more complex functions according to cyclomatic according to cyclomatic complexity.complexity.

All of them have a All of them have a complexity greater than complexity greater than 50.50.According to LaquSo According to LaquSo methodology these are the methodology these are the untestable functions of the untestable functions of the program,because they have a program,because they have a cyclomatic complexity greater cyclomatic complexity greater than 50.than 50.It makes them very high risk It makes them very high risk functions.functions.

Page 10: General Information & Proc.c General Information & Proc.c Juan Luis Pardo González Javier Lara Valtueña

Proc.c: Proc.c Metrics Graphs.Proc.c: Proc.c Metrics Graphs.

CountLineBlankCountLineBlank -- Number of blank -- Number of blank lines. lines.

CountLineCodeDeclCountLineCodeDecl -- Number of -- Number of lines containing declarative source lines containing declarative source code. code.

CountLineCodeExeCountLineCodeExe -- Number of -- Number of lines containing executable source lines containing executable source code.code.

CountLineCommentCountLineComment -- Number of -- Number of lines containing comment. lines containing comment.

Note that proc.c like almost all the Note that proc.c like almost all the code has one comment line per code has one comment line per executable or declarative line.executable or declarative line.

Page 11: General Information & Proc.c General Information & Proc.c Juan Luis Pardo González Javier Lara Valtueña

Proc.c: Proc.c Metrics Graphs.Proc.c: Proc.c Metrics Graphs.

MaxNestingMaxNesting -- Maximum nesting level of control constructs (if, while, for, switch, etc.) in the function. -- Maximum nesting level of control constructs (if, while, for, switch, etc.) in the function.

Page 12: General Information & Proc.c General Information & Proc.c Juan Luis Pardo González Javier Lara Valtueña

Proc.c: Proc.c Metrics Graphs.Proc.c: Proc.c Metrics Graphs.

CountPathCountPath -- Number of unique paths though a body of code, not counting -- Number of unique paths though a body of code, not counting abnormal exits or gotos. abnormal exits or gotos.

Page 13: General Information & Proc.c General Information & Proc.c Juan Luis Pardo González Javier Lara Valtueña

Proc.c: Proc.c Metrics Graphs.Proc.c: Proc.c Metrics Graphs.