[Click] how to determine cpu cycles for receive and transmit device interactions

Eddie Kohler kohler at icir.org
Wed Jul 30 12:27:06 EDT 2003


Hi Shilpi,

> Using the CycleCountAccum(), i can measure the cycles consumed in click
> forwarding path by inserting it just after FromDevice and just before ToDevice
> but i am not getting how to get number of cycles spent in polling a device and
> and trasmitting packets.

That's right. You need special support for that. It's in Click, but not
turned on by default. Uncomment the line

// #define CLICK_DEVICE_STATS 1

in elements/linuxmodule/anydevice.hh. Then compile and install. Look at
PollDevice's "push_cycles", "poll_cycles", and "refill_dma_cycles"
handlers, and ToDevice's "pull_cycles", "enqueue_cycles", and
"clean_dma_cycles" handlers.

Eddie


More information about the click mailing list