Is there a “function size profiler” out there?

后端 未结 5 1080
时光说笑
时光说笑 2021-01-31 21:40

After three years working on a C++ project, the executable has grown to 4 MB. I\'d like to see where all this space is going. Is there a tool that could report what the biggest

5条回答
  •  无人及你
    2021-01-31 22:00

    In Windows under Visual Studio compiles, this information is in your .map file (it'll be near the .pdb).

    ADDED: To convert the decorated names found in the .map file to something more human-readable, you can use the undname.exe utility included with Visual Studio. It accepts individual names on the commandline or you can feed it a .map file.

    For example,

    Microsoft (R) C++ Name Undecorator
    Copyright (C) Microsoft Corporation. All rights reserved.
    
    Undecoration of "?push_back@?$mini_vector@U?$Point@U?$FixedPoint@$0O@H@Math@@@Math@@$05@@QAAXABU?$Point@U?$FixedPoint@$0O@H@Math@@@Math@@@Z" is 
    
    "public: void __cdecl mini_vector >,6>::push_back(struct Math::Point > const &)"
    

提交回复
热议问题