Sie sind auf Seite 1von 5

REPORTE DE GPROF Alumno: Ivan de Jess 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

,all "raph -e*planation follo's.

"ranularit$: each sample hit covers 4 #$te-s. for 0.1/% of 7.!1 seconds inde* % time 213 100.0 self children 0.00 7.!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.54 0.07 7.54 2 3 99.1 0.00 0.00 0.00

44444444444444444444444444444444444444444444444 7.54 0.00

44444444444444444444444444444444444444444444444 0.07 2/3 0.9 0.07 0.00 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. Each entr$ in this ta#le consists of several lines. %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. %his line lists: inde* 5 uni6ue num#er "iven to each element of the ta#le. +nde* num#ers are sorted numericall$. %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. % time %his is the percenta"e of the 7total8 time that 'as spent in this function and its children. 9ote that due to different vie'points) functions e*cluded #$ options) etc) these num#ers 'ill 9:% add up to 100%. self %his is the total amount of time spent in this function.

children

%his is the total amount of time propa"ated into this function #$ its children.

called

%his is the num#er of times the function 'as called. +f the function called itself recursivel$) the num#er onl$ includes non4recursive calls) and is follo'ed #$ a 7;8 and the num#er of recursive calls.

name

%he name of the current function. %he inde* num#er is printed after it. +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. 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 to the function are not included in the num#er after the 7/8. name %his is the name of the parent. %he parent8s inde* num#er is printed after it. +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 parents of the function cannot #e determined) the 'ord 70spontaneous18 is printed in the 7name8 field) and all the other fields are #lan(. For the function8s children) the fields have the follo'in" meanin"s:

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

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

Das könnte Ihnen auch gefallen