From patchwork Thu Oct 12 17:00:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 115658 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp2160338qgn; Thu, 12 Oct 2017 10:01:50 -0700 (PDT) X-Google-Smtp-Source: ABhQp+RYEuA/io2a35yv64Lsd5yUY6rPSlpyEKbhLBPst/FAk/X0GmDryPxCiQ7jVD+19U4EPFhH X-Received: by 10.107.11.27 with SMTP id v27mr4149045ioi.179.1507827710400; Thu, 12 Oct 2017 10:01:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507827710; cv=none; d=google.com; s=arc-20160816; b=CmPdB+VMfNa49DvbB+NYr8N92GAGbBWWORHxFoiSq8G90VrQkHtggSZyhclsFBqxgC WKpJwf7aPW0rw/wm6/z/aUmdY3J0jw871hogs2lEnPek4aTLYJwnFdt7xrtD8NkXIy+3 X6iy+ctFPQ3oxLVy30GS+Dz+4/S0YtI9aeht/w6/rYXmi2WtpJtlKGJ/T/Ak+IS0ri6h MhroXmPYzz4DKm1y3nqUUHZzgL+rS36vHuEGvBUeHSKAZ1l0Ej5ajF/ssEMgqg72JdoB 9sqdJnJ5YKK/YuP6CjritVlGlPKGcvzHhUGG7jL8Ffd7ybmCC+p5006lE3H3ZbEhfq06 tAdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=tsp/WyBffXdRQiAtK/atRXqXV3sTcYHaM3GWrB6HeVs=; b=J4N5Io0ivUXiuhYKdEOz/6tfmY91YlUkvxXjfc7WR+S/ACqPx2GNocKW2w/Cm7RB0d JH7X79Q5Cn78QuEPhVySL9Av4RTDEI6nOGTmw0JjPmD5d6Pg9RN+7n1a2rPdgObBc3U/ RlJzOJ9NLYnkf52dgQonGDK7NN1iQAMfxhlyKhb9jH2rW6dWA1c8ZuTSZ+3Ti3zDOAZx M4bKrCKqlZufXZC15EQbffUp4YLuG+wdKh4eXYBl6ZIWYeFlfYH7JPno2MqjNfmXrYDJ Zm+bH8MsdMW1Ba+sMMo1RS+hPEDDEM+cHrBlKIxJYGMIdD1zDKoVDyqdfEL10hfpNGRn MWkg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id u7si423876itd.45.2017.10.12.10.01.48; Thu, 12 Oct 2017 10:01:50 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id CE86060B45; Thu, 12 Oct 2017 17:01:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 6806660972; Thu, 12 Oct 2017 17:01:34 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id A17A260A52; Thu, 12 Oct 2017 17:01:29 +0000 (UTC) Received: from forward104j.mail.yandex.net (forward104j.mail.yandex.net [5.45.198.247]) by lists.linaro.org (Postfix) with ESMTPS id DB6F160972 for ; Thu, 12 Oct 2017 17:00:51 +0000 (UTC) Received: from mxback15g.mail.yandex.net (mxback15g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:94]) by forward104j.mail.yandex.net (Yandex) with ESMTP id 6030142A72 for ; Thu, 12 Oct 2017 20:00:50 +0300 (MSK) Received: from smtp2p.mail.yandex.net (smtp2p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:7]) by mxback15g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id Sg7CISm9AY-0inWSkOp; Thu, 12 Oct 2017 20:00:44 +0300 Received: by smtp2p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id jEAUUqMMpg-0hm4vjF6; Thu, 12 Oct 2017 20:00:43 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Thu, 12 Oct 2017 20:00:03 +0300 Message-Id: <1507827605-6030-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1507827605-6030-1-git-send-email-odpbot@yandex.ru> References: <1507827605-6030-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 229 Subject: [lng-odp] [PATCH v1 1/3] linux-gen: odp_tm_stats_print should not depend on debug X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Maxim Uvarov odp_tm_stats_print() is odp api call it should not depend on compilation debug options. Which is very confusing people to not see any valid output. https://bugs.linaro.org/show_bug.cgi?id=3024 Signed-off-by: Maxim Uvarov --- /** Email created from pull request 229 (muvarov:master_bug3024) ** https://github.com/Linaro/odp/pull/229 ** Patch: https://github.com/Linaro/odp/pull/229.patch ** Base sha: b529f843814f70068de2090e02df632113afa800 ** Merge commit sha: b5f6031413a826cccfaa4468b62e2f3e90a12fff **/ platform/linux-generic/odp_pkt_queue.c | 22 ++++++++-------- platform/linux-generic/odp_sorted_list.c | 12 ++++----- platform/linux-generic/odp_timer_wheel.c | 44 ++++++++++++++++--------------- platform/linux-generic/odp_traffic_mngr.c | 42 ++++++++++++++--------------- 4 files changed, 61 insertions(+), 59 deletions(-) diff --git a/platform/linux-generic/odp_pkt_queue.c b/platform/linux-generic/odp_pkt_queue.c index 613e39dd0..4f6a1eb61 100644 --- a/platform/linux-generic/odp_pkt_queue.c +++ b/platform/linux-generic/odp_pkt_queue.c @@ -392,17 +392,17 @@ void _odp_pkt_queue_stats_print(_odp_int_queue_pool_t queue_pool) queue_pool_t *pool; pool = (queue_pool_t *)(uintptr_t)queue_pool; - ODP_DBG("pkt_queue_stats - queue_pool=0x%" PRIX64 "\n", queue_pool); - ODP_DBG(" max_queue_num=%u max_queued_pkts=%u next_queue_num=%u\n", - pool->max_queue_num, pool->max_queued_pkts, - pool->next_queue_num); - ODP_DBG(" total pkt appends=%" PRIu64 " total pkt removes=%" PRIu64 - " bad removes=%" PRIu64 "\n", - pool->total_pkt_appends, pool->total_pkt_removes, - pool->total_bad_removes); - ODP_DBG(" free_list size=%u min size=%u peak size=%u\n", - pool->free_list_size, pool->min_free_list_size, - pool->peak_free_list_size); + ODP_PRINT("pkt_queue_stats - queue_pool=0x%" PRIX64 "\n", queue_pool); + ODP_PRINT(" max_queue_num=%u max_queued_pkts=%u next_queue_num=%u\n", + pool->max_queue_num, pool->max_queued_pkts, + pool->next_queue_num); + ODP_PRINT(" total pkt appends=%" PRIu64 " total pkt removes=%" PRIu64 + " bad removes=%" PRIu64 "\n", + pool->total_pkt_appends, pool->total_pkt_removes, + pool->total_bad_removes); + ODP_PRINT(" free_list size=%u min size=%u peak size=%u\n", + pool->free_list_size, pool->min_free_list_size, + pool->peak_free_list_size); } void _odp_queue_pool_destroy(_odp_int_queue_pool_t queue_pool) diff --git a/platform/linux-generic/odp_sorted_list.c b/platform/linux-generic/odp_sorted_list.c index df6042425..511fd090e 100644 --- a/platform/linux-generic/odp_sorted_list.c +++ b/platform/linux-generic/odp_sorted_list.c @@ -261,12 +261,12 @@ void _odp_sorted_list_stats_print(_odp_int_sorted_pool_t sorted_pool) sorted_pool_t *pool; pool = (sorted_pool_t *)(uintptr_t)sorted_pool; - ODP_DBG("sorted_pool=0x%" PRIX64 "\n", sorted_pool); - ODP_DBG(" max_sorted_lists=%u next_list_idx=%u\n", - pool->max_sorted_lists, pool->next_list_idx); - ODP_DBG(" total_inserts=%" PRIu64 " total_deletes=%" PRIu64 - " total_removes=%" PRIu64 "\n", pool->total_inserts, - pool->total_deletes, pool->total_removes); + ODP_PRINT("sorted_pool=0x%" PRIX64 "\n", sorted_pool); + ODP_PRINT(" max_sorted_lists=%u next_list_idx=%u\n", + pool->max_sorted_lists, pool->next_list_idx); + ODP_PRINT(" total_inserts=%" PRIu64 " total_deletes=%" PRIu64 + " total_removes=%" PRIu64 "\n", pool->total_inserts, + pool->total_deletes, pool->total_removes); } void _odp_sorted_pool_destroy(_odp_int_sorted_pool_t sorted_pool) diff --git a/platform/linux-generic/odp_timer_wheel.c b/platform/linux-generic/odp_timer_wheel.c index 1d0640c55..b37d269bd 100644 --- a/platform/linux-generic/odp_timer_wheel.c +++ b/platform/linux-generic/odp_timer_wheel.c @@ -937,10 +937,10 @@ uint32_t _odp_timer_wheel_count(_odp_timer_wheel_t timer_wheel) static void _odp_int_timer_wheel_desc_print(wheel_desc_t *wheel_desc, uint32_t wheel_idx) { - ODP_DBG(" wheel=%u num_slots=%u ticks_shift=%u ticks_per_slot=%u" - " ticks_per_rev=%" PRIu64 "\n", - wheel_idx, wheel_desc->num_slots, wheel_desc->ticks_shift, - wheel_desc->ticks_per_slot, wheel_desc->ticks_per_rev); + ODP_PRINT(" wheel=%u num_slots=%u ticks_shift=%u ticks_per_slot=%u" + " ticks_per_rev=%" PRIu64 "\n", + wheel_idx, wheel_desc->num_slots, wheel_desc->ticks_shift, + wheel_desc->ticks_per_slot, wheel_desc->ticks_per_rev); } void _odp_timer_wheel_stats_print(_odp_timer_wheel_t timer_wheel) @@ -952,28 +952,30 @@ void _odp_timer_wheel_stats_print(_odp_timer_wheel_t timer_wheel) timer_wheels = (timer_wheels_t *)(uintptr_t)timer_wheel; expired_ring = timer_wheels->expired_timers_ring; - ODP_DBG("_odp_int_timer_wheel_stats current_ticks=%" PRIu64 "\n", - timer_wheels->current_ticks); + ODP_PRINT("_odp_int_timer_wheel_stats current_ticks=%" PRIu64 "\n", + timer_wheels->current_ticks); for (wheel_idx = 0; wheel_idx < 4; wheel_idx++) _odp_int_timer_wheel_desc_print( &timer_wheels->wheel_descs[wheel_idx], wheel_idx); - ODP_DBG(" total timer_inserts=%" PRIu64 " timer_removes=%" PRIu64 - " insert_fails=%" PRIu64 "\n", - timer_wheels->total_timer_inserts, - timer_wheels->total_timer_removes, - timer_wheels->insert_fail_cnt); - ODP_DBG(" total_promote_cnt=%" PRIu64 " promote_fail_cnt=%" - PRIu64 "\n", timer_wheels->total_promote_cnt, - timer_wheels->promote_fail_cnt); - ODP_DBG(" free_list_size=%u min_size=%u peak_size=%u\n", - timer_wheels->free_list_size, timer_wheels->min_free_list_size, - timer_wheels->peak_free_list_size); - ODP_DBG(" expired_timers_ring size=%u count=%u " - "peak_count=%u full_cnt=%u\n", - expired_ring->max_idx + 1, expired_ring->count, - expired_ring->peak_count, expired_ring->expired_ring_full_cnt); + ODP_PRINT(" total timer_inserts=%" PRIu64 " timer_removes=%" PRIu64 + " insert_fails=%" PRIu64 "\n", + timer_wheels->total_timer_inserts, + timer_wheels->total_timer_removes, + timer_wheels->insert_fail_cnt); + ODP_PRINT(" total_promote_cnt=%" PRIu64 " promote_fail_cnt=%" + PRIu64 "\n", timer_wheels->total_promote_cnt, + timer_wheels->promote_fail_cnt); + ODP_PRINT(" free_list_size=%u min_size=%u peak_size=%u\n", + timer_wheels->free_list_size, + timer_wheels->min_free_list_size, + timer_wheels->peak_free_list_size); + ODP_PRINT(" expired_timers_ring size=%u count=%u " + "peak_count=%u full_cnt=%u\n", + expired_ring->max_idx + 1, expired_ring->count, + expired_ring->peak_count, + expired_ring->expired_ring_full_cnt); } void _odp_timer_wheel_destroy(_odp_timer_wheel_t timer_wheel) diff --git a/platform/linux-generic/odp_traffic_mngr.c b/platform/linux-generic/odp_traffic_mngr.c index 6d9573263..ab06b3c0d 100644 --- a/platform/linux-generic/odp_traffic_mngr.c +++ b/platform/linux-generic/odp_traffic_mngr.c @@ -4643,19 +4643,19 @@ void odp_tm_stats_print(odp_tm_t odp_tm) tm_system = GET_TM_SYSTEM(odp_tm); input_work_queue = tm_system->input_work_queue; - ODP_DBG("odp_tm_stats_print - tm_system=0x%" PRIX64 " tm_idx=%u\n", - odp_tm, tm_system->tm_idx); - ODP_DBG(" input_work_queue size=%u current cnt=%u peak cnt=%u\n", - INPUT_WORK_RING_SIZE, input_work_queue->queue_cnt, - input_work_queue->peak_cnt); - ODP_DBG(" input_work_queue enqueues=%" PRIu64 " dequeues=% " PRIu64 - " fail_cnt=%" PRIu64 "\n", input_work_queue->total_enqueues, - input_work_queue->total_dequeues, - input_work_queue->enqueue_fail_cnt); - ODP_DBG(" green_cnt=%" PRIu64 " yellow_cnt=%" PRIu64 " red_cnt=%" - PRIu64 "\n", tm_system->shaper_green_cnt, - tm_system->shaper_yellow_cnt, - tm_system->shaper_red_cnt); + ODP_PRINT("odp_tm_stats_print - tm_system=0x%" PRIX64 " tm_idx=%u\n", + odp_tm, tm_system->tm_idx); + ODP_PRINT(" input_work_queue size=%u current cnt=%u peak cnt=%u\n", + INPUT_WORK_RING_SIZE, input_work_queue->queue_cnt, + input_work_queue->peak_cnt); + ODP_PRINT(" input_work_queue enqueues=%" PRIu64 " dequeues=% " PRIu64 + " fail_cnt=%" PRIu64 "\n", input_work_queue->total_enqueues, + input_work_queue->total_dequeues, + input_work_queue->enqueue_fail_cnt); + ODP_PRINT(" green_cnt=%" PRIu64 " yellow_cnt=%" PRIu64 " red_cnt=%" + PRIu64 "\n", tm_system->shaper_green_cnt, + tm_system->shaper_yellow_cnt, + tm_system->shaper_red_cnt); _odp_pkt_queue_stats_print(tm_system->_odp_int_queue_pool); _odp_timer_wheel_stats_print(tm_system->_odp_int_timer_wheel); @@ -4665,14 +4665,14 @@ void odp_tm_stats_print(odp_tm_t odp_tm) for (queue_num = 1; queue_num < max_queue_num; queue_num++) { tm_queue_obj = tm_system->queue_num_tbl[queue_num - 1]; if (tm_queue_obj && tm_queue_obj->pkts_rcvd_cnt != 0) - ODP_DBG("queue_num=%u priority=%u rcvd=%u enqueued=%u " - "dequeued=%u consumed=%u\n", - queue_num, - tm_queue_obj->priority, - tm_queue_obj->pkts_rcvd_cnt, - tm_queue_obj->pkts_enqueued_cnt, - tm_queue_obj->pkts_dequeued_cnt, - tm_queue_obj->pkts_consumed_cnt); + ODP_PRINT("queue_num=%u priority=%u rcvd=%u enqueued=%u " + "dequeued=%u consumed=%u\n", + queue_num, + tm_queue_obj->priority, + tm_queue_obj->pkts_rcvd_cnt, + tm_queue_obj->pkts_enqueued_cnt, + tm_queue_obj->pkts_dequeued_cnt, + tm_queue_obj->pkts_consumed_cnt); } }