---------- Forwarded message ----------
From: Ivan Novick <[email protected]>
Date: Wed, May 27, 2009 at 4:52 PM
Subject: Re: [Valgrind-users] False Sharing Detection
To: Nicholas Nethercote <[email protected]>


A report that would be very help full for application developers would be
like this:
LINE OF CODE                        # of INSTANCES OF FALSE SHARING
DETECTED
array[x] = val;  main.c:44           1,234,567
b = y; main.c:124                      134,233
k = l; sum.c:233                        44,123
...... etc

To help app developers quickly find the biggest violators

Regards,
Ivan Novick


On Wed, May 27, 2009 at 4:45 PM, Nicholas Nethercote <[email protected]
> wrote:

> On Thu, May 28, 2009 at 9:12 AM, Ivan Novick <[email protected]> wrote:
> > Hi,
> > I would like to detect cases of false sharing in my program.
> > By this I mean cases where multiple threads are both trying to write data
> to
> > different memory locations but those locations are closest enough in
> memory
> > that they are on the on the same cache line.
> > The result would be delays on threads even though there are enough CPU's
> to
> > do the work.
> > Are there any tools in valgrind to do this?
>
> No, but it wouldn't be too hard to write a new one that did this.  For
> each cache-line-sized chunk of memory, you'd record which thread last
> wrote to it and when, and then if another thread wrote to a chunk
> sufficiently soon after a previous thread you'd give a warning.  You
> could record thread numbers and addresses and stack traces and the
> like, there'd be trade-offs in how much overhead you'd have vs. how
> much info you'd get in each report.
>
> Nick
>
------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT 
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian 
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to