This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Add support for profile merging hooks


Hello,

> >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?

Zdenek


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]