|
From: Andrew S. <ag...@gm...> - 2007-04-13 18:44:23
|
Hi, I was wondering if valgrind had the kind of functionality that memspy does. For example, can it tell me which of three data structures referenced in a line of code is experiencing the most cache misses and what's pushing it out of cache? MemSpy "a prototype tool that helps programmers identify and fix memory bottlenecks in both sequential and parallel programs. A key aspect of MemSpy is that it introduces the notion of data oriented, in addition to code oriented, performance tuning. Thus, for both source level code objects and data objects, MemSpy provides information such as cache miss rates, causes of cache misses, and in multiprocessors, information on cache invalidations and local versus remote memory misses. MemSpy also introduces a concise matrix presentation to allow programmers to view both code and data oriented statistics at the same time." http://www.cs.washington.edu/homes/tom/pubs/memspy.html http://www.cs.washington.edu/homes/tom/pubs/trace-samp.html http://www.cs.washington.edu/homes/tom/pubs/memspy95.html Thanks, Andrew Shewmaker |
|
From: Josef W. <Jos...@gm...> - 2007-04-13 21:35:48
|
On Friday 13 April 2007, Andrew Shewmaker wrote: > Hi, > > I was wondering if valgrind had the kind of functionality that memspy > does. For example, can it tell me which of three data structures > referenced in a line of code is experiencing the most cache misses > and what's pushing it out of cache? AFAIK no. It should be possible, and I once started something like this, but did not finish. However, it already showed some aggregate counters (as part of debug output) attributed to global data symbols... Perhaps a simpler way would be to attribute misses to source code columns when debug info has this information... Josef > > MemSpy > > "a prototype tool that helps programmers identify and fix memory > bottlenecks in both sequential and parallel programs. A key aspect of > MemSpy is that it introduces the notion of data oriented, in addition > to code oriented, performance tuning. Thus, for both source level code > objects and data objects, MemSpy provides information such as cache > miss rates, causes of cache misses, and in multiprocessors, > information on cache invalidations and local versus remote memory > misses. MemSpy also introduces a concise matrix presentation to allow > programmers to view both code and data oriented statistics at the same > time." > > http://www.cs.washington.edu/homes/tom/pubs/memspy.html > http://www.cs.washington.edu/homes/tom/pubs/trace-samp.html > http://www.cs.washington.edu/homes/tom/pubs/memspy95.html > > > Thanks, > > Andrew Shewmaker > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Valgrind-developers mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-developers > |
|
From: Vikas <cat...@gm...> - 2007-04-13 21:47:41
|
Yes , ASAIK also its no . those multiprocessor related details things are done in simulators like SIMICS which i worked on ... On 4/13/07, Josef Weidendorfer <Jos...@gm...> wrote: > > On Friday 13 April 2007, Andrew Shewmaker wrote: > > Hi, > > > > I was wondering if valgrind had the kind of functionality that memspy > > does. For example, can it tell me which of three data structures > > referenced in a line of code is experiencing the most cache misses > > and what's pushing it out of cache? > > AFAIK no. > It should be possible, and I once started something like this, but did > not finish. However, it already showed some aggregate counters (as part > of debug output) attributed to global data symbols... > > Perhaps a simpler way would be to attribute misses to source code columns > when debug info has this information... > > Josef > > > > > MemSpy > > > > "a prototype tool that helps programmers identify and fix memory > > bottlenecks in both sequential and parallel programs. A key aspect of > > MemSpy is that it introduces the notion of data oriented, in addition > > to code oriented, performance tuning. Thus, for both source level code > > objects and data objects, MemSpy provides information such as cache > > miss rates, causes of cache misses, and in multiprocessors, > > information on cache invalidations and local versus remote memory > > misses. MemSpy also introduces a concise matrix presentation to allow > > programmers to view both code and data oriented statistics at the same > > time." > > > > http://www.cs.washington.edu/homes/tom/pubs/memspy.html > > http://www.cs.washington.edu/homes/tom/pubs/trace-samp.html > > http://www.cs.washington.edu/homes/tom/pubs/memspy95.html > > > > > > Thanks, > > > > Andrew Shewmaker > > > > > ------------------------------------------------------------------------- > > Take Surveys. Earn Cash. Influence the Future of IT > > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > > opinions on IT & business topics through brief surveys-and earn cash > > > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > _______________________________________________ > > Valgrind-developers mailing list > > Val...@li... > > https://lists.sourceforge.net/lists/listinfo/valgrind-developers > > > > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Valgrind-developers mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-developers > |
|
From: Nicholas N. <nj...@cs...> - 2007-04-13 22:39:14
|
On Fri, 13 Apr 2007, Josef Weidendorfer wrote: >> I was wondering if valgrind had the kind of functionality that memspy >> does. For example, can it tell me which of three data structures >> referenced in a line of code is experiencing the most cache misses >> and what's pushing it out of cache? > > AFAIK no. > It should be possible, and I once started something like this, but did > not finish. However, it already showed some aggregate counters (as part > of debug output) attributed to global data symbols... I have the startings of something like this as well :) It uses client requests in the source code to specify which bits of memory should be considered a single entity. But it's not very advanced. Nick |
|
From: Bart V. A. <bar...@gm...> - 2007-04-14 07:48:35
|
On 4/13/07, Andrew Shewmaker <ag...@gm...> wrote: > > Hi, > > I was wondering if valgrind had the kind of functionality that memspy > does. For example, can it tell me which of three data structures > referenced in a line of code is experiencing the most cache misses > and what's pushing it out of cache? > This presentation by Joe Gross is a good overview of MemSpy: http://www.cs.umd.edu/class/fall2005/cmsc714/Lectures/gross-memspy.pdf Bart. |
|
From: Andrew S. <ag...@gm...> - 2007-04-16 23:31:21
|
On 4/13/07, Nicholas Nethercote <nj...@cs...> wrote: > On Fri, 13 Apr 2007, Josef Weidendorfer wrote: > > >> I was wondering if valgrind had the kind of functionality that memspy > >> does. For example, can it tell me which of three data structures > >> referenced in a line of code is experiencing the most cache misses > >> and what's pushing it out of cache? > > > > AFAIK no. > > It should be possible, and I once started something like this, but did > > not finish. However, it already showed some aggregate counters (as part > > of debug output) attributed to global data symbols... > > I have the startings of something like this as well :) It uses client > requests in the source code to specify which bits of memory should be > considered a single entity. But it's not very advanced. Would it be interesting for you to see the memspy source code? I've emailed the authors and they say they are no longer distributing the code since it is so old, but maybe I could ask them if they would share it with you so that you can reimpliment the functionality in Valgrind. -- Andrew Shewmaker |
|
From: Josef W. <Jos...@gm...> - 2007-04-17 13:51:03
|
On Tuesday 17 April 2007, Andrew Shewmaker wrote: > On 4/13/07, Nicholas Nethercote <nj...@cs...> wrote: > > On Fri, 13 Apr 2007, Josef Weidendorfer wrote: > > > > >> I was wondering if valgrind had the kind of functionality that memspy > > >> does. For example, can it tell me which of three data structures > > >> referenced in a line of code is experiencing the most cache misses > > >> and what's pushing it out of cache? > > > > > > AFAIK no. > > > It should be possible, and I once started something like this, but did > > > not finish. However, it already showed some aggregate counters (as part > > > of debug output) attributed to global data symbols... > > > > I have the startings of something like this as well :) It uses client > > requests in the source code to specify which bits of memory should be > > considered a single entity. But it's not very advanced. > > Would it be interesting for you to see the memspy source code? What IMHO currently is missing is a good DWARF debug reader for data structures to be used by Valgrind tools (?). However, it needs a very fast way to look up data structures for an address. I doubt that Memspy code can help here. Functionality is described well in papers, no? > I've emailed the authors and they say they are no longer distributing > the code since it is so old, However, that is sad. Josef > but maybe I could ask them if they would > share it with you so that you can reimpliment the functionality in > Valgrind. > |
|
From: Tom H. <to...@co...> - 2007-04-17 14:29:25
|
In message <200...@gm...>
Josef Weidendorfer <Jos...@gm...> wrote:
> What IMHO currently is missing is a good DWARF debug reader for
> data structures to be used by Valgrind tools (?). However, it needs a very
> fast way to look up data structures for an address.
Well libdwarf is probably the most full featured more or less
standalone DWARF reader that exists:
http://reality.sgiweb.org/davea/dwarf.html
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|
|
From: Josef W. <Jos...@gm...> - 2007-04-17 17:22:57
|
On Tuesday 17 April 2007, Tom Hughes wrote: > In message <200...@gm...> > Josef Weidendorfer <Jos...@gm...> wrote: > > > What IMHO currently is missing is a good DWARF debug reader for > > data structures to be used by Valgrind tools (?). However, it needs a very > > fast way to look up data structures for an address. > > Well libdwarf is probably the most full featured more or less > standalone DWARF reader that exists: > > http://reality.sgiweb.org/davea/dwarf.html But can we include this without much porting into Valgrind core? Surely, using it for postprocessing sometimes is an option (e.g. use data label in the tool "write to stack frame offset 12 in function X", and convert it to an write of a local variable Y afterwards). Josef > Tom > |
>>>>> "JW" == Josef Weidendorfer <Jos...@gm...> writes: JW> What IMHO currently is missing is a good DWARF debug reader for JW> data structures to be used by Valgrind tools (?). However, it JW> needs a very fast way to look up data structures for an address. TH> Well libdwarf is probably the most full featured more or less TH> standalone DWARF reader that exists: TH> http://reality.sgiweb.org/davea/dwarf.html JW> But can we include this without much porting into Valgrind core? I don't think the technical issues would be very difficult. Because we didn't know about libdwarf soon enough, Philip Guo and I did a similar integration of the DWARF-reading code from the binutils "readelf" utility. The only annoying part of that was some C library dependencies that didn't exist in the Valgrind core, but I suspect there would be fewer of those in libdwarf since it was designed as a library. I'd also be happy to contribute any of our libc emulation stubs if it would be helpful. We've packaged up our combination of versions of Valgrind, Memcheck, and readelf as a framework named "Fjalar": http://pag.csail.mit.edu/fjalar/ It's not as well modularized as a putting libdwarf in the core, but it's pretty convenient for writing simple tools. (One caveat: the latest release listed there still wants to link with glibc, which causes crashes on TLS configurations. The latest version of the code that includes its own libc stubs is currently only in the Daikon distribution.) JW> Surely, using it for postprocessing sometimes is an option JW> (e.g. use data label in the tool "write to stack frame offset 12 JW> in function X", and convert it to an write of a local variable Y JW> afterwards). Indeed. For many tools (Memcheck is an example), you can think of their need for debugging information as just part of formatting the output for human consumption, and doing that post-processing in a separate program is an easy way to get around difficulties in linking code in the Valgrind core. But for other tools you really want to have the debugging information's knowledge about data structures in the heart of the analysis. There's some additional discussion of these issues in the first couple of chapters of Philip's Masters thesis: http://pag.csail.mit.edu/pubs/guo-mixedlevel-mengthesis-abstract.html -- Stephen |