¿Qué herramienta puedo usar para rastrear la eficiencia de cada función en un programa C++?

I am now developing a relatively large C++ program, which is composed of several functions. The C++ program will run these functions sequentially. What I want to know is how much time and how much memory each function would occupy. For the time consumption one solution is use the BOOST::Timer library. For the memory usage, however, I cannot find right library to do the job. I was wondering whether you have some ideas on this question. Moreover, does someone know some tools that can create a program efficiency report similar to MATLAB profile? ¡Gracias!

preguntado el 28 de agosto de 12 a las 14:08

1 Respuestas

You didn't specify your OS or compiler. What you want is generally known as a perfilador. Using timer for profiling is not a good idea. For memory profiling look for "heap-profiler".

If available for your platform, I'd recomend valgrind's macizo heap-profiler and optionally visualizador de macizos.

http://valgrind.org/docs/manual/ms-manual.html

http://gitorious.org/massif-visualizer

Respondido 28 ago 12, 15:08

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.