Juan, 2009/5/12 Juan Ángel Lorenzo <jalmailingli...@gmail.com>: > Hi all, > > I've been doing some tests with the "mont_dear.c" example from the > old_interface_ia64_examples directory and I've noticed a strange behaviour > when sampling. I modified the ctx.buf_arg.buf_size variable from the initial > value (getpagesize()) to the minimum value I was allowed (1024) and I tried > the sampling periods 40 and 1. The aim of this was getting the maximum > number of buffer overflow notifications. I considered that a lower sample > period and a smaller buffer size would result in a higher number of overflow > notifications. Everything worked as expected when using a sampling period of > 40 and decreasing the buffer size. That is, the smaller the buffer, the > smaller the number of samples per buffer and the higher the number of > notifications, until I reached a 1024 buffer size, where I got 31 > notifications. > I believe what you are seeing can be explained by the rounding that is done by the kernel. The kernel sampling buffer size must be a multiple of the page size because it gets remapped. Mapping needs page granularity. On IA-64, the default page size is 16KB. If you specify 1024, then it is rounded up to 16KB. That's problably why if you vary the size but remains within the range, you get the same number of notifications.
> However, when using a sampling period of 1, regardless the buffer size, I > always get a maximum number of notifications equals to 31. This value was > double-checked using a global variable and getting the value of > "hdr->hdr_overflows", in the "process_smpl_buffer()" function. > > I understand I'm not getting a real sampling period of 1 so I'll always miss > some samples but, anyway, I don't see why I cannot get a higher number of > notifications than 31. Subsequent tests with other codes, based in this > example code, yiedled always that ceiling of 31 notifications. > > In order not to depend on the buffer I also tried to remove it, so that I > got a notification every time the counter overflowed. As far as I read in > the perfmon2 manual, it is possible to do it. Besides, there is an example > code, "notify_self.c" which explains how to do it with "counting counters". > I couldn't make it work with EARs, though. Is it possible to perform an EAR > sampling without using a buffer? I'm working in a Montvale architecture > (SuSE Enterprise 10 SP1, kernel 2.6.16.53). > It is possible to extract DEAR information without a sampling buffer. In the notification signal handler, you simply have to read the DEAR registers (pmd32,pmd33,pmd36) before you resume monitoring. ------------------------------------------------------------------------------ The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-com _______________________________________________ perfmon2-devel mailing list perfmon2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perfmon2-devel