From patchwork Thu Jun 9 11:38:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Elo, Matias \(Nokia - FI/Espoo\)" X-Patchwork-Id: 69700 Delivered-To: patch@linaro.org Received: by 10.140.106.246 with SMTP id e109csp278918qgf; Thu, 9 Jun 2016 04:39:16 -0700 (PDT) X-Received: by 10.55.212.133 with SMTP id s5mr8961421qks.85.1465472356842; Thu, 09 Jun 2016 04:39:16 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id b23si3186889qkh.75.2016.06.09.04.39.16; Thu, 09 Jun 2016 04:39:16 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE dis=NONE) header.from=nokia.com Received: by lists.linaro.org (Postfix, from userid 109) id 6FD6C61707; Thu, 9 Jun 2016 11:39:16 +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=BAD_ENC_HEADER,BAYES_00, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,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 5EBA761546; Thu, 9 Jun 2016 11:39:06 +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 64FFA61579; Thu, 9 Jun 2016 11:39:04 +0000 (UTC) Received: from emea01-am1-obe.outbound.protection.outlook.com (mail-am1on0110.outbound.protection.outlook.com [157.56.112.110]) by lists.linaro.org (Postfix) with ESMTPS id DEBA5611F3 for ; Thu, 9 Jun 2016 11:39:02 +0000 (UTC) Received: from AMXPR07CA0042.eurprd07.prod.outlook.com (10.242.64.42) by DBXPR07MB173.eurprd07.prod.outlook.com (10.242.142.17) with Microsoft SMTP Server (TLS) id 15.1.506.9; Thu, 9 Jun 2016 11:39:01 +0000 Received: from AM1FFO11FD025.protection.gbl (2a01:111:f400:7e00::132) by AMXPR07CA0042.outlook.office365.com (2a01:111:e400:1000::42) with Microsoft SMTP Server (TLS) id 15.1.511.8 via Frontend Transport; Thu, 9 Jun 2016 11:39:01 +0000 Received-SPF: Pass (protection.outlook.com: domain of nokia.com designates 131.228.2.240 as permitted sender) receiver=protection.outlook.com; client-ip=131.228.2.240; helo=mailrelay.int.nokia.com; Received: from mailrelay.int.nokia.com (131.228.2.240) by AM1FFO11FD025.mail.protection.outlook.com (10.174.64.214) with Microsoft SMTP Server (TLS) id 15.1.497.8 via Frontend Transport; Thu, 9 Jun 2016 11:39:00 +0000 Received: from fihe3nok0734.emea.nsn-net.net (localhost [127.0.0.1]) by fihe3nok0734.emea.nsn-net.net (8.14.9/8.14.5) with ESMTP id u59BcZsg027211 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 9 Jun 2016 14:38:35 +0300 Received: from 10.144.19.15 ([10.144.104.109]) by fihe3nok0734.emea.nsn-net.net (8.14.9/8.14.5) with ESMTP id u59BcZQw027205 (version=TLSv1/SSLv3 cipher=AES256-SHA256 bits=256 verify=NO) for ; Thu, 9 Jun 2016 14:38:35 +0300 X-HPESVCS-Source-Ip: 10.144.104.109 From: Matias Elo To: Date: Thu, 9 Jun 2016 14:38:35 +0300 Message-ID: <1465472315-20090-2-git-send-email-matias.elo@nokia.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1465472315-20090-1-git-send-email-matias.elo@nokia.com> References: <1465472315-20090-1-git-send-email-matias.elo@nokia.com> X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:131.228.2.240; IPV:NLI; CTRY:FI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(2980300002)(438002)(199003)(189002)(68736007)(5003940100001)(22756006)(16796002)(36756003)(19580395003)(8676002)(81166006)(47776003)(6806005)(50986999)(50466002)(450100001)(76176999)(81156014)(33646002)(87936001)(48376002)(92566002)(586003)(2906002)(50226002)(8936002)(2950100001)(106466001)(97736004)(77096005)(110136002)(229853001)(107886002)(5008740100001)(11100500001)(19580405001)(2351001)(189998001)(42882005)(357404004); DIR:OUT; SFP:1102; SCL:1; SRVR:DBXPR07MB173; H:mailrelay.int.nokia.com; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; AM1FFO11FD025; 1:je15hL1aLmNfLssW84LKqTJ2G6RbfL1le0EaiXeLJdcvMgNZudmCp9tgtPKUNH6wELnHN/A9QxBCGcJMjfOaiR9zwEnE0PhDbZr3F3Oylo4MGYKyVf7I+918YD8hqZ6cENk7mvOrGK91nOCZdPdlXEHlVRdZA3OMozvhSXQqFN2JZp3Mlc0hrTZSiaBfeXSAb5hN+yIrJld271IdOXeHpug1LGbJPBE8lOHCMljlfb0ANOti47Qd39RbVtbyndFhVfxih5LtEmXzdNSuo/50w5XOb3hiZp+rhd9pxiM5o7ro0AsGYvl1IRKlZG3qEV0wH7XTxqCXO6qSFXKWfPX06cHQsYUe4Zfsl/apXB6R0D8IbwE981cEHTGCGWJq2OoJ++qFSmoNU+qY6V4wOGYVEEPRUaSRidNHcjCgPktWi36iYUc+coLQks+T/ZX4OKZz+1nWhPUuFVIV7UZJbAZM/A== MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 359ce9cc-b55f-4443-a60a-08d3905aa6eb X-Microsoft-Exchange-Diagnostics: 1; DBXPR07MB173; 2:H4poEibKTZV3dBdzCC8HK9lQcXfgymZUv6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SBhbnYur04AM+piMMQBgRywhSHlJHV89N9dUxvQRNlHL93VPtL5l0Y1H72+nOUVEc3JkfT2GV8fFUZo/s3ruNGp2EXROIsk2y6NsCoojk4VSp674/EaOy/dxnu7HAUFjM5yFqE4vtxAPHl40Ug0Bik40zdEdZWUV/iDAIZ6uzqm2pAIQkgQ76aZLhbiJQFx+JEvRkW8g+2btZNpUIzpqXQS2clYcipbqiTE6r0QGDHKrFKPz4ErJ6AJkwXJW5y0DMAV+G5ugydbXfQDTyhrajCKCIbthbB9R/oCxJw+v0vb+ZfGh7wNjucWSkkjepPt0bQtsrdjTzkHX3sujNClet9sHX1B8n6JKeQJMbFvAe74wx9yWKiH5BgRU4vVIh2GT9vBgXLMDsi0qK41yaNTg5NhmMl/NVroov7xtTJ2phk1hUESMeV+e3VqFbQxe9IovgvhoXtyFOfNhIkQ0xDo/ga439OIimFqNZe2PSXkLZZNHajy1WoRvgi1aQIJpztZpXm4= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(82608151540597); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(13018025)(5005006)(8121501046)(13016025)(3002001)(10201501046); SRVR:DBXPR07MB173; BCL:0; PCL:0; RULEID:; SRVR:DBXPR07MB173; X-Microsoft-Exchange-Diagnostics: 1; DBXPR07MB173; 4:E0MfPVlljsgMjfOcm1etkJ4rVelbR2AWbH6FL2gFYsiwAlPp/7guVPtVPZRt/tVshA5Q33xdwQSyg4Pa/EXGvFKYxdFJYmaKUW9CQTMQfJTsTTWVWsot5/sDZvmCE/Dz3PnnflD8ydvEEuFpI8ZEcswO04eADmcDXkgm9REFhEBLJZOD4wTu8f18Px9ZbAwKMB3hOYqJ/crw+/z02mEyKp2wo+bQGQPA+R7WGvEPtnjkzpAyTtEhXMIqP0YuTrPUg5GP9yDPnUpAC3y6pCEOSCGVSWM/R65qoOee6jj24p6Wi/0HFedWCPkGTAiSNRNTPlBnNDX8PRu1/vkD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Q?Y1DFD11d8nXQAUb0hir8Bg0fl6L4jBflwlLL/H8CiOZKxdizdBX6FpQsxJjf?= =?us-ascii?Q?WdQ5KWpOjRreba9xGC2qTBlI8+Imh2Epw5qzQCruE3na+032cPfkZn2KxYkz?= =?us-ascii?Q?+v/sUSg0Psxuw78Ta5VemY0546ulZCVpEYyKJeJctqhLo11BbBpJUIC4jKVp?= =?us-ascii?Q?7jgS6Hjs8MG8w+SG+7rDnm1cKpvb4FaFxpFUufUGoo/mKniC2Epu5E44JTfZ?= =?us-ascii?Q?MdG0on+L3cEg03PorgewuJG3aLCat5DJ7Shpo9Ox0G1tgD42cSjzllGQi1Fm?= =?us-ascii?Q?4CiCFQSZc5jD2lQinoo4Xf8wTRoViKhzOy1TE9Yi32eZFSQZE3MzVhhvELZ1?= =?us-ascii?Q?QPFspY5sILP2+XrKBzM0EsFZJqSdVp+WtBG0aDcYGAQxlREA=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; DBXPR07MB173; 5:Qq1bSEmnP0TO0UGa/CzfvItG0z3x+M7qYGTYAnVAus7/v4Elm3FmwVYQuFW0ukiVqzTPgzF+11HXFBP84SO1W5w64PY5NzEKvBsZdy1n78ntfKoMsjglCVE8C5Qvp2Fq8t40lWbKHHFowQUZiqRXSQ==; 24:/yAy+b3uhSfMixknkok2EtVj1pnVp/hz9WW9ue80ZSew68j4TsXdUH9TFff2erRawy/3By5Zyg+bHhGjQbVkBiahh1G1hYC4ZxmLoGrSBzE=; 7:LAk8K0U6o20yYWYRylx8z9NIkR7qL4TJRslf1+EzsmVaTnUDPQOasj1vcoD9hEj8Yg0pHcM+d5RfuUB9KYxye6pdOQ6N9poWeENMBcqzyJ3wJPxc+mA+jn4h0k0KubOy5xHckPCZe9gVfPS8vS/wSkLAdS70rp7289EXIyWoKSY9DMrveV6JtG8k/71GMiMi/O+fgjcnDK7kVrGYNCWcisDawe19Mrm1Ozm4t/FbE3o= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nokia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Jun 2016 11:39:00.9729 (UTC) X-MS-Exchange-CrossTenant-Id: 5d471751-9675-428d-917b-70f44f9630b0 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5d471751-9675-428d-917b-70f44f9630b0; Ip=[131.228.2.240]; Helo=[mailrelay.int.nokia.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBXPR07MB173 X-Topics: patch Subject: [lng-odp] [PATCH 2/2] linux-gen: tm: remove unused debug print functions 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" Remove dead debug print code. Signed-off-by: Matias Elo --- .../include/odp_name_table_internal.h | 2 - platform/linux-generic/odp_name_table.c | 198 --------------------- 2 files changed, 200 deletions(-) diff --git a/platform/linux-generic/include/odp_name_table_internal.h b/platform/linux-generic/include/odp_name_table_internal.h index 21ae42d..f4e857c 100644 --- a/platform/linux-generic/include/odp_name_table_internal.h +++ b/platform/linux-generic/include/odp_name_table_internal.h @@ -50,8 +50,6 @@ const char *_odp_int_name_tbl_name(_odp_int_name_t odp_name); uint64_t _odp_int_name_tbl_user_data(_odp_int_name_t odp_name); -void _odp_int_name_tbl_stats_print(void); - int _odp_int_name_tbl_init_global(void); int _odp_int_name_tbl_term_global(void); diff --git a/platform/linux-generic/odp_name_table.c b/platform/linux-generic/odp_name_table.c index 675d96d..abfcf1c 100644 --- a/platform/linux-generic/odp_name_table.c +++ b/platform/linux-generic/odp_name_table.c @@ -46,7 +46,6 @@ /* The number of name tables should not be changed. */ #define NUM_NAME_TBLS 16 -#define SECONDARY_HASH_HISTO_PRINT 1 #define SECONDARY_HASH_DUMP 0 typedef struct name_tbl_entry_s name_tbl_entry_t; @@ -984,203 +983,6 @@ _odp_int_name_t _odp_int_name_tbl_lookup(const char *name, uint8_t name_kind) return name_tbl_id; } -#ifdef SECONDARY_HASH_HISTO_PRINT - -static uint32_t level2_hash_histo(secondary_hash_tbl_t *hash_tbl, - uint32_t level2_histo[]) -{ - name_tbl_entry_t *name_tbl_entry; - hash_tbl_entry_t hash_tbl_entry; - uint32_t idx, collisions, total_collisions; - - total_collisions = 0; - for (idx = 0; idx < SECONDARY_HASH_TBL_SIZE; idx++) { - hash_tbl_entry = hash_tbl->hash_entries[idx]; - if (hash_tbl_entry == 0) { - collisions = 0; - } else { - name_tbl_entry = (name_tbl_entry_t *) - (uintptr_t)(hash_tbl_entry & ~0x3F); - collisions = linked_list_len(name_tbl_entry); - } - - level2_histo[MIN(collisions, 256)]++; - total_collisions += collisions; - } - - return total_collisions; -} - -static uint32_t level1_hash_histo(secondary_hash_tbl_t *hash_tbl, - uint32_t level1_histo[], - uint32_t level2_histo[]) -{ - secondary_hash_tbl_t *secondary_hash; - name_tbl_entry_t *name_tbl_entry; - hash_tbl_entry_t hash_tbl_entry; - uint32_t idx, collisions, total_collisions; - - total_collisions = 0; - for (idx = 0; idx < SECONDARY_HASH_TBL_SIZE; idx++) { - hash_tbl_entry = hash_tbl->hash_entries[idx]; - if (hash_tbl_entry == 0) { - collisions = 0; - } else if ((hash_tbl_entry & 0x3F) != 0) { - name_tbl_entry = (name_tbl_entry_t *) - (uintptr_t)(hash_tbl_entry & ~0x3F); - collisions = linked_list_len(name_tbl_entry); - } else { - secondary_hash = (secondary_hash_tbl_t *) - (uintptr_t)hash_tbl_entry; - collisions = level2_hash_histo(secondary_hash, - level2_histo); - } - - level1_histo[MIN(collisions, 256)]++; - total_collisions += collisions; - } - - return total_collisions; -} - -static void secondary_hash_histo_print(void) -{ - secondary_hash_tbl_t *secondary_hash; - hash_tbl_entry_t hash_tbl_entry; - uint32_t level1_histo[257], level2_histo[257]; - uint32_t avg, idx, count, total_count; - - memset(level1_histo, 0, sizeof(level1_histo)); - memset(level2_histo, 0, sizeof(level2_histo)); - - for (idx = 0; idx < PRIMARY_HASH_TBL_SIZE; idx++) { - hash_tbl_entry = name_hash_tbl.hash_entries[idx]; - if ((hash_tbl_entry != 0) && ((hash_tbl_entry & 0x3F) == 0)) { - /* This hash_tbl_entry references a level 0 secondary - * hash table - */ - secondary_hash = (secondary_hash_tbl_t *) - (uintptr_t)hash_tbl_entry; - level1_hash_histo(secondary_hash, level1_histo, - level2_histo); - } - } - - if (name_hash_tbl.num_secondary_tbls[0] == 0) - return; - - ODP_DBG(" level1 secondary hash histogram:\n"); - total_count = 0; - for (idx = 0; idx < 256; idx++) { - count = level1_histo[idx]; - if (idx != 0) - total_count += count * idx; - - if (count != 0) - ODP_DBG(" num collisions=%02u count=%u\n", - idx, count); - } - - count = level1_histo[256]; - total_count += count; - if (count != 0) - ODP_DBG(" num collisions >=256 count=%u\n", count); - - avg = (100 * total_count) / name_hash_tbl.num_secondary_tbls[0]; - avg = avg / SECONDARY_HASH_TBL_SIZE; - ODP_DBG(" avg collisions=%02u.%02u total=%u\n\n", - avg / 100, avg % 100, total_count); - - if (name_hash_tbl.num_secondary_tbls[1] == 0) - return; - - ODP_DBG(" level2 secondary hash histogram:\n"); - total_count = 0; - for (idx = 0; idx < 256; idx++) { - count = level2_histo[idx]; - if (idx != 0) - total_count += count * idx; - - if (count != 0) - ODP_DBG(" num collisions=%02u count=%u\n", - idx, count); - } - - count = level2_histo[256]; - total_count += count; - if (count != 0) - ODP_DBG(" num collisions >=256 count=%u\n", count); - - avg = (100 * total_count) / name_hash_tbl.num_secondary_tbls[1]; - avg = avg / SECONDARY_HASH_TBL_SIZE; - ODP_DBG(" avg collisions=%02u.%02u total=%u\n\n", - avg / 100, avg % 100, total_count); -} - -#endif - -void _odp_int_name_tbl_stats_print(void) -{ - name_tbl_t *name_tbl; - uint32_t primary_hash_histo[257], idx, collisions, - count, total_count; - uint32_t avg; - - ODP_DBG("\nname table stats:\n"); - ODP_DBG(" num_names=%u num_adds=%lu " - "num_deletes=%lu num_name_tbls=%u\n", - name_tbls.current_num_names, name_tbls.num_adds, - name_tbls.num_deletes, name_tbls.num_name_tbls); - for (idx = 0; idx < NUM_NAME_TBLS; idx++) { - name_tbl = name_tbls.tbls[idx]; - if ((name_tbl) && (name_tbl->num_used != 0)) - ODP_DBG(" name_tbl %u num_allocd=%7u " - "num_added_to_free_list=%7u " - "num_used=%7u num_avail_to_add=%7u\n", idx, - name_tbl->num_allocd, - name_tbl->num_added_to_free_list, - name_tbl->num_used, - name_tbl->num_avail_to_add); - } - - memset(primary_hash_histo, 0, sizeof(primary_hash_histo)); - for (idx = 0; idx < PRIMARY_HASH_TBL_SIZE; idx++) { - collisions = MIN(name_hash_tbl.hash_collisions[idx], 256); - primary_hash_histo[collisions]++; - } - - ODP_DBG(" name_tbl primary hash histogram:\n"); - total_count = 0; - for (idx = 0; idx < 256; idx++) { - count = primary_hash_histo[idx]; - if (idx != 0) - total_count += count * idx; - - if (count != 0) - ODP_DBG(" num collisions=%02u count=%u\n", - idx, count); - } - - count = primary_hash_histo[256]; - total_count += count; - if (count != 0) - ODP_DBG(" num collisions >=256 count=%u\n", count); - - avg = (100 * total_count) / PRIMARY_HASH_TBL_SIZE; - ODP_DBG(" avg collisions=%02u.%02u total=%u\n\n", - avg / 100, avg % 100, total_count); - - ODP_DBG(" num of first level secondary hash tbls=%u " - "second level tbls=%u\n", - name_hash_tbl.num_secondary_tbls[0], - name_hash_tbl.num_secondary_tbls[1]); - -#ifdef SECONDARY_HASH_HISTO_PRINT - if (name_hash_tbl.num_secondary_tbls[0] != 0) - secondary_hash_histo_print(); -#endif -} - int _odp_int_name_tbl_init_global(void) { name_tbl_t *new_name_tbl;