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 35F15A0560; Tue, 18 Oct 2022 15:27:22 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 03A52410E8; Tue, 18 Oct 2022 15:27:21 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 08202410E8 for ; Tue, 18 Oct 2022 15:27:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1666099639; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2ACJOkmzuDX1UJ+c22UtILM8RNz9OT1aGtEDQTYJmrw=; b=g12wnddvDTXkG8zDLuuvyz7W6YTalI/NzjBJQZDrhWkFbXDfABPxPxMT8RngDcVc8SWhRd QADap2AbIDaSVwBxlLTP0WuF+NIXqZqcEyHfn0O/Y0Rc1uBZJG20RNmNxpuVFRvpytxAd4 IinQKB1Lj2mvHgzYZe42wBJQ0Fu4P84= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-648-KDQoyKJzMjGgrnduA0qUBw-1; Tue, 18 Oct 2022 09:27:15 -0400 X-MC-Unique: KDQoyKJzMjGgrnduA0qUBw-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0EB593C0218C; Tue, 18 Oct 2022 13:27:15 +0000 (UTC) Received: from localhost.localdomain (ovpn-192-244.brq.redhat.com [10.40.192.244]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1CBD7C1908A; Tue, 18 Oct 2022 13:27:13 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: jerinj@marvell.com, skori@marvell.com, stable@dpdk.org Subject: [PATCH v4 01/11] trace: fix mode for new trace point Date: Tue, 18 Oct 2022 15:26:44 +0200 Message-Id: <20221018132654.3760561-2-david.marchand@redhat.com> In-Reply-To: <20221018132654.3760561-1-david.marchand@redhat.com> References: <20220921120359.2201131-1-david.marchand@redhat.com> <20221018132654.3760561-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true 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 If an application registers trace points later than rte_eal_init(), changes in the trace point mode were not applied. Fixes: 84c4fae4628f ("trace: implement operation APIs") Cc: stable@dpdk.org Signed-off-by: David Marchand Acked-by: Jerin Jacob Acked-by: Sunil Kumar Kori --- lib/eal/common/eal_common_trace.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/eal/common/eal_common_trace.c b/lib/eal/common/eal_common_trace.c index f9b187d15f..d5dbc7d667 100644 --- a/lib/eal/common/eal_common_trace.c +++ b/lib/eal/common/eal_common_trace.c @@ -512,6 +512,7 @@ __rte_trace_point_register(rte_trace_point_t *handle, const char *name, /* Form the trace handle */ *handle = sz; *handle |= trace.nb_trace_points << __RTE_TRACE_FIELD_ID_SHIFT; + trace_mode_set(handle, trace.mode); trace.nb_trace_points++; tp->handle = handle; -- 2.37.3