From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id CD869A04B5; Wed, 28 Oct 2020 22:04:20 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B58EA6938; Wed, 28 Oct 2020 22:03:22 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by dpdk.org (Postfix) with ESMTP id 68F845AA7 for ; Wed, 28 Oct 2020 22:03:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603918990; 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=1XL2UeU4iIu0gNED6mxl6y2w/O0ZMiY1H6BvB8rkX40=; b=df6pCiWa6CfVjuekQm0tPeKTVHOfs+iTKSDo4+BpkFyNJrnOaWsVOynHCJyhuBGgwu6ZX8 K8EUqdRCjdT4cR4JL8QNks9m7ruKy6olmPYV7+Nlvry19mXSZ9BMQJ0Il/PsFbGLtzUobN vOlOGiqPFDmx3ExySl2/28pf3oXyUFI= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-39-jLSpts70OLWleMHVi3znaQ-1; Wed, 28 Oct 2020 17:03:06 -0400 X-MC-Unique: jLSpts70OLWleMHVi3znaQ-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0124E8797F6; Wed, 28 Oct 2020 21:03:05 +0000 (UTC) Received: from dmarchan.remote.csb (unknown [10.40.192.40]) by smtp.corp.redhat.com (Postfix) with ESMTP id ED09E55781; Wed, 28 Oct 2020 21:03:03 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: jerinj@marvell.com, skori@marvell.com Date: Wed, 28 Oct 2020 22:02:49 +0100 Message-Id: <20201028210249.9021-5-david.marchand@redhat.com> In-Reply-To: <20201028210249.9021-1-david.marchand@redhat.com> References: <20201023080058.13335-1-david.marchand@redhat.com> <20201028210249.9021-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david.marchand@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Subject: [dpdk-dev] [PATCH v2 4/4] trace: make CTF metadata prettier X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" This is simply a cosmetic change. Before: event { id = 17; name = "lib.eal.alarm.set"; fields := struct { uint64_t us;uintptr_t cb_fn;uintptr_t cb_arg;int32_t rc; }; }; After: event { id = 17; name = "lib.eal.alarm.set"; fields := struct { uint64_t us; uintptr_t cb_fn; uintptr_t cb_arg; int32_t rc; }; }; Signed-off-by: David Marchand --- lib/librte_eal/common/eal_common_trace.c | 2 +- lib/librte_eal/common/eal_common_trace_ctf.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/librte_eal/common/eal_common_trace.c b/lib/librte_eal/common/eal_common_trace.c index bc031ca719..24e27387b1 100644 --- a/lib/librte_eal/common/eal_common_trace.c +++ b/lib/librte_eal/common/eal_common_trace.c @@ -435,7 +435,7 @@ __rte_trace_point_emit_field(size_t sz, const char *in, const char *datatype) fixup = trace_metadata_fixup_field(in); if (fixup != NULL) in = fixup; - rc = asprintf(&field, "%s%s %s;", + rc = asprintf(&field, "%s %s %s;\n", RTE_PER_LCORE(ctf_field) != NULL ? RTE_PER_LCORE(ctf_field) : "", datatype, in); diff --git a/lib/librte_eal/common/eal_common_trace_ctf.c b/lib/librte_eal/common/eal_common_trace_ctf.c index 22615c4e73..33e419aac7 100644 --- a/lib/librte_eal/common/eal_common_trace_ctf.c +++ b/lib/librte_eal/common/eal_common_trace_ctf.c @@ -232,7 +232,7 @@ meta_event_emit(char **meta, int *offset, struct trace_point *tp) " id = %d;\n" " name = \"%s\";\n" " fields := struct {\n" - " %s\n" + "%s" " };\n" "};\n\n", trace_id_get(tp->handle), tp->name, tp->ctf_field != NULL ? tp->ctf_field : ""); -- 2.23.0