This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: New attribute "infrequent"?
- To: Frank Klemm <pfk at fuchs dot offl dot uni-jena dot de>
- Subject: Re: New attribute "infrequent"?
- From: Jan Hubicka <jh at suse dot cz>
- Date: Sat, 1 Sep 2001 18:54:09 +0200
- Cc: Jan Hubicka <jh at suse dot cz>, gcc at gcc dot gnu dot org
- References: <20010827174751.G11402@atrey.karlin.mff.cuni.cz> <20010901173809.D1368@fuchs.offl.uni-jena.de>
> I would not use a simple attribute but an attribute with a number which
> contains the frequency the function is used.
>
> For functions which are used a precise number this is the count of usages
> (for instance 0, 1, 2, 4) or periodically called functions this is the call
> frequency (for instance in calls/minute). So you have an attribute to say:
>
> - normally this function is never used frequency(0) \
> - normally this function is used once frequency(1) | *1
> - normally this function is used twice frequency(2) |
> - function is called 6 times per minute frequency(6) /
> - function is used once per second frequency(60) - *2
> - function is used 1000 times per second frequency(60000) - *3
> - function is used 10^6 times per second frequency(60000000) - *4
> - I don't know anything -
>
> This is also much more usable for profiling.
> I would avoid such fuzzy stuff like infrequent or frequent.
> 20 programmers and 21 opinions about what this means.
Hmm, but I guess the frequency does have similar issue.
Definitly some of my programs spent all the time in one function called
once to compute something. If I mark it by frequency (1), I would not
get the proper effect.
Perhaps it is better to give up this thread, as it is just too contraversal
and I am not quite sure it woths the effort, even when I started it.
Honza