CLICK DEVICE STATS

Eddie Kohler kohler at icir.org
Mon Jun 9 16:01:24 EDT 2003


Hi Alessandro,

> Reading "ToDevice" code I have seen that some times there is the line
> 
> #if CLICK_DEVICE_STATS...
> ...
> #endif
> 
> How is it possible to enable this option? Is it possible in kernel mode?
> Thanks!

It only works in kernel mode! :) Uncomment either of the following lines in
elements/linuxmodule/anydevice.hh:

// #define CLICK_DEVICE_CYCLES 1
// #define CLICK_DEVICE_PRFCTR 1

The CYCLES line gives you cycle counts exclusively. The PRFCTR line would
give you performance counters as well; check the code (and man
PerfCountInfo). Compile, link, then check out the
/click/TODEVICEELEMENT/calls handler (or cycles, enqueue_cycles,
clean_dma_cycles).

Eddie




More information about the click mailing list