c++ - Is there a "function size profiler" out there? -


Three years after working on a C ++ project, it has become executable 4 MB. I have to see where all this is going on. Is there any device that can report what is the biggest place? By template (all the elements), and the library will be good to see the size of the class (all the functions of all sections) (how much is C related to the standard library and STL? How much is the XI for each library?)

EDIT: Note, I am using Visual C ++ on Windows.

in Linux , you can show all the symbols in the executable and You can use reverse order to sort by size:

  $ nm -CSr - size-sort & lt; Exe & gt;  

Options:

  • -C moves the C + + names.
  • -S Shows the size of the symbol.
  • Strong> Sortes.

If you want to get the result per name space or per class, you can enter ' namespace :: ', ' namespaces :: class_name :: < / Code> ', etc can only output grep . .

If you want to see only those symbols that are these executable (not defined elsewhere, such as in libraries) then - defined-only .

For Windows , you should still be able to use nm on your binary files, because nm Binary supports you can install nm through Sigwin or you can make your windows executable in the Linux box and run nm on there .

You can also try, which gives information about a binary on Windows, you can get information on the symbol with the / SYMBOLS switch, but it does not look like That it directly provides information about their size.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -