Questions about DHAT

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Questions about DHAT

Zheng Shao
Hi,

Our projects using DHAT for heap profiling,
I'm interesting on how detecting memory count of read and write?
More specifically, there a function called dh_handle_read

static VG_REGPARM(2)
void dh_handle_read ( Addr addr, UWord szB )
{
   Block* bk = find_Block_containing(addr);
   if (bk) {
      bk->n_reads += szB;
      if (bk->histoW)
         inc_histo_for_block(bk, addr, szB);
   }
}

My first question is how and when valgrind will call this function?

Another question is, our program will load many cache data at launch time,
this causes almost top 30 results of DHAT will show these cache data.
So I want add a monitor command for DHAT,
when I call this command, DHAT will begin recode memory usage,
get the summary at program terminal as always valgrind do.

I would like to receive tips and advice to make it happen.

Thank you

--
Zheng SHAO
[hidden email]


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Valgrind-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/valgrind-users
Loading...