On Fri, Dec 11, 2009 at 9:13 PM, Kristen Walcott <kr...@cs.virginia.edu> wrote: > Hi, > > I'm using the bts_smpl.c code and am trying to get complete taken branch > information for small sample programs that I am running. Most of the time > though, I'm losing nearly all of the branches associated with my small > programs. Is there a way to modify the bts_smpl code to make sure that > those samples are not lost? > I assume this is with 2.6.32.
There is constantly a race between the tool extracting data out of the sampling buffer and the program continuing its execution and thus executing branches. One thing you could try and do would be to ask to be notified BEFORE the buffer fills up, e.g., half way through. This is what the watermark is used for. So make the buffer 2 pages long, and then set the watermark to one page. You need to add something like: fds[0].hw.wakeup_watermark = getpagesize(); fds[0].hw.watermark = 1; And then invoke with: bts_smpl -m 2 Totally untested though. ------------------------------------------------------------------------------ Return on Information: Google Enterprise Search pays you back Get the facts. http://p.sf.net/sfu/google-dev2dev _______________________________________________ perfmon2-devel mailing list perfmon2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perfmon2-devel