[PATCH] Add support for profile merging hooks

Zdenek Dvorak rakdver@atrey.karlin.mff.cuni.cz
Wed Apr 23 17:25:00 GMT 2003


> >some of the rtlopt profiling features require other info in addition
> >to counters be stored in .da file. Merging this extra information by
> >summing it clearly is not the right thing to do, so we added a support
> >for section specific merging functions.
> >
> >	* gcov-io.h (merger_function, profile_merger_for_tag): Declare.
> >	* gcov-io.c (profile_merger_for_tag): New.
> >	* libgcov.c (gcov_exit): Use it.
> I'm not happy with linking in functions that won't necessarily be used
> by libgcov.

What you mean by "not used by libgcov"?

> Add function pointers to gcov_ctr_info, and get build_gcov_info to
> emit the correct value for each counter type there. Then
> get libgcov to call it from the counter info. I guess a NULL there
> can obtain the current behaviour.
> the bodies of the merger functions should be in libgcov.c, but protected
> by L_merge_foo macros, like libgcc2.c is. You'll have to adjust libgcov's
> build.

sounds pretty complicated; why?


More information about the Gcc-patches mailing list