From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 42B52A0597; Sat, 18 Apr 2020 00:00:29 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2BB111EBEC; Fri, 17 Apr 2020 23:58:23 +0200 (CEST) Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by dpdk.org (Postfix) with ESMTP id 5BA541EB74 for ; Fri, 17 Apr 2020 23:58:09 +0200 (CEST) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20200417215809euoutp01b3169c18f636c64350a5aabf2712f35f~GujzZMgtQ0379003790euoutp01E for ; Fri, 17 Apr 2020 21:58:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20200417215809euoutp01b3169c18f636c64350a5aabf2712f35f~GujzZMgtQ0379003790euoutp01E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1587160689; bh=1VJRoLQNO8/hJG8UI8syIfi89711+5L/VAw3BFew/5A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jaTEMLd/I86U4ODx+YWc57ivLUIkYgAVmdBh8GjbNAzndMfRkZTzCtEjZoO238Vdx AT+EXkPJVl6kbLoYDgVuQXHMBsd+YA2KBYNiOT0aFU+F7uyh1IrwlPd4OSHYD4Xaj/ G3nmMQCZtBszemBpaHLlwLrcWsURXky9cdoMSu5k= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20200417215808eucas1p1e0fe0677fbf7065f6aa7c72697457091~Gujyk5pkL1204912049eucas1p1Q; Fri, 17 Apr 2020 21:58:08 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 82.C4.60679.0762A9E5; Fri, 17 Apr 2020 22:58:08 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20200417215808eucas1p26bb784466131275eeccff018ecac83ca~GujySuDyU1721717217eucas1p2q; Fri, 17 Apr 2020 21:58:08 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20200417215808eusmtrp1be17e1473d9a644a77f893ee3809ea63~GujySK8Y-0397603976eusmtrp1v; Fri, 17 Apr 2020 21:58:08 +0000 (GMT) X-AuditID: cbfec7f4-0e5ff7000001ed07-82-5e9a26700991 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 31.62.07950.F662A9E5; Fri, 17 Apr 2020 22:58:07 +0100 (BST) Received: from localhost.localdomain (unknown [106.210.88.70]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20200417215807eusmtip2d86c93c59ba2d3a17fdef282277459cc~GujxqdTGI0325203252eusmtip2x; Fri, 17 Apr 2020 21:58:07 +0000 (GMT) From: Lukasz Wojciechowski To: Robert Sanford , Erik Gabriel Carrillo , Thomas Monjalon Cc: dev@dpdk.org Date: Fri, 17 Apr 2020 23:57:36 +0200 Message-Id: <20200417215739.23180-15-l.wojciechow@partner.samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200417215739.23180-1-l.wojciechow@partner.samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrFIsWRmVeSWpSXmKPExsWy7djPc7oFarPiDC4857d492k7k8WPb/2s FvcPPGa3+PTgBIsDi8fkIwuYPX4tWMrqsXjPSyaPYzensQewRHHZpKTmZJalFunbJXBlHP+w iL2gU7Zi3oUpLA2MCyW6GDk5JARMJFpeb2LvYuTiEBJYwSix52onK0hCSOALo8Ssy+EQic+M Ei2zn7DBdCzds4YR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BIovffmdEcQWEnCVePjwFPsERr4FjAyrGEVSS4tz03OLjfSKE3OLS/PS 9ZLzczcxAsNx27GfW3Ywdr0LPsQowMGoxMNr0DMzTog1say4MvcQowQHs5II70E3oBBvSmJl VWpRfnxRaU5q8SFGU6CjJjJLiSbnA2MlryTe0NTQ3MLS0NzY3NjMQkmct0PgYIyQQHpiSWp2 ampBahFMHxMHp1QDo+f3UybeD2ecXSxtqx1XvezELM8fS3pdRD5tYFd/3v7q2eGX+xRd334L frH4k6vG/G9H2kOzoi4KnWG4+/z5M4Pdum4BKaFbFTI5XOQWilr8E9ZV1Jx8/NDHksBP69cX TL6ZJpHA7rX66fbwePZgJwaOeYeO/8ysjW5Qrd5zTpvxW1lGYl7hdCWW4oxEQy3mouJEAGwX uytdAgAA X-CMS-MailID: 20200417215808eucas1p26bb784466131275eeccff018ecac83ca X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200417215808eucas1p26bb784466131275eeccff018ecac83ca X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200417215808eucas1p26bb784466131275eeccff018ecac83ca References: <20200417215739.23180-1-l.wojciechow@partner.samsung.com> Subject: [dpdk-dev] [PATCH v1 14/17] timer: replace library debug flag with global one X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Use global debug flag RTE_DEBUG instead of RTE_LIBRTE_TIMER_DEBUG. The old define is completely removed from source code and config. The tests were adjusted to use new flag. Signed-off-by: Lukasz Wojciechowski --- app/test/test_timer_secondary.c | 2 +- config/common_base | 1 - lib/librte_timer/rte_timer.c | 12 ++++++------ lib/librte_timer/rte_timer.h | 2 +- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/app/test/test_timer_secondary.c b/app/test/test_timer_secondary.c index 7a3bc873b..7f3d5645c 100644 --- a/app/test/test_timer_secondary.c +++ b/app/test/test_timer_secondary.c @@ -158,7 +158,7 @@ test_timer_secondary(void) test_info->exit_flag = 1; rte_eal_wait_lcore(*mgr_lcorep); -#ifdef RTE_LIBRTE_TIMER_DEBUG +#ifdef RTE_DEBUG rte_timer_alt_dump_stats(test_info->timer_data_id, stdout); #endif diff --git a/config/common_base b/config/common_base index c22e9a6fe..025ae7c62 100644 --- a/config/common_base +++ b/config/common_base @@ -859,7 +859,6 @@ CONFIG_RTE_PKTMBUF_HEADROOM=128 # Compile librte_timer # CONFIG_RTE_LIBRTE_TIMER=y -CONFIG_RTE_LIBRTE_TIMER_DEBUG=n # # Compile librte_cfgfile diff --git a/lib/librte_timer/rte_timer.c b/lib/librte_timer/rte_timer.c index 89f27074f..fc96b1a2c 100644 --- a/lib/librte_timer/rte_timer.c +++ b/lib/librte_timer/rte_timer.c @@ -48,7 +48,7 @@ struct priv_timer { /** running timer on this lcore now */ struct rte_timer *running_tim; -#ifdef RTE_LIBRTE_TIMER_DEBUG +#ifdef RTE_DEBUG /** per-lcore statistics */ struct rte_timer_debug_stats stats; #endif @@ -68,7 +68,7 @@ static const uint32_t default_data_id; static uint32_t rte_timer_subsystem_initialized; /* when debug is enabled, store some statistics */ -#ifdef RTE_LIBRTE_TIMER_DEBUG +#ifdef RTE_DEBUG #define __TIMER_STAT_ADD(priv_timer, name, n) do { \ unsigned __lcore_id = rte_lcore_id(); \ if (__lcore_id < RTE_MAX_LCORE) \ @@ -302,7 +302,7 @@ timer_set_running_state(struct rte_timer *tim) static uint32_t timer_get_skiplist_level(unsigned curr_depth) { -#ifdef RTE_LIBRTE_TIMER_DEBUG +#ifdef RTE_DEBUG static uint32_t i, count = 0; static uint32_t levels[MAX_SKIPLIST_DEPTH] = {0}; #endif @@ -321,7 +321,7 @@ timer_get_skiplist_level(unsigned curr_depth) level = curr_depth; if (level >= MAX_SKIPLIST_DEPTH) level = MAX_SKIPLIST_DEPTH-1; -#ifdef RTE_LIBRTE_TIMER_DEBUG +#ifdef RTE_DEBUG count ++; levels[level]++; if (count % 10000 == 0) @@ -1008,7 +1008,7 @@ rte_timer_next_ticks(void) static void __rte_timer_dump_stats(struct rte_timer_data *timer_data __rte_unused, FILE *f) { -#ifdef RTE_LIBRTE_TIMER_DEBUG +#ifdef RTE_DEBUG struct rte_timer_debug_stats sum; unsigned lcore_id; struct priv_timer *priv_timer = timer_data->priv_timer; @@ -1026,7 +1026,7 @@ __rte_timer_dump_stats(struct rte_timer_data *timer_data __rte_unused, FILE *f) fprintf(f, " manage = %"PRIu64"\n", sum.manage); fprintf(f, " pending = %"PRIu64"\n", sum.pending); #else - fprintf(f, "No timer statistics, RTE_LIBRTE_TIMER_DEBUG is disabled\n"); + fprintf(f, "No timer statistics, RTE_DEBUG is disabled\n"); #endif } diff --git a/lib/librte_timer/rte_timer.h b/lib/librte_timer/rte_timer.h index c6b3d450d..b4edd3f30 100644 --- a/lib/librte_timer/rte_timer.h +++ b/lib/librte_timer/rte_timer.h @@ -73,7 +73,7 @@ union rte_timer_status { uint32_t u32; /**< To atomic-set status + owner. */ }; -#ifdef RTE_LIBRTE_TIMER_DEBUG +#ifdef RTE_DEBUG /** * A structure that stores the timer statistics (per-lcore). */ -- 2.17.1