On Wed, 28 Apr 2004 at 15:09 +0000, Yaoping Ruan wrote:
> Hi PHil:
> Thanks for your response.
> > I think you use a 2.4 module, the only relevant parameter is --buffer-size and
> > --note-table-size (note table size can overflow if there is a lot of fork/exec/mmap).
> I also tried 2.6 kernel, I guess I also need to increase --buffer-size,
> right? Does every overflow give out a warning message? I noticed that
> sometimes it doesn't but the results indicate overflow actually ever
on 2.6 there is no such message through printk but rather in the file
/var/lib/oprofile/oprofiled.log with a dump of statistics at end of run
or through /dev/oprofile/stats/* for older version (I don't remember when
I added the stats dump in oprofiled.log)
> > yes, to decrease sampling rate you must increase count with
> > $ opcontrol --event=XXX:counts, the ~root/.oprofile/daemonrc file
> > contains your setting which are persistent over different profiling
> > session, perhaps during experimentation you setup count to a very
> > low value and don't re set it ?
> well, I did reset before each measurement and setup counts much larger
> than the default value. e.g. 1000000 for global_power_events, and 10000
> for ITLB_REFERENCE. But since I measure 8 events simultaneously, it is
> unclear to me that if the kernel buffer holds all of the events together
> or not?
Buffer on 2.4/2.6 is per cpu, events are mixed in the same buffer.
> Also another related question is that how frequent the user space daemon
> reads out the kernel buffer? is it interrupt based or time based?
behavior is different on 2.6/2.4
- 2.4: when reaching a given threshold on number of used entry in
buffer we wake up a task to flush samples to daemon, the watermark is
defined as min(buffer_size / 8, 8192)
- 2.6: there is a two level buffer, per cpu buffer are flushed to a
high level buffer by a timer (and also when an exit() call occur iirc).
I don't remember the details on how the high level buffer is flushed
but iirc we never got problem from it. Only recent version of the driver
and user space tool allow to setup the per cpu buffer size through
--cpu-buffer-size (added 2004-01-27), I don't remember which kernel
version you need)
> Sorry for so many questions, but I really couldn't find any clue from the
> manual, internal, or previous discussion. I do admit that my experiments
> are very high demand which may have not been tested before.
You must experiment a bit to find a right setting., remember to look at
$ dmesg and /var/lib/oprofile/oprofiled.log (or /dev/oprofile/stats/*)