This is the mail archive of the 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]

Re: New attribute "infrequent"?

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


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