From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v5 1/3] librte_headroom: New library for checking core/system/app load Date: Tue, 24 Feb 2015 02:55:36 +0100 Message-ID: <1698774.UefVOj119L@xps13> References: <1424191340-26451-1-git-send-email-pawelx.wodkowski@intel.com> <1424348324-29932-1-git-send-email-pawelx.wodkowski@intel.com> <1424348324-29932-2-git-send-email-pawelx.wodkowski@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev-VfR2kkLFssw@public.gmane.org To: Pawel Wodkowski Return-path: In-Reply-To: <1424348324-29932-2-git-send-email-pawelx.wodkowski-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" 2015-02-19 13:18, Pawel Wodkowski: > This library provide API to measure time spend in particular parts of > code and to calculate optimal polling time. > > To calculate a those statistics application code need to be divided into > parts (called jobs) that do something. It is up to application to decide > what is considered a job. > > Series of jobs must be surrounded with the rte_headroom_start_loop() and > rte_headroom_finish_loop() calls. After that, jobs might be started. > Each job must be surrounded with rte_headroom_start_job() and > rte_headroom_finish_job() calls. > > After job finishes its execution, period in which it should be called > again is adjusted to minimize time wasted on unnecessary polls/calls. > Adjustment is based on data provided by job itself (ex: number of > packets it processed). > > After all jobs in serie are executed fallowing statistics are updated > and might be used by application. Statistics can be reset. Some of > provided statistic data: > - total/min/max execution - time spent in executing jobs. > - total/min/max management - time spent outside execution area. This > value might be used to measure overhead of scheduling jobs. This time > also > contains overhead of headroom library itself. > - number of loops that executed at least one job > - executed jobs > - time when statistics were reset. > > Each job provide total/min/max execution time and execution count > statistics. > > Signed-off-by: Pawel Wodkowski > --- > config/common_bsdapp | 5 + > config/common_linuxapp | 5 + > lib/Makefile | 1 + > lib/librte_headroom/Makefile | 54 +++++ > lib/librte_headroom/rte_headroom.c | 271 ++++++++++++++++++++++ > lib/librte_headroom/rte_headroom.h | 324 +++++++++++++++++++++++++++ > lib/librte_headroom/rte_headroom_version.map | 19 ++ Please add the library in doc/api/doxy-api.conf.