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

for 0. %his line lists: inde* 5 uni6ue num#er "iven to each element of the ta#le. %he line 'ith the inde* num#er at the left hand mar"in lists the current function.00 44444444444444444444444444444444444444444444444 0.1/% of 7.07 2/3 0.!1 seconds inde* % time 213 100.00 0.07 0.54 0.1 0. self %his is the total amount of time spent in this function.54 0.0 self children 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%.00 0. % time %his is the percenta"e of the 7total8 time that 'as spent in this function and its children.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.00 7.all "raph -e*planation follo's. "ranularit$: each sample hit covers 4 #$te-s. +nde* num#ers are sorted numericall$.00 0. %he lines a#ove it list the functions that called this function) and the lines #elo' it list the functions this one called.07 7. Each entr$ in this ta#le consists of several lines. .9 0.54 2 3 99.. %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.!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.

called %his is the num#er of times the function 'as called. +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. 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. For the function8s children) the fields have the follo'in" meanin"s: . %he inde* num#er is printed after it.children %his is the total amount of time propa"ated into this function #$ its children. +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. children %his is the amount of time that 'as propa"ated from the function8s children into this parent. %he parent8s inde* num#er is printed after it. name %he name of the current function.8 and the num#er of recursive calls. +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(. +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. 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.

%he 7. and the mem#ers of the c$cle -as children.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 . <ecursive calls #$ the child are not listed in the num#er after the 7/8. in the call "raph) there is an entr$ for the c$cle4as4a4'hole. children %his is the amount of time that 'as propa"ated from the child8s children to the function. +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. 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. %he child8s inde* num#er is printed after it.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. +f there are an$ c$cles -circles. name %his is the name of the child. %his entr$ sho's 'ho called the c$cle -as parents.

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