Profiling C and C++ Projects

See Also 

You can examine the behavior of your running project with the CPU Usage, Memory Usage, and Thread Usage tools. The profiling tools run automatically whenever you run your C or C++ project.

The profiling information is provided by either DTrace or Sun Studio data providers, and the underlying operating system. You can change the profiling data provider in the Project Properties dialog's Profile category.

If you are running the project on a Solaris system (either as the local host, or as a remote development host), you can click the indicator graphs to get more detailed information. A new tab is displayed showing information about the usage of CPU, memory leaks, and thread synchronization of the program's individual functions.

If you are running the project on a Linux system as a local host or remote development host, you can get the detailed information only if you have installed Sun Studio tools on the Linux system. You must select Sun Studio as the data provider in your project properties.

If you are running the project on a Windows or Mac OS X system, you cannot get the detailed information because Sun Studio tools are not available for these platforms, and DTrace is fully supported only on Solaris platforms.

Disabling Profile Tools

You can disable the Profile tools in the project's properties so that the profiling does not automatically occur when you run the project. You can also disable one or more specific usage monitors in the project's properties. For example, if you only want the CPU usage monitor to display, you can enable Profile on Run, and deselect the Memory Usage and Thread Usage indicators.

另请参见
  配置生成工具
C/C++ Project Properties Dialog Box: Profile

法律声明