From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 14DBC42D72; Tue, 27 Jun 2023 15:09:38 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 06B2240F18; Tue, 27 Jun 2023 15:09:38 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2079.outbound.protection.outlook.com [40.107.243.79]) by mails.dpdk.org (Postfix) with ESMTP id E30F540EE1 for ; Tue, 27 Jun 2023 15:09:36 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HSpiliIt/eCI/+1orFLhP2ioaQ1lWKIUoJvN6Cs/7+Ox5tGEqeuN3se+qlt977ZJsOPHA78/r3bxGM+jvTwrUeEH14xqf1kS4JvO23MiYPuc32zNNfWkV6E2QeSDXcFAU1TaazeJREvyARUNuXPgsIsAy3DcHeJqWd5Jg3K7qTHB8I8G9+hBrPrtsQZlf9cj5VQcxKVvzw2AiZPo+PgQHhjO55AHdLKbnmYSpimH9EmP8JtxCSz5mRndG+IXqV556jNfeHTRvaydV8ttHMCrR8rEONiuieRHvL9X2BcovcmMCyttdrSWH/QhUH4FPpLeBhq+Seln5o+Shzfu1IWZTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=e2SnMEEVG8jNLxV+gJaLZcfELT8Tb6YZyu9SOEZMGZw=; b=ak8ap2ZAJ5klGc1nieMruTrad4UoH9Bim9eNMmjeM7RJb54XE5cqf2jN4jA5NSvjB6OF/yd322mR9beaGX/FMW60U5CfqJMsHEsrH3o3ZFAkTIlXKn2sAUh4J+MwWXWh2XbxKP4ZAnx03wrKMXRfoWdTp1C+E+S6iLktHjlwJOl4mHek34wnuROocmpd0znQkclKec/BozrbJXtn9LVCaE1o0CATmcjlFk5w2u9isZDHYo44Ri57Yoo5w92aRENfNLdgFX4EzLkl4iAGqkDy6OXlkc5X14SAV9VNU1OHCCriyKWAT1GUc0nJ5RWaAc9H36ExwiY3nY1On07xdB96GA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=e2SnMEEVG8jNLxV+gJaLZcfELT8Tb6YZyu9SOEZMGZw=; b=oa4WJEvsmhCe1yCEHO9lyJYYRi+dQ3zRCTPapDob0VkFya8uo3gioeUqTWhCB0u3bKLXj4JU5DWaYTzpqxTasK49MSfIPdxFPNqn7nyCJ7ZjEdLXA/An9tVK1UHBs6OfpVojFF/V69Ghdq4K4OXqxRKsmM706UIlkQMHzQuxLT7Q/gYJMpNJ8ns4xHrG0iCp1Q5Qu20oqZMmIhXirqsdrxCOLscucqxP/2jj4UufAh0zzXCqifUm6phj2V93FIxIDhA87Ir16yIZGE8Cj/+2F6sGaU/esalhH6orPEGHId1qWQodmNuEQqQDJmM7HFSNYs6WCX8nbrpIHVJHIoAmBQ== Received: from BN9PR03CA0673.namprd03.prod.outlook.com (2603:10b6:408:10e::18) by CH3PR12MB8459.namprd12.prod.outlook.com (2603:10b6:610:139::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.24; Tue, 27 Jun 2023 13:09:35 +0000 Received: from BN8NAM11FT034.eop-nam11.prod.protection.outlook.com (2603:10b6:408:10e:cafe::7d) by BN9PR03CA0673.outlook.office365.com (2603:10b6:408:10e::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.34 via Frontend Transport; Tue, 27 Jun 2023 13:09:35 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by BN8NAM11FT034.mail.protection.outlook.com (10.13.176.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6500.47 via Frontend Transport; Tue, 27 Jun 2023 13:09:34 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Tue, 27 Jun 2023 06:09:26 -0700 Received: from nvidia.com (10.126.230.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Tue, 27 Jun 2023 06:09:25 -0700 From: Viacheslav Ovsiienko To: CC: , Subject: [PATCH v5] app/testpmd: add trace dump command Date: Tue, 27 Jun 2023 16:09:10 +0300 Message-ID: <20230627130910.9516-1-viacheslavo@nvidia.com> X-Mailer: git-send-email 2.18.1 In-Reply-To: <20230420100803.494-1-viacheslavo@nvidia.com> References: <20230420100803.494-1-viacheslavo@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT034:EE_|CH3PR12MB8459:EE_ X-MS-Office365-Filtering-Correlation-Id: ba24482e-f621-440f-e31e-08db770fc10b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bxpUhFBLyAYoum9kVTZ1u5pzb9P7KygkuvqTzIINhF2/3w2DMKuUsATJlOQI82qTF6oY+pM59nch3rSuPWqayLHzPUKUzNml5ksGoLunqeg8YJDuP3EQybRtY2pWChU+tbxgoaasjPF8RrUKjLoRqzljCY18cOCOYnv7HlzccyDeBOl8Mt2KLEfcdMl39tVHhkrpPm2uc2dD4TiIY6Xii4grl42SHB4do4o7bUSJhJ+fcTvJRunqfv+OR7LM7RarJ5XOi8EIT6QUzODlwwkxZaw4T9M6T3zJmcWJxIWmNqiBGnQHJ5PiGWzBKv/GWnDB00ERRnz6DwfiZg9H18Z+KoIolzLqDFLNPLjhoCKz6BJ+US3rjx7AyyAuVJtFu53++YBS3IJP+ACrnFF+S08kG0E2ai3dLGAYZxrDqsB0EbeSiSG90VAmdFeiGKrzpF3IMy7+bdLLfaTWBJLT0GFUNgMZvWK4E+kTVYUZ0AoBDb8FpfSfGZ4ggeOpWS9j4HbaQuUQuA3BTlNWYdLZj+HWvEvNoda3+Tl6S0Bo2vUHs0UM2FgqK9gYwNfhLA9EiAV/1vmpCIOPL6oa68jW+Q2HpsETfB7JLY1m3XOBRwqdUzEE44OBPZF4Lh5RYuTbb87aK5N8aPeq4VdYIeB6edt+s+mYibasi9SLo4ja5PpwrDEUXgMpHHuj1ZJGg4jPRxc8uP1P3toLlVjJ523PmGNeTDj0KYvLD+AiYWG/UqkjzDyxdW8raHoYsjLb+OokX28PWqZmgLuQ6n2jpvRVQymJQnPRbz4iATrNitCAJJnddapjgZV9RyTpV7pY0RsT6njo X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230028)(4636009)(346002)(39860400002)(136003)(396003)(376002)(451199021)(46966006)(36840700001)(40470700004)(2906002)(86362001)(82310400005)(6666004)(7696005)(356005)(7636003)(83380400001)(2616005)(26005)(16526019)(186003)(47076005)(426003)(82740400003)(336012)(36860700001)(40460700003)(55016003)(54906003)(966005)(40480700001)(41300700001)(6286002)(36756003)(478600001)(4326008)(70206006)(316002)(70586007)(6916009)(1076003)(5660300002)(8676002)(8936002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jun 2023 13:09:34.8022 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ba24482e-f621-440f-e31e-08db770fc10b X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT034.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB8459 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org The "dump_trace" CLI command is added to trigger saving the trace dumps to the trace directory. The tracing data are saved according to the EAL configuration (explicit --trace-dir EAL command line parameter alters the target folder to save). The result dump folder gets the name like rte-YYYY-MM-DD-xx-HH-MM-SS format. This command is useful to get the trace date without exiting testpmd application and to get the multiple dumps to observe the situation in dynamics. Signed-off-by: Viacheslav Ovsiienko -- v1: https://inbox.dpdk.org/dev/20230609152847.32496-2-viacheslavo@nvidia.com v2: https://inbox.dpdk.org/dev/20230613165845.19109-2-viacheslavo@nvidia.com - changed to save_trace command - Windows compilation check added v3: https://inbox.dpdk.org/dev/20230626110734.14126-1-viacheslavo@nvidia.com - reverted to "dump_trace" command v4: http://patches.dpdk.org/project/dpdk/patch/20230626115749.8961-1-viacheslavo@nvidia.com/ - added missed header file include - missed #ifdef added for Windows compilation (no trace support for Windows) v5: - dump_trace command documented - dump commands order neating - checkpatch issue (white space) fixed --- app/test-pmd/cmdline.c | 8 ++++++++ doc/guides/testpmd_app_ug/testpmd_funcs.rst | 7 +++++++ 2 files changed, 15 insertions(+) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 5da38b0bb4..18e6e19497 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -39,6 +39,7 @@ #include #endif #include +#include #include #include @@ -8369,6 +8370,10 @@ static void cmd_dump_parsed(void *parsed_result, rte_devargs_dump(stdout); else if (!strcmp(res->dump, "dump_lcores")) rte_lcore_dump(stdout); +#ifndef RTE_EXEC_ENV_WINDOWS + else if (!strcmp(res->dump, "dump_trace")) + rte_trace_save(); +#endif else if (!strcmp(res->dump, "dump_log_types")) rte_log_dump(stdout); } @@ -8383,6 +8388,9 @@ static cmdline_parse_token_string_t cmd_dump_dump = "dump_mempool#" "dump_devargs#" "dump_lcores#" +#ifndef RTE_EXEC_ENV_WINDOWS + "dump_trace#" +#endif "dump_log_types"); static cmdline_parse_inst_t cmd_dump = { diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst index b755c38c98..8660883ae3 100644 --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst @@ -598,6 +598,13 @@ Dumps the logical cores list:: testpmd> dump_lcores +dump trace +~~~~~~~~~~ + +Dumps the tracing data to the folder according to the current EAL settings:: + + testpmd> dump_trace + dump log types ~~~~~~~~~~~~~~ -- 2.18.1