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 1449FA00C2 for ; Thu, 13 Oct 2022 16:53:10 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 07BBE42FF0; Thu, 13 Oct 2022 16:53:10 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 1049F42F7F; Thu, 13 Oct 2022 16:53:07 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 29DAGjAW027230; Thu, 13 Oct 2022 07:53:07 -0700 Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2175.outbound.protection.outlook.com [104.47.59.175]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3k67nqb2md-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 13 Oct 2022 07:53:06 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NQxXWgdAefQucRkZU71lnlbQ4SL3aA+/+ZlRm46J38ymVeTI9XRv9rnTkGcZxJgHUUXabmchhe54Vt3m+yXZn9p9cSPLHooR6wDGOv/1Tj8yeFKH3TUEE230auIWqklUSqAcMFKfebync26W5/ejwP2jQTBgXsgT6TBB1k6DI9BFhZ5YMcr+ejvHxuzVOW2AvT4NS3HhR0WIEdeYjhuTTwvdDHz/UnWnfBYOZizQHfpQH2Da9GrbN22r1jJxYhGmapqLHRNLH3ssNFVOHu0PNAQB6KAgIcqCimFdC4OR4YVunse6VH+5FnGYwUJWqHEcfDF19T130k4OxD2t3uCNZQ== 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=2aST1oUbTdrD29POiJWKTnjRzs6J4ErSN705uNMb88Q=; b=Kwbu6c4IE6X84iA2RbMRh7AlbV8xCx/t/+BZfaapf1GZhTLhEjSA9HLmAYbGWAOvsF1zvwvDUAlVswIIJgJeOYrN/S99Ni4ytxz0lOd+zacYO4WgHJwCHsSVtLbH+XewCtTt+XFAF/U4ouUj1l2GPsVW3LuSAbIu0hCNm46Zvzy/Wgj1zCeCDFotK7rrIQ1dZGa/QpJuQGZtORFQkfxUwXawhiscOE9WDdfijnNBldfrEvInHoBat5RHBX2ti9+jvVSHpfDE/6bbch56OsEQDuSZW/jBFSQonaEVJMLdrmP8sCosiqLsbt4mbIJn+OXGjwICpyBWVu9achYMYg/jZQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2aST1oUbTdrD29POiJWKTnjRzs6J4ErSN705uNMb88Q=; b=npUiTjDiKwXMljHnH846HONBv5LANpXo5tMfkIoQdVUExU+6L8ZXV6uABB+WmmiN2lGyWb+zwwMqJrwPD1opgLTiF+dqX31wWPhdluuxIB8tOK6V62MhYEF2FmZCBV5W3dG1NxcC5GOKV7QZOBxFD5UZI0CIBHkLaxZe1F5WPm0= Received: from BN9PR18MB4204.namprd18.prod.outlook.com (2603:10b6:408:119::18) by DM8PR18MB4472.namprd18.prod.outlook.com (2603:10b6:8:29::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5709.15; Thu, 13 Oct 2022 14:53:04 +0000 Received: from BN9PR18MB4204.namprd18.prod.outlook.com ([fe80::98be:5f14:9aa2:5d7e]) by BN9PR18MB4204.namprd18.prod.outlook.com ([fe80::98be:5f14:9aa2:5d7e%7]) with mapi id 15.20.5709.022; Thu, 13 Oct 2022 14:53:04 +0000 From: Harman Kalra To: David Marchand , "dev@dpdk.org" CC: Jerin Jacob Kollanukkaran , Sunil Kumar Kori , "stable@dpdk.org" Subject: RE: [EXT] [PATCH v3 5/9] trace: fix dynamically enabling trace points Thread-Topic: [EXT] [PATCH v3 5/9] trace: fix dynamically enabling trace points Thread-Index: AQHY3janXWNb2/fRmUSqixghs4RhY64MZ/ww Date: Thu, 13 Oct 2022 14:53:04 +0000 Message-ID: References: <20220921120359.2201131-1-david.marchand@redhat.com> <20221012123112.2951802-1-david.marchand@redhat.com> <20221012123112.2951802-6-david.marchand@redhat.com> In-Reply-To: <20221012123112.2951802-6-david.marchand@redhat.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: BN9PR18MB4204:EE_|DM8PR18MB4472:EE_ x-ms-office365-filtering-correlation-id: bbbef8d6-d543-41f9-9909-08daad2aa1e3 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: qXXRnWoIYTRv1mHMlFgUWF7ZtGT2Ujfz+eUMRM4EW0Us0jaHmAT3SNaJXUTlGaLWp3VlHSSYjxi73BE/7F7WZGcn9akem+L/oms1PDzprgmX6ejte1dTO3sD7QrM2jpH3NueTgQhoGTNd05AT2vBDmvo2WuE/vhG+oxIB2Gla4mEeTpNjNvRFH8aWi/rtCMh7IMWLuQEhaQv5UYIUC2CqTJGyAfWrj6tjd947NIFxjUe/kLXO+0lzVbEg+79ptGWbIy1F7dswibJZHwEybuozKUebgL1dBqZyH0628XtNjNFeV6p+vEtQbIal4FTKS5XuN4sV84IO+8mvlOG0QUbJS5dGJ3CKgh99xW0mOOildia7O8/RippGsD9d0WzD5e8Z+Fv/NSBFvp8Qt14ByFGz61LLEUjfbSndrGA5CPODW0nJ3vPeeaGVXFlQyMMQY+d5jAv//AK7n/OMDZZ6ymB9v0RqE/oykMCX1+spVglxZ++PSUGWKzhfv5KjSTyW7BJz3f812EOLmTOcZjbTXmP3IGlfiOwp4F187JVRk/oPql7ZuWKqlTqZaufInnz5+xr0zqAqb6qGvBuYjk3wnjnNOrks4NHtO1HZjxhWNT7SM9i0bDGZ9RklyX9iohtFXbHcCqs9K5jvLpB95l4hWwuEz/+X5k7JW0mSqaxzPUqnT5YzdTGkKPbYE/k8XZwbhxXYeYiq3BIi2SvsIXeDqFczEnGQQgZFDbavCZhmqWhBW5K5aCX1CUYKaOwai3ALHzGRL4PMfhDq8lobs08G477qQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN9PR18MB4204.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(346002)(396003)(39860400002)(366004)(376002)(136003)(451199015)(38070700005)(33656002)(86362001)(5660300002)(38100700002)(122000001)(186003)(8676002)(55236004)(9686003)(316002)(7696005)(6506007)(64756008)(26005)(54906003)(71200400001)(8936002)(66556008)(66946007)(66446008)(478600001)(2906002)(110136005)(66476007)(76116006)(4326008)(52536014)(41300700001)(55016003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?MWdBzQhbnb/ndcC5kYE8I6/iQnBUX0IXvGzUS0EXq0mmEXRIHSn5qYwhLhHk?= =?us-ascii?Q?2hx3DjsROI1tmbGS4Vr1blUHmv6LEQegfDKY4oc3HhWKUzOCct7jeyWa8oWi?= =?us-ascii?Q?NjfuWKFUTz+gFZcjgJknH0MG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E?= =?us-ascii?Q?QRWy+xTQ8gnevVE/lIlehylMd/XVWZfOKjCOuAslz0i5lKp3JUAQf2qPq5ui?= =?us-ascii?Q?i/6xV0Y3Ke9QsL2eqLqRNxP692vECz0hnv2DqCQe2jvVuHNUYo8Q6LRnIvoT?= =?us-ascii?Q?LE1K48Jd05zgFVWd0vGBbtCGfN6l9WhpDPLpj0FmL5rzvZ7cIPHfet4rupoq?= =?us-ascii?Q?9piz5ZpU/qGcKUQoj7slv3N9zWf0zi67Do+r/GZrmynbkOae4Z7H76vrX8Iz?= =?us-ascii?Q?NMrgVZ9eyAB07bqifPGtqworijVV67olT9b5kH1Rj7uHEghVWKBzg7jmdim8?= =?us-ascii?Q?yJDrKuMWx3rSmXj9FU28hkzvKDfF6m1OAckODw6o4uBRlluIwmS9rxEVkFje?= =?us-ascii?Q?uj8FwtVpOXrhaaR0AKsKxikWRx4IF7pcGJ0Oc4DnGwqJGjEgJKzHibX118sU?= =?us-ascii?Q?/dbUZ+2SypSmaaln5CBp+5Keb8Stp03Jl5bDlJD/5VeW9xoJBdqntDyoIDYP?= =?us-ascii?Q?Euz7TXyMQ2YoBFM5/UDOgBN5ibox4dQalDfWaPuJinWbVmbB/pEB/gwAHl8/?= =?us-ascii?Q?K0adXoEfZuMxt71czKcAB5+ucnZ7fyBeRzJ85HQj?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: marvell.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BN9PR18MB4204.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: bbbef8d6-d543-41f9-9909-08daad2aa1e3 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Oct 2022 14:53:04.2313 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: kqHjK8RZSqIcHumbzD+NuLi9GvhmMqR29iZuO0uYRukbpUpUS350Hv4jzBGmwTkfXG8cLViqDxqOvoFB1na7AA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM8PR18MB4472 X-Proofpoint-GUID: DijVam7MgCB0B1O2ETl1EXCxeMblcTFA X-Proofpoint-ORIG-GUID: DijVam7MgCB0B1O2ETl1EXCxeMblcTFA X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-10-13_08,2022-10-13_01,2022-06-22_01 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org > -int > +static int > trace_mkdir(void) > { > struct trace *trace =3D trace_obj_get(); > char session[TRACE_DIR_STR_LEN]; > + static bool already_done; > char *dir_path; > int rc; >=20 > + if (already_done) > + return 0; > + Hi David I was trying out "trace: take live traces via telemetry" patch I came across following scenario - Started testpmd with trace=3D.* - Executed /trace/save from telemetry script, trace file saved successfully - Later after stopping application, rte_eal_cleanup() did not save the trac= e. With this we lost traces after /trace/save executed This happened because "already_done" was set after rte_trace_save() called = via telemetry. Later rte_eal_cleanup returned from this point without saving later traces. What is the purpose of already_done flag? Thanks Harman > if (!trace->dir_offset) { > dir_path =3D calloc(1, sizeof(trace->dir)); > if (dir_path =3D=3D NULL) { > @@ -365,6 +369,7 @@ trace_mkdir(void) > } >=20 > RTE_LOG(INFO, EAL, "Trace dir: %s\n", trace->dir); > + already_done =3D true;