Projects / FunctionCheck

FunctionCheck

FunctionCheck is a profile generator for C/C++ programs. It uses the gcc '-finstrument-functions' feature to track each function entry and exit. It computes local and total times in functions, the number of calls, the average time per call, and function calls. It can also count time spent in sub-functions not compiled with '-finstrument-functions'. The time balance between functions is always respected. It also can trace memory allocations and report on memory leaks, showing the call stack leading up to the allocation of the leaked blocks.

Tags
Licenses

Recent releases

  •  05 Jul 2005 05:12

    Release Notes: The call graph was extended to record the time spent on each individual call arc, not just the total time in each function. Some minor fixes were made for 64-bit compatibility.

    •  04 Dec 2003 00:12

      Release Notes: This release adds changes to fncdump for more stability on Solaris, and fixes realloc trace handling. Some tweaks have been made to the per-thread time accounting.

      •  15 Mar 2003 07:53

        Release Notes: This release is more portable and has been tested on Solaris 2.8. malloc is now intercepted using dlsym instead of glibc's malloc_hooks function, eliminating the dependency on glibc, and making it portable to any SVR4 libdl system. Pthreads are now supported on Solaris as well.

        •  15 Dec 2001 05:45

          Release Notes: Better thread support, changing the tracefile format to add per-caller counters, changes to the call graph format to be more like gprof, and less memory usage when processing a memory tracefile.

          •  11 Dec 2001 08:47

            Release Notes: The memory trace file format is compacted, and memory trace processing has been sped up tremendously through the use of AVL trees instead of unsorted arrays. The library now also supports pthreads mutex locking for thread safety. The memalign() function has been added to the memory tracing facility.

            Recent comments

            21 Jun 2007 02:28 edgedg

            Exceptions
            At least 1.5.4 doesn't seem to handle exceptions well. Functions that exit with exceptions result in having some unrealistic timings.

            20 Jun 2007 09:28 edgedg

            Installation
            There were 2 errors I encountered during installation.

            1) fncmalloc.c:34: error: `RTLD_NEXT' undeclared

            2) /home/edg/FunctionCheck/fnccheck/test/sub.c:14: undefined reference to `sin'

            To fix them, after ./configure is finished I edited config.status changing CFLAGS line to "s%@CFLAGS@%-g -D_GNU_SOURCE -lm -O2%g". -D_GNU_SOURCE is fix for the first error and -lm for the second. Hope this helps any other noob than me.

            19 Apr 2006 17:56 jgabriels

            there are 3 forks of this project
            There are 3 forks of this project

            Version 1.4/2.0 is the original and is no

            longer being actively developed.

            Version 3.0 is a fork that is also dead.

            Version 1.5.4 is the only active one and also

            the only one that supports amd64 processors.

            08 Oct 2005 20:17 highlandsun

            Not for SMP
            By the way, the multithreading support barely works on a single-processor system; it is hopeless on SMP. Unfortunately it has no way of knowing when a thread context switch occurs, so the allocation of time to functions is unreliable. It still works fine for single-threaded programs or single-processor machines, but I don't see any easy solutions for making the profiler accurate on a multi-processor machine. At least it's still usable as a malloc tracer, and it doesn't eat up as much address space as valgrind.

            Screenshot

            Project Spotlight

            OpenStack4j

            A Fluent OpenStack client API for Java.

            Screenshot

            Project Spotlight

            TurnKey TWiki Appliance

            A TWiki appliance that is easy to use and lightweight.