summaryrefslogtreecommitdiff
path: root/lib/librte_jobstats/Makefile
diff options
context:
space:
mode:
authorPawel Wodkowski <pawelx.wodkowski@intel.com>2015-02-24 17:33:23 +0100
committerThomas Monjalon <thomas.monjalon@6wind.com>2015-02-24 22:12:35 +0100
commit597b0f74e209b4cebb0602df69385b0c33b0dfa3 (patch)
treea7ac4987357fbbe9f2952d3ab3d287d18963995c /lib/librte_jobstats/Makefile
parentd6fe2f5ee041b650a9f0829e3004c72f0c5a4634 (diff)
downloaddpdk-597b0f74e209b4cebb0602df69385b0c33b0dfa3.zip
dpdk-597b0f74e209b4cebb0602df69385b0c33b0dfa3.tar.gz
dpdk-597b0f74e209b4cebb0602df69385b0c33b0dfa3.tar.xz
jobstats: new library
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>
Diffstat (limited to 'lib/librte_jobstats/Makefile')
-rw-r--r--lib/librte_jobstats/Makefile53
1 files changed, 53 insertions, 0 deletions
diff --git a/lib/librte_jobstats/Makefile b/lib/librte_jobstats/Makefile
new file mode 100644
index 0000000..136a448
--- /dev/null
+++ b/lib/librte_jobstats/Makefile
@@ -0,0 +1,53 @@
+# BSD LICENSE
+#
+# Copyright(c) 2015 Intel Corporation. All rights reserved.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Intel Corporation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+include $(RTE_SDK)/mk/rte.vars.mk
+
+# library name
+LIB = librte_jobstats.a
+
+CFLAGS += -O3
+CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR)
+
+EXPORT_MAP := rte_jobstats_version.map
+
+LIBABIVER := 1
+
+# all source are stored in SRCS-y
+SRCS-$(CONFIG_RTE_LIBRTE_JOBSTATS) := rte_jobstats.c
+
+# install this header file
+SYMLINK-$(CONFIG_RTE_LIBRTE_JOBSTATS)-include := rte_jobstats.h
+
+# this lib needs eal
+DEPDIRS-$(CONFIG_RTE_LIBRTE_JOBSTATS) += lib/librte_eal
+
+include $(RTE_SDK)/mk/rte.lib.mk