Tool for C-program performance analysis needed 
Author Message
 Tool for C-program performance analysis needed

I'd like to have a tool that shows how much time was spent in each
function when the program was run.

There is some tool like this, I know. I just can't remember the
name. Actually I believe that there are several tools like this. Can
anyone recommend something? Was there some GNU tool for this purpose?

reg,
Juha

--
+  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +
Juha Mynttinen
J?mer?ntaival 11 G 158        
02150 Espoo                
040 - 531 6872              



Mon, 31 Mar 2003 03:00:00 GMT  
 Tool for C-program performance analysis needed

Quote:

> I'd like to have a tool that shows how much time was spent in each
> function when the program was run.

clock_t start,duration;

start=clock();
/* stuff */
duration=clock()-start;

Quote:
> There is some tool like this, I know. I just can't remember the
> name. Actually I believe that there are several tools like this. Can
> anyone recommend something? Was there some GNU tool for this purpose?

You are probably after a "profiler".

Bill, took 36 seconds.



Mon, 31 Mar 2003 03:00:00 GMT  
 Tool for C-program performance analysis needed

Quote:
>I'd like to have a tool that shows how much time was spent in each
>function when the program was run.

use "quantify" tool.


Mon, 31 Mar 2003 03:00:00 GMT  
 Tool for C-program performance analysis needed

Quote:

>I'd like to have a tool that shows how much time was spent in each
>function when the program was run.

>There is some tool like this, I know. I just can't remember the
>name. Actually I believe that there are several tools like this. Can
>anyone recommend something? Was there some GNU tool for this purpose?

If you have access to a VMS system with "DECSET" installed you can use
PCA.  It's very good for this sort of thing and can analyze your program
several different ways, under different run conditions, and so forth.  
Here's part of the HELP file:

     The DIGITAL Performance and Coverage Analyzer (PCA) is a software
     development tool that helps you analyze the run-time behavior
     of application programs. The DIGITAL Performance and Coverage
     Analyzer can pinpoint execution bottlenecks and other performance
     problems in user programs. Using this information, you can modify
     your programs to run faster. This tool also measures which parts
     of your program are or are not executed by a given set of test
     data so that you can devise tests that exercise all parts of your
     program.

A couple of weeks ago PCA helped me find a performance problem having to do
with arrays vs. cache sizes.

The code (fortran) was:

  do i=1,N
    a(i)=0
    b(i)=0
  end do

The size of the arrays a and b had been increased and as a consequence they
no longer both fit into cache at the same time. This caused a huge
performance hit which PCA localized to this section of code.  Reordering
the code to:

  do i=1,N
    a(i)=0
  end do
  do i=1,N
    b(i)=0
  end do

fixed it.

Regards,

David Mathog

Manager, sequence analysis facility, biology division, Caltech



Tue, 01 Apr 2003 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. c performance analysis tools

2. VisionSoft development tools - performance analysis, optimization, runtime error checking, coverage

3. Code Analysis Tool Needed

4. Source Code Analysis or DOT Net Performance from CLR

5. Source code analysis or DOT NET Performance from CLR

6. Help on software tesing and performance analysis book

7. Performance Analysis using prof

8. Profiling and Performance Analysis

9. Static analysis tools

10. (slightly OT): Static Code Analysis Tool (C++)

11. C-code analysis tools wanted

12. Alias Analysis Tools

 

 
Powered by phpBB® Forum Software