How to measure g++ performance?


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users How to measure g++ performance?
# 1  
Old 06-29-2010
How to measure g++ performance?

I am working on an application with some rather interesting build performance issues. If we build on Solaris/Linux x86/AMD64 the build is rather fast, but it takes more than five times as long on our Solaris Sparc servers (single-threaded builds on the workstations, but multi-threaded on the server!). We are looking to gather some information to find out where the major culprits are (eg precompilation, disk I/O, etc); personally, I suspect template instantiation to be the biggest issue.

How do we break-down the build process to get this kind of information? We use g++/gmake/GNU binutils. As far as I can tell, g++ does not have a convenient `output benchmarking information in xml format' option (the nerve!), so I am assuming we would need to kick-off a set of other applications at the start of the build then analyse their data later. I figure we could probably work out the analysis if only we knew what meters we need to be running (and what options to launch them with, when applicable). Can anyone advise?
# 2  
Old 06-29-2010
Is g++ -p -g .... not an option? Profiling answers a lot of questions.
# 3  
Old 06-30-2010
Unless I am misunderstanding the -p option (never used it, so entirely possible), I do not think it would help. I believe that would insert extra code to help analyse the execution of the application, where we are looking to analyse the compilation of it. I suppose it could be used to recompile g++ for the same net effect, but I doubt I would be familiar enough with g++ to interpret the results.
# 4  
Old 07-03-2010
Just looking through man gcc I see:

Code:
...
       -Q  Makes the compiler print out each function name as it is compiled,
           and print some statistics about each pass when it finishes.

       -ftime-report
           Makes the compiler print some statistics about the time consumed by
           each pass when it finishes.

       -fmem-report
           Makes the compiler print some statistics about permanent memory
           allocation when it finishes.

This User Gave Thanks to Corona688 For This Post:
# 5  
Old 07-04-2010
Ah, they look like they are worth trying out. I skimmed the gcc online manual, but did not notice anything like this. Thanks for the advice!
# 6  
Old 07-06-2010
Well, the manpage is literally the size of a small novel; not easy to skim! Smilie I just searched 'statistic'.
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Solaris

How to measure IOPS?

Hi I have a system running solaris 10, and I intend to use a NetApp as its storage system. The application requires a throughput between the server and the storage 7000 disk IOPS (random IO sustained throughput with response time of 20 mili second and 16k block size). How to make sure that I... (6 Replies)
Discussion started by: fretagi
6 Replies

2. Shell Programming and Scripting

Tcl - how to report out metal layer usage in a design and measure its width and length?

Hi guys, I am very new to tcl here. would like to request some help please let say i have a design .it's a IC design . I would like to know each usage of metal layer of that design and also measure its length and width? how to code in such way? thanks for any guidance/help (3 Replies)
Discussion started by: teddy6507
3 Replies

3. AIX

How to measure waiting time in run queue?

Hello guys, I am doing a performance analysis on one of our psystem. Most of time I am using Nmon analyser to do my trend graph. But I can't find any help with it. We are interesting in the time spend by tasks in Aix run queue. After looking the Aix documentation, I am pessimist to find any... (3 Replies)
Discussion started by: GiiGii
3 Replies

4. Shell Programming and Scripting

Measure thread execution (in C, unix)

Hi, I have a simulation program which creates two threads and I would like to know if I can measure the time of each individual thread. Threads communicate (I use pthread to manage them) and I want to measure communication time. I found a solution with clock_gettime and CLOCK_THREAD_CPUTIME_ID... (32 Replies)
Discussion started by: Tinkh
32 Replies

5. Solaris

What exactly does 'zpool iostat' measure?

hi there, i'd like to know what exactly zpool's iostat (-v) output measure, especially the writes. Is it only the writes to the ZIL or all writes (including commmits) to the disks? if anyone knows, that'd be helpful roti (1 Reply)
Discussion started by: rotunda
1 Replies

6. Shell Programming and Scripting

Is there a command to measure compile speed?

Hello Ive written 2 programs in shell and I need to compare their speed (Compile) against one another. what methods could I go about doing this? Is there a feature in shell do accommodate this? (2 Replies)
Discussion started by: Darklight
2 Replies

7. Solaris

How to tune kernel Parameters in Solaris 10,9 & how to measure performance

Hi, I want to tune my SUN servers for best performance. My servers are heavily loaded and used. They have Solaris 10. How to tune Kernel Parameters of solaris ? And How can I measue performance before changing parameters and after changing parameters ? Please help Thanks NeeleshG (2 Replies)
Discussion started by: neel.gurjar
2 Replies

8. UNIX for Dummies Questions & Answers

CPU load unit of measure?

If unix says my cpu load is 2.15 exactly what does that mean? --Jason (1 Reply)
Discussion started by: Mac J
1 Replies
Login or Register to Ask a Question