From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id mQknKJmlMWmAJRkAWB0awg (envelope-from ) for ; Thu, 04 Dec 2025 10:15:37 -0500 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=lists.lttng.org header.i=@lists.lttng.org header.a=rsa-sha256 header.s=mx header.b=od1QRS7k; dkim=pass (2048-bit key; unprotected) header.d=lists.lttng.org header.i=@lists.lttng.org header.a=rsa-sha256 header.s=default header.b=g1RQAwlM; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id A05971E0B3; Thu, 04 Dec 2025 10:15:37 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=no autolearn_force=no version=4.0.1 Received: from m43-8.mailgun.net (m43-8.mailgun.net [69.72.43.8]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by simark.ca (Postfix) with UTF8SMTPS id C31151E08D for ; Thu, 04 Dec 2025 10:15:36 -0500 (EST) DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=lists.lttng.org; q=dns/txt; s=mx; t=1764861335; x=1764868535; h=Sender: Sender: Reply-To: From: From: List-Subscribe: List-Help: List-Post: List-Archive: List-Unsubscribe: List-Id: Content-Transfer-Encoding: Content-Type: Cc: To: To: Subject: Subject: Message-ID: Date: In-Reply-To: References: MIME-Version; bh=5m+dtOtOQd76gI/8m1hxk8IIhXk6PgZ2A6T+/sIPFUk=; b=od1QRS7k0Xbvx03GXoAJW02f6aIfWAwfxpeIMuNr34D3qjMkUqY91rw5V9U+ytNpm6omuWrE1w80B70SY005SdQIyRXK08JGIWmGuZdU13USVF7grpDyuJ5H9Kfw3aXvn3QUYy/e+TD1OkYoQ+7o31s4jAiW5M0ilhRrC2ltx9/Hr2qas/CYCGuH0LMARybWuP2lB6dMawQPag0JsoH41LZrNeR0ko6l0hAVEnt4HbBD4ZyihzbjID5X9/ePev/+Ve+vtpC/xFzeC49k6YXHz24GlhGK9YNou9oUMgVEvjFsrh4ED1zkZdXmWSToDH5KF/fqjnFDAGD4i9ktZfq9Cw== X-Mailgun-Sid: WyJkOTk2OCIsInB1YmxpYy1pbmJveEBzaW1hcmsuY2EiLCI2MDIzMjMiXQ== Received: from lists.lttng.org (lists.lttng.org [158.69.130.29]) by 475e7dbfa3af60662cd68a2e8b5dd142589b251827907b214bf3f3ad2164e8de with SMTP id 6931a597555abd625bb12c3a (version=TLS1.3, cipher=TLS_AES_128_GCM_SHA256); Thu, 04 Dec 2025 15:15:35 GMT X-Mailgun-Sending-Ip: 69.72.43.8 ARC-Filter: OpenARC Filter v1.2.1 lists.lttng.org 4dMdP26pSpz10NG ARC-Seal: i=1; d=lists.lttng.org; s=arc1; a=rsa-sha256; cv=none; t=1764861335; b=Rv+o/sDkb7xEZDIfK715AIQwt2YjfuB66T0DB7wp8VG5QF4QF6qqc1ANmfrLowD7rS3o 5Jc5vrqYx5LvuRWCOgjIxUgSn0ZQto1Cdt3LALvjywQHjVj4beGFDUOmKmFxgLGzocch8 XrCagYFEC3zkkm+cZp45iqCL8UDqqDsDgTLRsDf1KN6Hl0fTnPAQDkeCW+mZA6F9DG2wA 44fo0st8jVxjfDpUVMFAZoJtHY2KlGTEFZxvCj41zPOynuCtYmfoO+7r/j85vAshhLZX2 eidKlx/ruhJ9xCxBBPCbE3M4BJndQ97MTRsimynS9ymKz5p0mCwjOP+2ALRe2fSNAYg== ARC-Message-Signature: i=1; d=lists.lttng.org; s=arc1; a=rsa-sha256; c=relaxed/simple; t=1764861335; h=DKIM-Signature:MIME-Version:Date:Message-ID:Subject:To:From:From; bh=WcfLHRIxYcfkF+cu6OZmEzLxuTUX7719zH6lWl2IXko=; b=Op4qm0sG+NJQd4tyk31UJUnpq6vJ0D29neaSeVFAhVRIcpPDmcNrZrFT7t65sv/gZ6dx kHJHA6p/UG4iDG7FSUaOtBwEZkUWYbzjICgQj89jFlDsWMA3dJ7mRBLyya5tUvHfIzPzr 3onNvYhE5T8fm0cgMNg7cMVnvtA8KpqV0Z4Nx22MG9CXm9Lw+WrXusVC3dNm8KIJgSXYG WH6jZ3HAb4RZNusr+bl6DIcQRwpfB8zhYWqU4dWIqU/TpW1fz4bGrbSlvrv3mg41RS412 X1xGXyeWTW0CWmAyWNGVjX7m/o1/6nSP/MOwQreV6el7W6wF2BeMW8kq4IU/t28artQ== ARC-Authentication-Results: i=1; lists.lttng.org; arc=none smtp.remote-ip="::1" DKIM-Filter: OpenDKIM Filter v2.11.0 lists.lttng.org 4dMdP26pSpz10NG DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lists.lttng.org; s=default; t=1764861335; bh=WcfLHRIxYcfkF+cu6OZmEzLxuTUX7719zH6lWl2IXko=; h=References:In-Reply-To:Date:Subject:To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=g1RQAwlMReE5qWB9I/k/b36B9Hz+iJc1a4JUT76MB6lA2lQiCyBSf9bgjTkXb770Y 06B2GiFFIDJFi+sNoI4hyRHLtzaEDGv3UoFZN/n4bp6J8ePlbRoJbLkjHf+r4J/8gV l/qZLRDlAhschP1hjFn/lHIIotIYRMWSVwfG2pYNB7/+EAFA0/P74E2ZN6Tx8St/tV tFHBaN1hlTN5JUYg2++wtMqKXnQtEviST7mTvkAyYk8BcP6AeNI6CazgelcH48U3HJ ToYXvbMwbRsFU0Lp7kvsvFzzIO5BRvmj/hYXkPF1KLzxZUivDhJBVb3LusS8HO8CKd fgyALxoOZ3xAg== Received: from lists-lttng01.efficios.com (localhost [IPv6:::1]) by lists.lttng.org (Postfix) with ESMTP id 4dMdP26pSpz10NG; Thu, 4 Dec 2025 10:15:34 -0500 (EST) ARC-Filter: OpenARC Filter v1.2.1 lists.lttng.org 4dMdP12P98z10Yl DKIM-Filter: OpenDKIM Filter v2.11.0 lists.lttng.org 4dMdP12P98z10Yl Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) by lists.lttng.org (Postfix) with ESMTPS id 4dMdP12P98z10Yl for ; Thu, 4 Dec 2025 10:15:33 -0500 (EST) Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-5958187fa55so821483e87.3 for ; Thu, 04 Dec 2025 07:15:32 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764861330; x=1765466130; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=5m+dtOtOQd76gI/8m1hxk8IIhXk6PgZ2A6T+/sIPFUk=; b=V9ZKcvof9HiN9aDnKuBLKcmxRnA+rdkEi1PDH1PGXohd42rkHHwNTe7O94PsIl+awe kfhATNP98IbqOV/XQS0nKuZRLNeTwwcAjjbUW6ht48ilt8+JoBY9gFwxIU6lDsSLfTr3 cb7mnsg7wa7w/31GUKC8uyeL+F+KxA+HWTnkaA9YSSfsDhAdctc9Gzs0AuvzH0Jve9Y6 WRREGeJcBrmSw4y5ff9AA5x5YISRYYBLP1cgCsly9MxFtC/5BkYV7ejfwXiHip2XKdtU VqLQTfcd5Hjsj5fkgGfSWnKLLyMAY5Jc6JvGkUY14X2UoKcvK6FlUUmqCflK+dQuQjha hI3w== X-Gm-Message-State: AOJu0YwVGnld4up5zvD73pODuCwda9fjK3sVlzFILwVSiEwC3H+pGkxL XCjKFhml7DicH7pTUfwHVxHaRbn+ZZlSc7MdtLNvhDETBDKp5y1eOwSsZxl8ruwIebmiRCu6sgT mFEWYf5P60427dX3PFMmPn1cm2JN1OWQ= X-Gm-Gg: ASbGncsaEjtNog8ZiVq82DDBUmczt6O3we4nWxclUAE9VPNz9AouGWY/HLzxjtV50rp x5S4wOSYB0yhlRGHg4LvsXuJj9R9dKDBs/QYZ/Nq8jqJOryuOWuLQbaJoRqjxW4Bmy4T/Mnhspq LPYBt62WNByxLlgHDXE+LyptoSXNc4aP3gPdWudhlgTkl2PeBEseH+ahtFPMoZvFEpwK9WqL8B0 +xzZiKUBr9kyoJAZUwKWHlVwVHKog8mrZBNPI7PzcM5Md4HOwNdl8lmzpp/MedxqFfkiDk= X-Google-Smtp-Source: AGHT+IFjP3GkgZMKfvmXx/jLZf18POmuZJY7jGZI447zAlkSBIoPuJEaqpGAAnvov14q6rAbCC/Lb4K5s+UGRldfd+8= X-Received: by 2002:a05:6512:3f1f:b0:595:7d86:f654 with SMTP id 2adb3069b0e04-597d66c8293mr1209404e87.26.1764861329644; Thu, 04 Dec 2025 07:15:29 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Thu, 4 Dec 2025 10:15:27 -0500 X-Gm-Features: AWmQ_bmeKc3tqLdJ5wT1QZ_8vXQfVAbovJue5ebOv41xfoKMcUEzaRDMIoM77B8 Message-ID: Subject: Re: babeltrace | sink.ctf.fs escaping of struct member names To: "MOESSBAUER, Felix" Cc: "lttng-dev@lists.lttng.org" , "Kiszka, Jan" , "Poljakow, Andre" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: lttng-dev@lists.lttng.org X-Mailman-Version: 2.1.39 Precedence: list List-Id: LTTng development list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Philippe Proulx via lttng-dev Reply-To: Philippe Proulx Errors-To: lttng-dev-bounces@lists.lttng.org Sender: "lttng-dev" On Thu, Dec 4, 2025 at 5:10=E2=80=AFAM MOESSBAUER, Felix via lttng-dev wrote: > > In my opinion, the escaping of the struct member names in the CTF > writer is not correct according to the CTF 1.8.3 spec: Section 4.2.1 > states, that reserved keywords must not be used and the recommended > escaping is a underscore prefix. However, the spec does not state any > other names that need to be escaped and by that also not names starting > with an underscore itself. > > IOW: The CTF writer currently unconditionally escapes all struct member > names, which I assume to be incorrect It's not incorrect per se. Underscore as a member name escaping mechanism has always been a nightmare in CTF 1.8. For example, given: uint8 _len; string _strings[length here]; Should we use `_len` or `len`? And what about this: struct { uint8 meow; uint8 _meow; } _mix; LTTng chooses to escape everything with `_`, except the packet header, packet context, and event record header names it knows. We did exactly the same in `sink.ctf.fs`. CTF 1.8 doesn't specify `cpu_id` by the way; it's an LTTngism. CTF 2 solves all of that! Since CTF 1.8 is pretty much deprecated at this point, I want to invest as little time as possible in anything related to this legacy format, whatever the project. Just make it work considering the known use cases. Therefore, for your specific problem, I suggest that you specifically avoid the "protection" (escaping) for `cpu_id` in the packet context field class _only for LTTng traces_. It should be good enough and make Trace Compass work. Trace Compass could also unescape packet context member names, but it will be faster to do this in Babeltrace 2 and it will match the LTTng behaviour more closely. > > I tried fixing this with the attached patch, If you need comments on a patch, even if it's an RFC, please prefer Gerrit so that we can comment specific lines and follow the discussion more easily. BR, Philippe