Re: Microarchitectural support for counting

Liste des GroupesRevenir à c arch 
Sujet : Re: Microarchitectural support for counting
De : jseigh_es00 (at) *nospam* xemaps.com (jseigh)
Groupes : comp.arch
Date : 28. Dec 2024, 13:20:17
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vkoqe1$aepr$1@dont-email.me>
References : 1 2
User-Agent : Mozilla Thunderbird
On 12/27/24 11:16, jseigh wrote:
On 10/3/24 10:00, Anton Ertl wrote:
Two weeks ago Rene Mueller presented the paper "The Cost of Profiling
in the HotSpot Virtual Machine" at MPLR 2024.  He reported that for
some programs the counters used for profiling the program result in
cache contention due to true or false sharing among threads.
>
The traditional software mitigation for that problem is to split the
counters into per-thread or per-core instances.  But for heavily
multi-threaded programs running on machines with many cores the cost
of this mitigation is substantial.
>
 For profiling, do we really need accurate counters?  They just need to
be statistically accurate I would think.
 Instead of incrementing a counter, just store a non-zero immediate into
a zero initialized byte array at a per "counter" index.   There's no
rmw data dependency, just a store so should have little impact on
pipeline.
 A profiling thread loops thru the byte array, incrementing an actual
counter when it sees no zero byte, and resets the byte to zero.  You
could use vector ops to process the array.
 If the stores were fast enough, you could do 2 or more stores at
hashed indices, different hash for each store. Sort of a counting
Bloom filter.  The effective count would be the minimum of the
hashed counts.
 No idea how feasible this would be though.
 
Probably not feasible.  The polling frequency wouldn't be high enough.
If the problem is the number of counters, then counting Bloom filters
might be worth looking into, assuming the overhead of incrementing
the counts isn't a problem.
Joe Seigh

Date Sujet#  Auteur
3 Oct 24 * Microarchitectural support for counting33Anton Ertl
3 Oct 24 +* Re: Microarchitectural support for counting28Brett
5 Oct 24 i`* Re: Microarchitectural support for counting27MitchAlsup1
5 Oct 24 i +- Re: Microarchitectural support for counting1Brett
5 Oct 24 i +* Interrupts in OoO (was: Microarchitectural support for counting)7Anton Ertl
7 Oct 24 i i+* Re: Interrupts in OoO (was: Microarchitectural support for counting)4Brett
7 Oct 24 i ii+* Re: Interrupts in OoO2MitchAlsup1
8 Oct 24 i iii`- Re: Interrupts in OoO1MitchAlsup1
8 Oct 24 i ii`- Re: Interrupts in OoO1Terje Mathisen
7 Oct 24 i i+- Re: Interrupts in OoO1MitchAlsup1
13 Oct 24 i i`- Re: Interrupts in OoO1Anton Ertl
5 Oct 24 i +* Re: Microarchitectural support for counting2MitchAlsup1
25 Dec 24 i i`- Re: Microarchitectural support for counting1MitchAlsup1
25 Dec 24 i +* Re: Microarchitectural support for counting8Paul A. Clayton
25 Dec 24 i i`* Re: Microarchitectural support for counting7MitchAlsup1
25 Dec 24 i i +- Re: Microarchitectural support for counting1MitchAlsup1
31 Dec 24 i i `* Re: Microarchitectural support for counting5Paul A. Clayton
1 Jan 25 i i  `* Re: Microarchitectural support for counting4MitchAlsup1
2 Jan 25 i i   +- Re: Microarchitectural support for counting1MitchAlsup1
6 Jan 25 i i   `* Re: Microarchitectural support for counting2Paul A. Clayton
7 Jan 25 i i    `- Re: Microarchitectural support for counting1Terje Mathisen
25 Dec 24 i `* Re: Microarchitectural support for counting8MitchAlsup1
26 Dec 24 i  +* Dealing with mispredictions (was: Microarchitectural support ...)2Anton Ertl
26 Dec 24 i  i`- Re: Dealing with mispredictions1MitchAlsup1
26 Dec 24 i  `* Re: Microarchitectural support for counting5Michael S
26 Dec 24 i   `* Re: branch guessing, Microarchitectural support for counting4John Levine
26 Dec 24 i    +- Re: branch guessing, Microarchitectural support for counting1Michael S
26 Dec 24 i    +- Re: branch guessing, Microarchitectural support for counting1MitchAlsup1
26 Dec 24 i    `- Re: branch guessing, Microarchitectural support for counting1Thomas Koenig
26 Dec 24 +* Re: Microarchitectural support for counting2Chris M. Thomasson
26 Dec 24 i`- Re: Microarchitectural support for counting1Anton Ertl
27 Dec 24 `* Re: Microarchitectural support for counting2jseigh
28 Dec 24  `- Re: Microarchitectural support for counting1jseigh

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal