summaryrefslogtreecommitdiff
path: root/lib/librte_jobstats
AgeCommit message (Collapse)Author
2018-01-30build: replace license text with SPDX tagBruce Richardson
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Reviewed-by: Luca Boccassi <bluca@debian.org>
2018-01-30lib: build with mesonBruce Richardson
Add non-EAL libraries to DPDK build. The compat lib is a special case, along with the previously-added EAL, but all other libs can be build using the same set of commands, where the individual meson.build files only need to specify their dependencies, source files, header files and ABI versions. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Reviewed-by: Harry van Haaren <harry.van.haaren@intel.com> Acked-by: Keith Wiles <keith.wiles@intel.com> Acked-by: Luca Boccassi <luca.boccassi@gmail.com>
2018-01-04lib: use SPDX tag for Intel copyright filesBruce Richardson
Replace the BSD license header with the SPDX tag for files with only an Intel copyright on them. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2017-11-13lib: fix typosPavel Shirshov
Signed-off-by: Pavel Shirshov <pavel.shirshov@gmail.com>
2017-10-24mk: do not generate LDLIBS from directory dependenciesOlivier Matz
The list of libraries in LDLIBS was generated from the DEPDIRS-xyz variable. This is valid when the subdirectory name match the library name, but it's not always the case, especially for PMDs. The patches removes this feature and explicitly adds the proper libraries in LDLIBS. Some DEPDIRS-xyz variables become useless, remove them. Reported-by: Gage Eads <gage.eads@intel.com> Signed-off-by: Olivier Matz <olivier.matz@6wind.com> Reviewed-by: Gage Eads <gage.eads@intel.com>
2017-10-08jobstats: fix a doxygen commentCongWen Zhang
Signed-off-by: CongWen Zhang <zhang.congwen@zte.com.cn> Reviewed-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
2017-07-20jobstats: fix typo in doxygen commentRami Rosen
This patch fixes a trivial typo in rte_jobstats.h. Signed-off-by: Rami Rosen <rami.rosen@intel.com>
2017-03-27mk: optimize directory dependenciesOlivier Matz
Before this patch, the management of dependencies between directories had several issues: - the generation of .depdirs, done at configuration is slow: it can take more than one minute on some slow targets (usually ~10s on a standard PC without -j). - for instance, it is possible to express a dependency like: - app/foo depends on lib/librte_foo - and lib/librte_foo depends on app/bar But this won't work because the directories are traversed with a depth-first algorithm, so we have to choose between doing 'app' before or after 'lib'. - the script depdirs-rule.sh is too complex. - we cannot use "make -d" for debug, because the output of make is used for the generation of .depdirs. This patch moves the DEPDIRS-* variables in the upper Makefile, making the dependencies much easier to calculate. A DEPDIRS variable is still used to process library dependencies in LDLIBS. After this commit, "make config" is almost immediate. Signed-off-by: Olivier Matz <olivier.matz@6wind.com> Tested-by: Robin Jarry <robin.jarry@6wind.com> Tested-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2016-06-30jobstats: fix typo in a commentRami Rosen
Signed-off-by: Rami Rosen <rami.rosen@intel.com>
2016-02-29jobstats: add abort functionMarcin Kerlin
This patch adds new function rte_jobstats_abort. It marks *job* as finished and time of this work will be add to management time instead of execution time. This function should be used instead of rte_jobstats_finish if condition occurs, condition is defined by the application for example when receiving n>0 packets. Example of usage is added to the example l2fwd-jobstats. At maximum load do-while loop inside Idle job will be execute once because one or more jobs waiting to be executed, so this time should not be include as the execution time by calling rte_jobstats_abort(). Signed-off-by: Marcin Kerlin <marcinx.kerlin@intel.com> Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
2015-02-24jobstats: new libraryPawel 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_jobstats_context_start() and rte_jobstats_context_finish() calls. After that, jobs might be started. Each job must be surrounded with rte_jobstats_start() and rte_jobstats_finish() calls. After job finishes its execution, period in which it should be called again is adjusted. It might be used 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 rte_jobstats 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 <pawelx.wodkowski@intel.com> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>