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 BA37342D59; Mon, 26 Jun 2023 13:58:21 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 44C5D41149; Mon, 26 Jun 2023 13:58:21 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2077.outbound.protection.outlook.com [40.107.94.77]) by mails.dpdk.org (Postfix) with ESMTP id 9FFE04067B for ; Mon, 26 Jun 2023 13:58:19 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=P/7W4teCkj2W56fiAOt58CPMDilBBXot0o8k6RI33cEoB9dpsdrMH8DX7zK/z9DLsri9d0Aka2gATE0s2C+ljIq23smeYtv6UOPEB13wSqqBfyXzOPZByBti27OxhztKgGVY4wChICjwctjuqfpLorcWNf8f3NGacDzc+ajUxDklTpBgAs8nNoxbG+qmlVZksg4tEtHQSc7SKNpuZX5P8AifbmgV3R+xJBS3WB8IcGIq5q0jV7V1AbHD+9eOh25RewmF3V5Fje+IcOIkubG3eD8LOoT2y6to7Ghxqgsif+vEbIjinCvecFTULD3evdDcvMVrt35erYwPQB0+EvvzXA== 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=wf3bOrXeV51bKf92IchgmVrWlh214p41qmhtQ/T28Kg=; b=JqhtesMJ/mrSyPkvsz4HEmCFBnFPaduIepAkG69gvj+rtg6t1bYh7Ly2JO9kK+dSZy+tOxB0tS/lafd4JjumnZZ2RyfDJkOgnmqkUin+nKnzSyj9VzfZdCG7TaZqoImrOPNVCM67lSK7I4J4X6iTazsLNuRy8hYzZ/QTnYdfW/gtj3A5Z8mpTPpFbp6yL9GFVNeN4drXuwOSCEO/ZIH5NmdDSVHt8HkIN3g9MNLF4sNS+Wbgml0OTHQOjAhzmMwAtJagCa8J57WuR/KmO2U8mVNpHH9rT00etx99Y/xOjyMDXYp7xo0t86gnbvZAkHIrAnk7cs2FGFWJMPjW6SUBbQ== 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=wf3bOrXeV51bKf92IchgmVrWlh214p41qmhtQ/T28Kg=; b=CJKNOlAS+1DodbkUtVbPI+QLsvJ8EgEWW65TOa5vhu96R0tUxdzvPxpdCsvFVB4ohFJD2Chi5UEJpkUnrwzBQTavMyQc/I4ptydQgDKMUsNh9kb7sWhvlh7h1UOp/0td+jDXxW7g2HjoDn5O/FTfw5c4yLWUhhiHwKyQxG/KOKEgrBBDq8jbv/n5i5jA2A+y/paqG31v7Dxo7lYsM22kgnb7abQSLGm5Q339rkevv00pXJw5PARkVYR3YuoK/ev3omPrpZvLN2F8wv4nlifjvk7X4dvU5ztSGf73wSw+/uoSsq6sd4c8ZXrVuZhH2bWPlkenTC6TUtbJimXDoaKfTA== Received: from DM6PR01CA0025.prod.exchangelabs.com (2603:10b6:5:296::30) by SJ1PR12MB6266.namprd12.prod.outlook.com (2603:10b6:a03:457::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.23; Mon, 26 Jun 2023 11:58:14 +0000 Received: from DM6NAM11FT083.eop-nam11.prod.protection.outlook.com (2603:10b6:5:296:cafe::58) by DM6PR01CA0025.outlook.office365.com (2603:10b6:5:296::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.33 via Frontend Transport; Mon, 26 Jun 2023 11:58:14 +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 DM6NAM11FT083.mail.protection.outlook.com (10.13.173.97) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6500.47 via Frontend Transport; Mon, 26 Jun 2023 11:58:14 +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; Mon, 26 Jun 2023 04:58:04 -0700 Received: from nvidia.com (10.126.231.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; Mon, 26 Jun 2023 04:58:02 -0700 From: Viacheslav Ovsiienko To: CC: , Subject: [PATCH v4] app/testpmd: add trace dump command Date: Mon, 26 Jun 2023 14:57:49 +0300 Message-ID: <20230626115749.8961-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.231.35] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT083:EE_|SJ1PR12MB6266:EE_ X-MS-Office365-Filtering-Correlation-Id: 521dd08a-ac83-4ffc-d537-08db763c9f25 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ExmyUgmTSlliTZ7bYms0Nrr8MY4aJwSB0eLEVB14KiYf0dqafHjrqi7SHcUp7jH5DQW+s+7peRcqlOAEqRH1pPRLMMVh6rualINhQ0zEqSD/HAqCVSI1CfLGdQ2Wh9XXvLBUj2gIyz+qphjrMaqrTL/85UprQPBkmsw4NZvokXs+HscrWCtGxOJ/tg2BAcL3zyKGajz55MFejAUm3IoEqnsiYvMz2Q6uZPCqlKkGocayn3T2HBpmViHTUCmbHaLZJMV+Vzfq0BR3am3H0PS8+6R/YVr9c+8oj3T2r7PeCXtZEZ5pnmx1TUGB7lPOcDHv6XjTh+J2pZpIR7OojtPeQgSeoTHPURPbKb1W65Zrn/NNIs7jl0HmuPiEQzJODDOjOj3zCfzDoklP5exD3Gdf1+uMihy52VW0l6nSCu0JJKOlHZdT/TxR3zT4qJQ2+eQQRDtfxBnBHiMTyk4JTRZLaPfb3E/pfiT0WH7Losl7a4erR8RMcJO+nt79mZ0I3it2q7v50MxwSOXT6ajt5EZ45z59UFi/lW/jNJ2a2VaucwljKb7cT1hM5gQFZChnIaVL4Epalee2xDxQzeD4j+UIQC/cUmaHDWJEDd74vGncGnLwUAsv7vgnAvjszkcIYHRg9ARXaIiJMZ1OcwwAMsAfao6hi/lIUWUFM+COXT+c/Fkwg9ww9TD6MCKzSDVpXiDPJU8JKMvXYxiRfMTNdqmw1k24hBF9iE9VE5RN7oSrsHLyV9Je6DVz132N66u7IKY3xt4G8n7ydUmYErPw95U0iwJ7J4hOHvboO+DAlSHyJUqdSfTYQH7KgjvxyTX1ta0C 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)(136003)(376002)(396003)(39860400002)(451199021)(40470700004)(36840700001)(46966006)(2906002)(40460700003)(7696005)(82310400005)(82740400003)(356005)(6666004)(2616005)(7636003)(83380400001)(336012)(426003)(186003)(6286002)(16526019)(1076003)(47076005)(26005)(966005)(36860700001)(55016003)(41300700001)(86362001)(54906003)(478600001)(40480700001)(70586007)(70206006)(6916009)(36756003)(316002)(4326008)(8936002)(8676002)(5660300002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jun 2023 11:58:14.1823 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 521dd08a-ac83-4ffc-d537-08db763c9f25 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: DM6NAM11FT083.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ1PR12MB6266 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: - added missed header file include - missed #ifdef added for Windows compilation (no trace support for Windows) --- app/test-pmd/cmdline.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 5da38b0bb4..b82763c65d 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -39,6 +39,7 @@ #include #endif #include +#include #include #include @@ -8371,10 +8372,17 @@ static void cmd_dump_parsed(void *parsed_result, rte_lcore_dump(stdout); else if (!strcmp(res->dump, "dump_log_types")) rte_log_dump(stdout); +#ifndef RTE_EXEC_ENV_WINDOWS + else if (!strcmp(res->dump, "dump_trace")) + rte_trace_save(); +#endif } static cmdline_parse_token_string_t cmd_dump_dump = TOKEN_STRING_INITIALIZER(struct cmd_dump_result, dump, +#ifndef RTE_EXEC_ENV_WINDOWS + "dump_trace#" +#endif "dump_physmem#" "dump_memzone#" "dump_socket_mem#" -- 2.18.1