examples/ip_pipeline: measure CPU utilization
authorFan Zhang <roy.fan.zhang@intel.com>
Mon, 22 Feb 2016 14:07:04 +0000 (14:07 +0000)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Mon, 7 Mar 2016 11:35:36 +0000 (12:35 +0100)
commit4e14069328fc30b7882625e83e3603ad3124557c
tree056ce8f4d358d29fe938c51541142c281832c275
parent1a33c5ea2f45cde3273ba278e953b8b21c0302d0
examples/ip_pipeline: measure CPU utilization

This patch adds CPU utilization measurement and idle cycle rate
computation to packet framework. The measurement is done by measuring
the cycles spent while a thread pulls zero packet from RX queue. These
cycles are treated as idle cycles (or headroom). A CLI command is added
to display idle cycle rate of specific thread. The CLI command format is
shown as following:

t <thread_id> headroom

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
examples/ip_pipeline/app.h
examples/ip_pipeline/init.c
examples/ip_pipeline/thread.c
examples/ip_pipeline/thread.h
examples/ip_pipeline/thread_fe.c
examples/ip_pipeline/thread_fe.h