You are on page 1of 5

# REPORTE DE GPROF Alumno: Ivan de Jesús Martinez Juache MATERIA: !PER"OMP!

TO

Flat profile: Each sample counts as 0.01 seconds. % cumulative self time seconds seconds 99.08 0.9 % time 7.54 7.!1 7.54 0.07 self 1000 1000 total 7.54 funcion 0.07 funcion1 calls ms/call ms/call name 7.54 0.07

the percenta"e of the total runnin" time of the pro"ram used #\$ this function.

cumulative a runnin" sum of the num#er of seconds accounted seconds for #\$ this function and those listed a#ove it. self the num#er of seconds accounted for #\$ this function alone. %his is the ma&or sort for this listin". calls the num#er of times this function 'as invo(ed) if this function is profiled) else #lan(. self ms/call the avera"e num#er of milliseconds spent in this function per call) if this function is profiled) else #lan(. total ms/call the avera"e num#er of milliseconds spent in this function and its descendents per call) if this function is profiled) else #lan(. name the name of the function. %his is the minor sort for this listin". %he inde* sho's the location of the function in the "prof listin". +f the inde* is in parenthesis it sho's 'here it 'ould appear in the "prof listin" if it 'ere to #e printed.

seconds

+nde* num#ers are sorted numericall\$.1 0.0 self children 0.1/% of 7. for 0.07 7.00 0.00 44444444444444444444444444444444444444444444444 0. %he line 'ith the inde* num#er at the left hand mar"in lists the current function. %he lines a#ove it list the functions that called this function) and the lines #elo' it list the functions this one called. .00 0.00 44444444444444444444444444444444444444444444444 7. 9ote that due to different vie'points) functions e*cluded #\$ options) etc) these num#ers 'ill 9:% add up to 100%.54 2 3 99.07 0.9 0. self %his is the total amount of time spent in this function..54 0.!1 seconds inde* % time 213 100. Each entr\$ in this ta#le consists of several lines. %he inde* num#er is printed ne*t to ever\$ function name so it is easier to loo( up 'here the function in the ta#le.54 0.00 1000/1000 1000 44444444444444444444444444444444444444444444444 %his ta#le descri#es the call tree of the pro"ram) and 'as sorted #\$ the total amount of time spent in each function and its children. "ranularit\$: each sample hit covers 4 #\$te-s.00 7.all "raph -e*planation follo's. %his line lists: inde* 5 uni6ue num#er "iven to each element of the ta#le. % time %his is the percenta"e of the 7total8 time that 'as spent in this function and its children.07 2/3 0.!1 1000/1000 1000/1000 1000/1000 1000 called name 0spontaneous1 main 213 funcion 2 3 funcion1 2/3 main 213 funcion 2 3 main 213 funcion1 2/3 7.00 0.

+f the parent is a mem#er of a c\$cle) the c\$cle num#er is printed #et'een the name and the inde* num#er. +f the function is a mem#er of a c\$cle) the c\$cle num#er is printed #et'een the function8s name and the inde* num#er. For the function8s parents) the fields have the follo'in" meanin"s: self %his is the amount of time that 'as propa"ated directl\$ from the function into this parent. name %his is the name of the parent. For the function8s children) the fields have the follo'in" meanin"s: . name %he name of the current function. +f the function called itself recursivel\$) the num#er onl\$ includes non4recursive calls) and is follo'ed #\$ a 7. <ecursive calls to the function are not included in the num#er after the 7/8. %he parent8s inde* num#er is printed after it. %he inde* num#er is printed after it. +f the parents of the function cannot #e determined) the 'ord 70spontaneous18 is printed in the 7name8 field) and all the other fields are #lan(.children %his is the total amount of time propa"ated into this function #\$ its children.8 and the num#er of recursive calls. called %his is the num#er of times the function 'as called. children %his is the amount of time that 'as propa"ated from the function8s children into this parent. called %his is the num#er of times this parent called the function 7/8 the total num#er of times the function 'as called.

<ecursive calls #\$ the child are not listed in the num#er after the 7/8. name %his is the name of the child. +f there are an\$ c\$cles -circles. called %his is the num#er of times the function called this child 7/8 the total num#er of times the child 'as called.8 recursive calls entr\$ sho's the num#er of function calls that 'ere internal to the c\$cle) and the calls entr\$ for each mem#er sho's) for that mem#er) ho' man\$ times it 'as called from other mem#ers of the c\$cle.. %his entr\$ sho's 'ho called the c\$cle -as parents. %he child8s inde* num#er is printed after it. in the call "raph) there is an entr\$ for the c\$cle4as4a4'hole. %he 7. +f the child is a mem#er of a c\$cle) the c\$cle num#er is printed #et'een the name and the inde* num#er.self %his is the amount of time that 'as propa"ated directl\$ from the child into the function. +nde* #\$ function name 2/3 funcion1 2 3 funcion . children %his is the amount of time that 'as propa"ated from the child8s children to the function. and the mem#ers of the c\$cle -as children.

>as funciones 6ue "astan tiempo 0. se ha estado e&ecutando la funcion main-.0 -o desprecia#le) como el main-. >ue"o aparece funcion -.. \$ otras 1000 veces a funcion -.41% del tiempo de e&ecuci@n de nuestro pro"rama)funcion1-. etc) etc. s@lo tarda !0 microse"undos.Descri#cion: 9os aparece una ta#la con las funciones de nuestro pro"rama ordenadas de m=s consumidora de tiempo a menos. En la se"unda ta#la 6ue sale) tenemos adem=s una especie de =r#ol de llamadas. En funci@n de eso) de#emos tratar de llamarla menos veces o #ien hacer 6ue tarde menos.15 se"undos. Ce#emos ir en primer lu"ar a la primer funci@n 6ue aparece en la primera ta#la. .. %odo esto nos facilita el sa#er e*actamente 6ue funci@n de#emos depurar. %am#iBn est=n los tiempos empleados en estas llamadas. tarda 10090 microse"undos por llamada) funcion1-. ?er si se la ha llamado muchas veces o si "asta mucho tiempo en cada llamada.4% del tiempo \$ 6ue ha sido llamada por main-. Aa ha#ido 1000 llamadas a cada funci@n \$ mientras 6ue funcion -.59% \$ main-. ha "astado el 99. 1000 veces.) 6ue ni si"uiera aparece) un 0% -por eso no aparece. ?emos 6ue lafuncion -.) en la 6ue se ha estado el 99.) no aparecen por defecto. en nuestro caso. Esta funci@n ha llamado 1000 veces a funcion1-. el 0. +ndica 6ue el 100% del tiempo -10..